summaryrefslogtreecommitdiff
path: root/storage/test_sql_discovery/mysql-test/sql_discovery/simple.result
blob: 7e5baf560b3656b6067929ffa16e96aeff65460a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
show variables like 'test_sql_discovery%';
Variable_name	Value
test_sql_discovery_statement	
test_sql_discovery_write_frm	ON
set sql_quote_show_create=0;
create table t1 (a int) engine=test_sql_discovery;
ERROR HY000: Can't create table `test`.`t1` (errno: 131 "Command not supported by database")
select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
set @@test_sql_discovery_statement='t1:foobar bwa-ha-ha';
select * from t0;
ERROR 42S02: Table 'test.t0' doesn't exist
select * from t1;
ERROR HY000: Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'foobar bwa-ha-ha'
show warnings;
Level	Code	Message
Error	1064	You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'foobar bwa-ha-ha' at line 1
Error	1939	Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'foobar bwa-ha-ha'
set @@test_sql_discovery_statement='t1:select 1';
select * from t1;
ERROR HY000: Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'select 1'
show warnings;
Level	Code	Message
Error	1939	Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'select 1'
set @@test_sql_discovery_statement='t1:create table t1 (a int primary key) partition by hash(id) partitions 2';
select * from t1;
ERROR HY000: Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 (a int primary key) partition by hash(id) partitions 2'
show warnings;
Level	Code	Message
Error	1290	The MariaDB server is running with the --skip-partition option so it cannot execute this statement
Error	1939	Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 (a int primary key) partition by hash(id) partitions 2'
set @@test_sql_discovery_statement='t1:create table t1 (a int) union=(t3,t4)';
select * from t1;
ERROR HY000: Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 (a int) union=(t3,t4)'
show warnings;
Level	Code	Message
Error	1939	Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 (a int) union=(t3,t4)'
set @@test_sql_discovery_statement='t1:create table t1 like t2';
select * from t1;
ERROR HY000: Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 like t2'
show warnings;
Level	Code	Message
Error	1939	Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 like t2'
set @@test_sql_discovery_statement='t1:create table t1 select * from t2';
select * from t1;
ERROR HY000: Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 select * from t2'
show warnings;
Level	Code	Message
Error	1939	Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 select * from t2'
set @@test_sql_discovery_statement='t1:create table t1 (a int) index directory="/tmp"';
select * from t1;
ERROR HY000: Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 (a int) index directory="/tmp"'
show warnings;
Level	Code	Message
Error	1939	Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 (a int) index directory="/tmp"'
set @@test_sql_discovery_statement='t1:create table t1 (a int) data directory="/tmp"';
select * from t1;
ERROR HY000: Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 (a int) data directory="/tmp"'
show warnings;
Level	Code	Message
Error	1939	Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 (a int) data directory="/tmp"'
set @@test_sql_discovery_statement='t1:create table t1 (a int) engine=myisam';
select * from t1;
ERROR HY000: Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 (a int) engine=myisam'
show warnings;
Level	Code	Message
Error	1939	Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 (a int) engine=myisam'
set @@test_sql_discovery_statement='t1:create temporary table t1 (a int)';
select * from t1;
ERROR HY000: Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create temporary table t1 (a int)'
show warnings;
Level	Code	Message
Error	1939	Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create temporary table t1 (a int)'
set @@test_sql_discovery_statement='t1:create table if not exists t1 (a int)';
select * from t1;
ERROR HY000: Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table if not exists t1 (a int)'
show warnings;
Level	Code	Message
Error	1939	Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table if not exists t1 (a int)'
set @@test_sql_discovery_statement='t1:create table t1 (a uint)';
select * from t1;
ERROR HY000: Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 (a uint)'
show warnings;
Level	Code	Message
Error	1064	You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'uint)' at line 1
Error	1939	Engine TEST_SQL_DISCOVERY failed to discover table `test`.`t1` with 'create table t1 (a uint)'
set @@test_sql_discovery_statement='t1:create table t1 (a int)';
select * from t1;
a
show create table t1;
Table	Create Table
t1	CREATE TABLE t1 (
  a int(11) DEFAULT NULL
) ENGINE=TEST_SQL_DISCOVERY DEFAULT CHARSET=latin1
drop table t1;
set @@test_sql_discovery_statement='t1:create table t2 (a int)';
select * from t1;
a
select * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
drop table t1;
set @@test_sql_discovery_statement='t1:create table t1 (a int) engine=test_sql_discovery';
select * from t1;
a
drop table t1;
set @@test_sql_discovery_statement='t1:
create table t1 (
  a int not null default 5 primary key,
  b timestamp,
  c tinyblob,
  d decimal(5,2),
  e varchar(30) character set ascii,
  f geometry not null,
  index (d,b),
  unique index (c(10)),
  fulltext (e),
  spatial (f)
) comment="abc" default character set utf8 max_rows=100 min_rows=10 checksum=1';
show status like 'handler_discover';
Variable_name	Value
Handler_discover	15
show create table t1;
Table	Create Table
t1	CREATE TABLE t1 (
  a int(11) NOT NULL DEFAULT '5',
  b timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  c tinyblob,
  d decimal(5,2) DEFAULT NULL,
  e varchar(30) CHARACTER SET ascii DEFAULT NULL,
  f geometry NOT NULL,
  PRIMARY KEY (a),
  UNIQUE KEY c (c(10)),
  KEY d (d,b),
  SPATIAL KEY f (f),
  FULLTEXT KEY e (e)
) ENGINE=TEST_SQL_DISCOVERY DEFAULT CHARSET=utf8 MIN_ROWS=10 MAX_ROWS=100 CHECKSUM=1 COMMENT='abc'
show status like 'handler_discover';
Variable_name	Value
Handler_discover	16
----
t1.frm
----
show open tables from test;
Database	Table	In_use	Name_locked
test	t1	0	0
select * from t1;
a	b	c	d	e	f
show status like 'handler_discover';
Variable_name	Value
Handler_discover	16
flush tables;
select * from t1;
a	b	c	d	e	f
show status like 'handler_discover';
Variable_name	Value
Handler_discover	16
drop table t1;
set @@test_sql_discovery_write_frm=0;
set @@test_sql_discovery_statement='t1:create table t1 (a int)';
show status like 'handler_discover';
Variable_name	Value
Handler_discover	16
show create table t1;
Table	Create Table
t1	CREATE TABLE t1 (
  a int(11) DEFAULT NULL
) ENGINE=TEST_SQL_DISCOVERY DEFAULT CHARSET=latin1
show status like 'handler_discover';
Variable_name	Value
Handler_discover	17
----
----
show open tables from test;
Database	Table	In_use	Name_locked
test	t1	0	0
select * from t1;
a
show status like 'handler_discover';
Variable_name	Value
Handler_discover	17
flush tables;
select * from t1;
a
show status like 'handler_discover';
Variable_name	Value
Handler_discover	18
drop table t1;
show status like 'handler_discover';
Variable_name	Value
Handler_discover	18