1
EXECUTE "SELECT TABLE_NAME FROM DATA_DICTIONARY.tables LIMIT 2";
5
SET @t1=1, @t2=2, @t3:=4;
6
SELECT @t1, @t2, @t3, @t4 := @t1+@t2+@t3;
7
@t1 @t2 @t3 @t4 := @t1+@t2+@t3
9
EXECUTE "SELECT @t1, @t2, @t3, @t4 := @t1+@t2+@t3";
10
@t1 @t2 @t3 @t4 := @t1+@t2+@t3
12
SET @bugus_syntax= "3";
13
EXECUTE "SELECT * FROM DATA_DICTIONARY.tables LIMIT @bugus_syntax";
14
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '@bugus_syntax' at line 1
15
EXECUTE "SELECT TABLE_NAME FROM DATA_DICTIONARY.tables LIMIT 2";
19
EXECUTE "EXECUTE SELECT * FROM DATA_DICTIONARY.tables LIMIT 2";
20
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'SELECT * FROM DATA_DICTIONARY.tables LIMIT 2' at line 1
21
EXECUTE "SELECT @t1, @t2, @t3, @t4 := @t1+@t2+@t3";
22
@t1 @t2 @t3 @t4 := @t1+@t2+@t3
24
set @sub_var="SELECT @t1, @t2, @t3, @t4 := @t1+@t2+@t3";
26
@t1 @t2 @t3 @t4 := @t1+@t2+@t3
28
EXECUTE "CREATE TABLE t1 (a SERIAL)";
31
t1 CREATE TABLE `t1` (
32
`a` BIGINT NOT NULL AUTO_INCREMENT,
34
) ENGINE=InnoDB COLLATE = utf8_general_ci
35
EXECUTE "INSERT INTO t1 VALUES ()";
36
EXECUTE "DROP TABLE t1";
37
EXECUTE "SELECT @t1, @t2, @t3, @t4 := @t1+@t2+@t3; SELECT @t1, @t2, @t3, @t4 := @t1+@t2+@t3";
38
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '; SELECT @t1, @t2, @t3, @t4 := @t1+@t2+@t3' at line 1
39
set @foo="SELECT 1+2+3";
43
set @create="CREATE TABLE t1 (a SERIAL)";
44
set @insert="INSERT INTO t1 VALUES ()";
45
set @select="SELECT a FROM t1";
46
set @drop="DROP TABLE t1";
57
EXECUTE @does_not_exist;
58
ERROR HY000: Incorrect arguments to Invalid Variable
60
ERROR HY000: Incorrect arguments to Invalid Variable
61
EXECUTE "SELECT (SELECT 1) UNION SELECT (SELECT 2)";
65
EXECUTE "explain extended SELECT (SELECT 1) UNION SELECT (SELECT 2)";
66
id select_type table type possible_keys key key_len ref rows filtered Extra
67
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
68
3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
69
NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL NULL
71
Note 1249 Select 2 was reduced during optimization
72
Note 1249 Select 4 was reduced during optimization
73
Note 1003 select 1 AS `(SELECT 1)` union select 2 AS `(SELECT 2)`
74
EXECUTE "SELECT (SELECT (SELECT 0 UNION SELECT 0))";
75
(SELECT (SELECT 0 UNION SELECT 0))
77
EXECUTE "explain extended SELECT (SELECT (SELECT 0 UNION SELECT 0))";
78
id select_type table type possible_keys key key_len ref rows filtered Extra
79
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
80
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
81
4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
82
NULL UNION RESULT <union3,4> ALL NULL NULL NULL NULL NULL NULL
84
Note 1249 Select 2 was reduced during optimization
85
Note 1003 select (select 0 AS `0` union select 0 AS `0`) AS `(SELECT (SELECT 0 UNION SELECT 0))`