~percona-dev/percona-server/release-5.1.47-12

« back to all changes in this revision

Viewing changes to show_temp_51.patch

  • Committer: kinoyasu
  • Date: 2010-05-20 10:47:38 UTC
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: kinoyasu@gauntlet3-20100520104738-a7n33fbaf8cz7bmq
reorder and adjust mysql-test acript and add simple check for innodb_doublewrite_path option

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -ruN a/mysql-test/r/show_temp_tables.result b/mysql-test/r/show_temp_tables.result
2
 
--- /dev/null   1970-01-01 09:00:00.000000000 +0900
3
 
+++ b/mysql-test/r/show_temp_tables.result      2010-04-30 19:46:32.000000000 +0900
4
 
@@ -0,0 +1,58 @@
5
 
+drop table if exists t1,t2,t3;
6
 
+drop database if exists showtemp;
7
 
+create database if not exists showtemp;
8
 
+use test;
9
 
+create temporary table t1(id int);
10
 
+create temporary table t2(id int);
11
 
+create temporary table showtemp.t3(id int);
12
 
+insert into t1 values(10),(20),(30),(40);
13
 
+insert into showtemp.t3 values(999);
14
 
+show temporary tables;
15
 
+Temp_tables_in_test
16
 
+t2
17
 
+t1
18
 
+show temporary tables from test;
19
 
+Temp_tables_in_test
20
 
+t2
21
 
+t1
22
 
+show temporary tables in showtemp;
23
 
+Temp_tables_in_showtemp
24
 
+t3
25
 
+select table_schema, table_name, engine, table_rows from Information_schema.temporary_tables;
26
 
+table_schema   table_name      engine  table_rows
27
 
+showtemp       t3      MyISAM  1
28
 
+test   t2      MyISAM  0
29
 
+test   t1      MyISAM  4
30
 
+select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables;
31
 
+table_schema   table_name      engine  table_rows
32
 
+showtemp       t3      MyISAM  1
33
 
+test   t2      MyISAM  0
34
 
+test   t1      MyISAM  4
35
 
+select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables where table_schema='showtemp';
36
 
+table_schema   table_name      engine  table_rows
37
 
+showtemp       t3      MyISAM  1
38
 
+select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables where table_schema='temp';
39
 
+table_schema   table_name      engine  table_rows
40
 
+drop table if exists showtemp.t2;
41
 
+create temporary table t1(id int);
42
 
+create temporary table showtemp.t2(id int);
43
 
+show temporary tables;
44
 
+Temp_tables_in_test
45
 
+t1
46
 
+select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables;
47
 
+table_schema   table_name      engine  table_rows
48
 
+showtemp       t2      MyISAM  0
49
 
+test   t1      MyISAM  0
50
 
+showtemp       t3      MyISAM  1
51
 
+test   t2      MyISAM  0
52
 
+test   t1      MyISAM  4
53
 
+drop table showtemp.t2;
54
 
+drop table t1;
55
 
+select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables;
56
 
+table_schema   table_name      engine  table_rows
57
 
+showtemp       t3      MyISAM  1
58
 
+test   t2      MyISAM  0
59
 
+test   t1      MyISAM  4
60
 
+drop table t1, t2;
61
 
+drop table showtemp.t3;
62
 
+drop database showtemp;
63
 
diff -ruN a/mysql-test/t/show_temp_tables.test b/mysql-test/t/show_temp_tables.test
64
 
--- /dev/null   1970-01-01 09:00:00.000000000 +0900
65
 
+++ b/mysql-test/t/show_temp_tables.test        2010-04-30 19:46:32.000000000 +0900
66
 
@@ -0,0 +1,65 @@
67
 
+# Uses GRANT commands that usually disabled in embedded server
68
 
+-- source include/not_embedded.inc
69
 
+
70
 
+# Save the initial number of concurrent sessions
71
 
+--source include/count_sessions.inc
72
 
+
73
 
+#
74
 
+# Test of SHOW [GLOBAL] TEMPORARY TABLES [FROM/IN] DB and 
75
 
+# Information_schema.temporary_tables and global_temporary_tables
76
 
+#
77
 
+
78
 
+connect(stcon1,localhost,root,,test);
79
 
+connect(stcon2,localhost,root,,test);
80
 
+
81
 
+connection stcon1;
82
 
+
83
 
+--disable_warnings
84
 
+drop table if exists t1,t2,t3;
85
 
+drop database if exists showtemp;
86
 
+create database if not exists showtemp;
87
 
+--enable_warnings
88
 
+
89
 
+use test;
90
 
+create temporary table t1(id int);
91
 
+create temporary table t2(id int);
92
 
+create temporary table showtemp.t3(id int);
93
 
+insert into t1 values(10),(20),(30),(40);
94
 
+insert into showtemp.t3 values(999);
95
 
+
96
 
+show temporary tables;
97
 
+# "Session" is not same value always. mysql-test cannot test it always.
98
 
+#show global temporary tables;
99
 
+show temporary tables from test;
100
 
+show temporary tables in showtemp;
101
 
+select table_schema, table_name, engine, table_rows from Information_schema.temporary_tables;
102
 
+select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables;
103
 
+select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables where table_schema='showtemp';
104
 
+select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables where table_schema='temp';
105
 
+
106
 
+connection stcon2;
107
 
+
108
 
+--disable_warnings
109
 
+drop table if exists showtemp.t2;
110
 
+--enable_warnings
111
 
+create temporary table t1(id int);
112
 
+create temporary table showtemp.t2(id int);
113
 
+show temporary tables;
114
 
+select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables;
115
 
+drop table showtemp.t2;
116
 
+drop table t1;
117
 
+
118
 
+disconnect stcon2;
119
 
+
120
 
+connection stcon1;
121
 
+select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables;
122
 
+
123
 
+drop table t1, t2;
124
 
+drop table showtemp.t3;
125
 
+drop database showtemp;
126
 
+
127
 
+connection default;
128
 
+disconnect stcon1;
129
 
+
130
 
+# Wait till all disconnects are completed
131
 
+--source include/wait_until_count_sessions.inc
132
1
diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
133
2
--- a/sql/mysqld.cc     2010-04-30 19:37:14.000000000 +0900
134
3
+++ b/sql/mysqld.cc     2010-04-30 19:46:32.000000000 +0900