1drop table if exists t5, t6, t7, t8;
2drop database if exists mysqltest ;
3drop database if exists client_test_db;
4drop database if exists testtets;
5drop table if exists t1Aa,t2Aa,v1Aa,v2Aa;
6drop view if exists t1Aa,t2Aa,v1Aa,v2Aa;
7test_sequence
8------ basic tests ------
9drop table if exists t1, t9 ;
10create table t1
11(
12a int, b varchar(30),
13primary key(a)
14) engine = 'MYISAM'  ;
15create table t9
16(
17c1  tinyint, c2  smallint, c3  mediumint, c4  int,
18c5  integer, c6  bigint, c7  float, c8  double,
19c9  double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
20c13 date, c14 datetime, c15 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
21ON UPDATE CURRENT_TIMESTAMP, c16 time,
22c17 year, c18 tinyint, c19 bool, c20 char,
23c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
24c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
25c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
26c32 set('monday', 'tuesday', 'wednesday'),
27primary key(c1)
28) engine = 'MYISAM'  ;
29delete from t1 ;
30insert into t1 values (1,'one');
31insert into t1 values (2,'two');
32insert into t1 values (3,'three');
33insert into t1 values (4,'four');
34commit ;
35delete from t9 ;
36insert into t9
37set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
38c10= 1, c11= 1, c12 = 1,
39c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
40c16= '11:11:11', c17= '2004',
41c18= 1, c19=true, c20= 'a', c21= '123456789a',
42c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
43c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
44c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
45insert into t9
46set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
47c10= 9, c11= 9, c12 = 9,
48c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
49c16= '11:11:11', c17= '2004',
50c18= 1, c19=false, c20= 'a', c21= '123456789a',
51c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
52c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
53c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
54commit ;
55PREPARE stmt FROM ' select * from t1 where a = ? ' ;
56SET @var= 2 ;
57EXECUTE stmt USING @var ;
58a	b
592	two
60select * from t1 where a = @var ;
61a	b
622	two
63DEALLOCATE PREPARE stmt ;
64prepare stmt1 from ' select 1 as my_col ' ;
65prepare stmt1 from ' select ? as my_col ' ;
66prepare ;
67ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
68prepare stmt1 ;
69ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
70prepare stmt1 from ;
71ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
72prepare_garbage stmt1 from ' select 1 ' ;
73ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'prepare_garbage stmt1 from ' select 1 '' at line 1
74prepare stmt1 from_garbage ' select 1 ' ;
75ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from_garbage ' select 1 '' at line 1
76prepare stmt1 from ' select_garbage 1 ' ;
77ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select_garbage 1' at line 1
78prepare from ' select 1 ' ;
79ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from ' select 1 '' at line 1
80prepare stmt1 ' select 1 ' ;
81ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' select 1 '' at line 1
82prepare ? from ' select ? as my_col ' ;
83ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? from ' select ? as my_col '' at line 1
84set @arg00='select 1 as my_col';
85prepare stmt1 from @arg00;
86set @arg00='';
87prepare stmt1 from @arg00;
88ERROR 42000: Query was empty
89set @arg00=NULL;
90prepare stmt1 from @arg01;
91ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1
92prepare stmt1 from ' select * from t1 where a <= 2 ' ;
93prepare stmt1 from ' select * from t1 where x <= 2 ' ;
94ERROR 42S22: Unknown column 'x' in 'where clause'
95prepare stmt1 from ' insert into t1(a,x) values(?,?) ' ;
96ERROR 42S22: Unknown column 'x' in 'field list'
97prepare stmt1 from ' insert into t1(x,a) values(?,?) ' ;
98ERROR 42S22: Unknown column 'x' in 'field list'
99drop table if exists not_exist ;
100prepare stmt1 from ' select * from not_exist where a <= 2 ' ;
101ERROR 42S02: Table 'test.not_exist' doesn't exist
102prepare stmt1 from ' insert into t1 values(? ' ;
103ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
104prepare stmt1 from ' select a, b from t1
105                     where a=? and where ' ;
106ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where' at line 2
107execute never_prepared ;
108ERROR HY000: Unknown prepared statement handler (never_prepared) given to EXECUTE
109prepare stmt1 from ' select * from t1 where a <= 2 ' ;
110prepare stmt1 from ' select * from not_exist where a <= 2 ' ;
111ERROR 42S02: Table 'test.not_exist' doesn't exist
112execute stmt1 ;
113ERROR HY000: Unknown prepared statement handler (stmt1) given to EXECUTE
114create table t5
115(
116a int primary key,
117b char(30),
118c int
119);
120insert into t5( a, b, c) values( 1, 'original table', 1);
121prepare stmt2 from ' select * from t5 ' ;
122execute stmt2 ;
123a	b	c
1241	original table	1
125drop table t5 ;
126execute stmt2 ;
127ERROR 42S02: Table 'test.t5' doesn't exist
128create table t5
129(
130a int primary key,
131b char(30),
132c int
133);
134insert into t5( a, b, c) values( 9, 'recreated table', 9);
135execute stmt2 ;
136a	b	c
1379	recreated table	9
138drop table t5 ;
139create table t5
140(
141a int primary key,
142c int,
143b char(30)
144);
145insert into t5( a, b, c) values( 9, 'recreated table', 9);
146execute stmt2 ;
147a	c	b
1489	9	recreated table
149drop table t5 ;
150create table t5
151(
152a int primary key,
153b char(30),
154c int,
155d timestamp default '2008-02-23 09:23:45'
156);
157insert into t5( a, b, c) values( 9, 'recreated table', 9);
158execute stmt2 ;
159a	b	c	d
1609	recreated table	9	2008-02-23 09:23:45
161drop table t5 ;
162create table t5
163(
164a int primary key,
165d timestamp default '2008-02-23 09:23:45',
166b char(30),
167c int
168);
169insert into t5( a, b, c) values( 9, 'recreated table', 9);
170execute stmt2 ;
171a	d	b	c
1729	2008-02-23 09:23:45	recreated table	9
173drop table t5 ;
174create table t5
175(
176a timestamp default '2004-02-29 18:01:59',
177b char(30),
178c int
179);
180insert into t5( b, c) values( 'recreated table', 9);
181execute stmt2 ;
182a	b	c
1832004-02-29 18:01:59	recreated table	9
184drop table t5 ;
185create table t5
186(
187f1 int primary key,
188f2 char(30),
189f3 int
190);
191insert into t5( f1, f2, f3) values( 9, 'recreated table', 9);
192execute stmt2 ;
193f1	f2	f3
1949	recreated table	9
195drop table t5 ;
196prepare stmt1 from ' select * from t1 where a <= 2 ' ;
197execute stmt1 ;
198a	b
1991	one
2002	two
201set @arg00=1 ;
202set @arg01='two' ;
203prepare stmt1 from ' select * from t1 where a <= ? ' ;
204execute stmt1 using @arg00;
205a	b
2061	one
207execute stmt1 ;
208ERROR HY000: Incorrect arguments to EXECUTE
209execute stmt1 using @arg00, @arg01;
210ERROR HY000: Incorrect arguments to EXECUTE
211execute stmt1 using @not_set;
212a	b
213deallocate prepare never_prepared ;
214ERROR HY000: Unknown prepared statement handler (never_prepared) given to DEALLOCATE PREPARE
215prepare stmt1 from ' select * from t1 where a <= 2 ' ;
216prepare stmt1 from ' select * from not_exist where a <= 2 ' ;
217ERROR 42S02: Table 'test.not_exist' doesn't exist
218deallocate prepare stmt1;
219ERROR HY000: Unknown prepared statement handler (stmt1) given to DEALLOCATE PREPARE
220create table t5
221(
222a int primary key,
223b char(10)
224);
225prepare stmt2 from ' select a,b from t5 where a <= 2 ' ;
226drop table t5 ;
227deallocate prepare stmt2;
228prepare stmt1 from ' select a from t1 where a <= 2 ' ;
229prepare stmt2 from ' select b from t1 where a <= 2 ' ;
230execute stmt2 ;
231b
232one
233two
234execute stmt1 ;
235a
2361
2372
238prepare stmt1 from ' select a from t1 where a <= 2 ' ;
239prepare stmt2 from ' select a from t1 where a <= 2 ' ;
240execute stmt2 ;
241a
2421
2432
244execute stmt1 ;
245a
2461
2472
248deallocate prepare stmt1 ;
249execute stmt2 ;
250a
2511
2522
253test_sequence
254------ show and misc tests ------
255drop table if exists t2;
256create table t2
257(
258a int primary key, b char(10)
259);
260prepare stmt4 from ' show databases like ''mysql'' ';
261execute stmt4;
262Database (mysql)
263mysql
264prepare stmt4 from ' show tables from test like ''t2%'' ';
265execute stmt4;
266Tables_in_test (t2%)
267t2
268prepare stmt4 from ' show columns from t2 where field in (select ?) ';
269SET @arg00="a";
270execute stmt4 using @arg00;
271Field	Type	Null	Key	Default	Extra
272a	int(11)	NO	PRI	NULL
273SET @arg00="b";
274execute stmt4 using @arg00;
275Field	Type	Null	Key	Default	Extra
276b	char(10)	YES		NULL
277SET @arg00=1;
278execute stmt4 using @arg00;
279Field	Type	Null	Key	Default	Extra
280Warnings:
281Warning	1292	Truncated incorrect DOUBLE value: 'a'
282Warning	1292	Truncated incorrect DOUBLE value: 'b'
283prepare stmt4 from ' show columns from t2 from test like ''a%'' ';
284execute stmt4;
285Field	Type	Null	Key	Default	Extra
286a	int(11)	NO	PRI	NULL
287create index t2_idx on t2(b);
288prepare stmt4 from ' show index from t2 from test ';
289execute stmt4;
290Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment	Index_comment
291t2	0	PRIMARY	1	a	A	0	NULL	NULL		BTREE
292t2	1	t2_idx	1	b	A	0	NULL	NULL	YES	BTREE
293prepare stmt4 from ' show table status from test like ''t2%'' ';
294execute stmt4;
295Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
296t2	InnoDB	10	Dynamic	0	0	16384	#	16384	0	NULL	#	#	#	latin1_swedish_ci	NULL
297prepare stmt4 from ' show table status from test like ''t9%'' ';
298execute stmt4;
299Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
300t9	MyISAM	10	Dynamic	2	212	424	#	2048	0	NULL	#	#	#	latin1_swedish_ci	NULL
301prepare stmt4 from ' show status like ''Threads_running'' ';
302execute stmt4;
303Variable_name	Value
304Threads_running	#
305prepare stmt4 from ' show variables like ''sql_mode'' ';
306execute stmt4;
307Variable_name	Value
308sql_mode	ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
309prepare stmt4 from ' show engine myisam logs ';
310execute stmt4;
311Type	Name	Status
312prepare stmt4 from ' show grants for user ';
313prepare stmt4 from ' show create table t2 ';
314prepare stmt4 from ' show master status ';
315prepare stmt4 from ' show master logs ';
316prepare stmt4 from ' show slave status ';
317prepare stmt4 from ' show warnings limit 20 ';
318ERROR HY000: This command is not supported in the prepared statement protocol yet
319prepare stmt4 from ' show errors limit 20 ';
320ERROR HY000: This command is not supported in the prepared statement protocol yet
321prepare stmt4 from ' show storage engines ';
322execute stmt4;
323drop table if exists t5;
324prepare stmt1 from ' drop table if exists t5 ' ;
325execute stmt1 ;
326Warnings:
327Note	1051	Unknown table 'test.t5'
328prepare stmt1 from ' drop table t5 ' ;
329execute stmt1 ;
330ERROR 42S02: Unknown table 'test.t5'
331prepare stmt1 from ' SELECT @@version ' ;
332execute stmt1 ;
333@@version
334<version>
335prepare stmt_do from ' do @var:=  (1 in (select a from t1)) ' ;
336prepare stmt_set from ' set @var= (1 in (select a from t1)) ' ;
337execute stmt_do ;
338content of @var is:
3391
340execute stmt_set ;
341content of @var is:
3421
343execute stmt_do ;
344content of @var is:
3451
346execute stmt_set ;
347content of @var is:
3481
349execute stmt_do ;
350content of @var is:
3511
352execute stmt_set ;
353content of @var is:
3541
355drop table if exists t5 ;
356create table t5 (a int) ;
357prepare stmt_do from ' do @var:=  (1 in (select a from t5)) ' ;
358prepare stmt_set from ' set @var= (1 in (select a from t5)) ' ;
359execute stmt_do ;
360content of @var is:
3610
362execute stmt_set ;
363content of @var is:
3640
365execute stmt_do ;
366content of @var is:
3670
368execute stmt_set ;
369content of @var is:
3700
371execute stmt_do ;
372content of @var is:
3730
374execute stmt_set ;
375content of @var is:
3760
377drop table t5 ;
378deallocate prepare stmt_do ;
379deallocate prepare stmt_set ;
380prepare stmt1 from ' prepare stmt2 from '' select 1 ''  ' ;
381ERROR HY000: This command is not supported in the prepared statement protocol yet
382prepare stmt1 from ' execute stmt2 ' ;
383ERROR HY000: This command is not supported in the prepared statement protocol yet
384prepare stmt1 from ' deallocate prepare never_prepared ' ;
385ERROR HY000: This command is not supported in the prepared statement protocol yet
386prepare stmt1 from 'alter view v1 as select 2';
387ERROR HY000: This command is not supported in the prepared statement protocol yet
388prepare stmt4 from ' use test ' ;
389ERROR HY000: This command is not supported in the prepared statement protocol yet
390prepare stmt3 from ' create database mysqltest ';
391create database mysqltest ;
392prepare stmt3 from ' drop database mysqltest ';
393drop database mysqltest ;
394prepare stmt3 from ' describe t2 ';
395execute stmt3;
396Field	Type	Null	Key	Default	Extra
397a	int(11)	NO	PRI	NULL
398b	char(10)	YES	MUL	NULL
399drop table t2 ;
400execute stmt3;
401ERROR 42S02: Table 'test.t2' doesn't exist
402prepare stmt3 from ' lock tables t1 read ' ;
403ERROR HY000: This command is not supported in the prepared statement protocol yet
404prepare stmt3 from ' unlock tables ' ;
405ERROR HY000: This command is not supported in the prepared statement protocol yet
406prepare stmt1 from ' load data infile ''<MYSQLTEST_VARDIR>/tmp/data.txt''
407     into table t1 fields terminated by ''\t'' ';
408ERROR HY000: This command is not supported in the prepared statement protocol yet
409prepare stmt1 from ' select * into outfile ''<MYSQLTEST_VARDIR>/tmp/data.txt'' from t1 ';
410execute stmt1 ;
411prepare stmt1 from ' optimize table t1 ' ;
412prepare stmt1 from ' analyze table t1 ' ;
413prepare stmt1 from ' checksum table t1 ' ;
414prepare stmt1 from ' repair table t1 ' ;
415prepare stmt1 from ' handler t1 open ';
416ERROR HY000: This command is not supported in the prepared statement protocol yet
417prepare stmt3 from ' commit ' ;
418prepare stmt3 from ' rollback ' ;
419prepare stmt4 from ' SET sql_mode=ansi ';
420execute stmt4;
421Warnings:
422Warning	3090	Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
423select 'a' || 'b' ;
424'a' || 'b'
425ab
426prepare stmt4 from ' SET sql_mode="" ';
427execute stmt4;
428select '2' || '3' ;
429'2' || '3'
4301
431prepare stmt5 from ' select ''2'' || ''3'' ' ;
432execute stmt5;
433'2' || '3'
4341
435SET sql_mode=ansi;
436execute stmt5;
437'2' || '3'
4381
439SET sql_mode="";
440prepare stmt1 from ' flush local privileges ' ;
441prepare stmt1 from ' reset query cache ' ;
442Warnings:
443Warning	1681	'RESET QUERY CACHE' is deprecated and will be removed in a future release.
444prepare stmt1 from ' KILL 0 ';
445prepare stmt1 from ' explain select a from t1 order by b ';
446execute stmt1;
447id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
4481	SIMPLE	t1	NULL	ALL	NULL	NULL	NULL	NULL	4	100.00	Using filesort
449Warnings:
450Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` order by `test`.`t1`.`b`
451SET @arg00=1 ;
452prepare stmt1 from ' explain select a from t1 where a > ? order by b ';
453execute stmt1 using @arg00;
454id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
4551	SIMPLE	t1	NULL	range	PRIMARY	PRIMARY	4	NULL	3	100.00	Using index condition; Using filesort
456Warnings:
457Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` > 1) order by `test`.`t1`.`b`
458drop table if exists t2;
459create table t2 (id smallint, name varchar(20)) ;
460prepare stmt1 from ' insert into t2 values(?, ?) ' ;
461set @id= 9876 ;
462set @arg00= 'MySQL - Open Source Database' ;
463set @arg01= "'" ;
464set @arg02= '"' ;
465set @arg03= "my'sql'" ;
466set @arg04= 'my"sql"' ;
467insert into t2 values ( @id , @arg00 );
468Warnings:
469Warning	1265	Data truncated for column 'name' at row 1
470insert into t2 values ( @id , @arg01 );
471insert into t2 values ( @id , @arg02 );
472insert into t2 values ( @id , @arg03 );
473insert into t2 values ( @id , @arg04 );
474prepare stmt1 from ' select * from t2 where id= ? and name= ? ';
475execute stmt1 using @id, @arg00 ;
476id	name
477execute stmt1 using @id, @arg01 ;
478id	name
4799876	'
480execute stmt1 using @id, @arg02 ;
481id	name
4829876	"
483execute stmt1 using @id, @arg03 ;
484id	name
4859876	my'sql'
486execute stmt1 using @id, @arg04 ;
487id	name
4889876	my"sql"
489drop table t2;
490test_sequence
491------ create/drop/alter/rename tests ------
492drop table if exists t2, t3;
493prepare stmt_drop from ' drop table if exists t2 ' ;
494execute stmt_drop;
495prepare stmt_create from ' create table t2 (
496                             a int primary key, b char(10)) ';
497execute stmt_create;
498prepare stmt3 from ' create table t3 like t2 ';
499execute stmt3;
500drop table t3;
501set @arg00=1;
502prepare stmt3 from ' create table t3 (m int) select ? as m ' ;
503execute stmt3 using @arg00;
504select m from t3;
505m
5061
507drop table t3;
508prepare stmt3 from ' create index t2_idx on t2(b) ';
509prepare stmt3 from ' drop index t2_idx on t2 ' ;
510prepare stmt3 from ' alter table t2 drop primary key ';
511drop table if exists new_t2;
512prepare stmt3 from ' rename table t2 to new_t2 ';
513execute stmt3;
514execute stmt3;
515ERROR 42S01: Table 'new_t2' already exists
516rename table new_t2 to t2;
517drop table t2;
518prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
519create table t5 (a int) ;
520execute stmt1 ;
521ERROR HY000: Can't find file: './test/t7' (errno: 2 - No such file or directory)
522create table t7 (a int) ;
523execute stmt1 ;
524execute stmt1 ;
525ERROR 42S01: Table 't6' already exists
526rename table t6 to t5, t8 to t7 ;
527execute stmt1 ;
528drop table t6, t8 ;
529test_sequence
530------ big statement tests ------
531(select 'ABC' as my_const_col from t1 where
5321 = 1 AND
5331 = 1 AND
5341 = 1 AND
5351 = 1 AND
5361 = 1 AND
5371 = 1 AND
5381 = 1 AND
5391 = 1 AND
5401 = 1 AND
5411 = 1 AND
5421 = 1 AND
5431 = 1 AND
5441 = 1 AND
5451 = 1 AND
5461 = 1 AND
5471 = 1 AND
5481 = 1 AND
5491 = 1 AND
5501 = 1 AND
5511 = 1 AND
5521 = 1 AND
5531 = 1 AND
5541 = 1 AND
5551 = 1 AND
5561 = 1 AND
5571 = 1 AND
5581 = 1 AND
5591 = 1 AND
5601 = 1 AND
5611 = 1 AND
5621 = 1 AND
5631 = 1 AND
5641 = 1 AND
5651 = 1 AND
5661 = 1 AND
5671 = 1 AND
5681 = 1 AND
5691 = 1 AND
5701 = 1 AND
5711 = 1 AND
5721 = 1 AND
5731 = 1 AND
5741 = 1 AND
5751 = 1 AND
5761 = 1 AND
5771 = 1 AND
5781 = 1 AND
5791 = 1 AND
5801 = 1 ) ;
581my_const_col
582ABC
583ABC
584ABC
585ABC
586prepare stmt1 from "select 'ABC' as my_const_col from t1 where
5871 = 1 AND
5881 = 1 AND
5891 = 1 AND
5901 = 1 AND
5911 = 1 AND
5921 = 1 AND
5931 = 1 AND
5941 = 1 AND
5951 = 1 AND
5961 = 1 AND
5971 = 1 AND
5981 = 1 AND
5991 = 1 AND
6001 = 1 AND
6011 = 1 AND
6021 = 1 AND
6031 = 1 AND
6041 = 1 AND
6051 = 1 AND
6061 = 1 AND
6071 = 1 AND
6081 = 1 AND
6091 = 1 AND
6101 = 1 AND
6111 = 1 AND
6121 = 1 AND
6131 = 1 AND
6141 = 1 AND
6151 = 1 AND
6161 = 1 AND
6171 = 1 AND
6181 = 1 AND
6191 = 1 AND
6201 = 1 AND
6211 = 1 AND
6221 = 1 AND
6231 = 1 AND
6241 = 1 AND
6251 = 1 AND
6261 = 1 AND
6271 = 1 AND
6281 = 1 AND
6291 = 1 AND
6301 = 1 AND
6311 = 1 AND
6321 = 1 AND
6331 = 1 AND
6341 = 1 AND
6351 = 1 " ;
636execute stmt1 ;
637my_const_col
638ABC
639ABC
640ABC
641ABC
642execute stmt1 ;
643my_const_col
644ABC
645ABC
646ABC
647ABC
648(select 'ABC' as my_const_col FROM t1 WHERE
649'1234567890123456789012345678901234567890123456789012345678901234567890'
650= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
651'1234567890123456789012345678901234567890123456789012345678901234567890'
652= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
653'1234567890123456789012345678901234567890123456789012345678901234567890'
654= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
655'1234567890123456789012345678901234567890123456789012345678901234567890'
656= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
657'1234567890123456789012345678901234567890123456789012345678901234567890'
658= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
659'1234567890123456789012345678901234567890123456789012345678901234567890'
660= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
661'1234567890123456789012345678901234567890123456789012345678901234567890'
662= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
663'1234567890123456789012345678901234567890123456789012345678901234567890'
664= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
665'1234567890123456789012345678901234567890123456789012345678901234567890'
666= '1234567890123456789012345678901234567890123456789012345678901234567890' ) ;
667my_const_col
668ABC
669ABC
670ABC
671ABC
672prepare stmt1 from "select 'ABC' as my_const_col FROM t1 WHERE
673'1234567890123456789012345678901234567890123456789012345678901234567890'
674= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
675'1234567890123456789012345678901234567890123456789012345678901234567890'
676= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
677'1234567890123456789012345678901234567890123456789012345678901234567890'
678= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
679'1234567890123456789012345678901234567890123456789012345678901234567890'
680= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
681'1234567890123456789012345678901234567890123456789012345678901234567890'
682= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
683'1234567890123456789012345678901234567890123456789012345678901234567890'
684= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
685'1234567890123456789012345678901234567890123456789012345678901234567890'
686= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
687'1234567890123456789012345678901234567890123456789012345678901234567890'
688= '1234567890123456789012345678901234567890123456789012345678901234567890' AND
689'1234567890123456789012345678901234567890123456789012345678901234567890'
690= '1234567890123456789012345678901234567890123456789012345678901234567890' " ;
691execute stmt1 ;
692my_const_col
693ABC
694ABC
695ABC
696ABC
697execute stmt1 ;
698my_const_col
699ABC
700ABC
701ABC
702ABC
703select 'ABC' as my_const_col FROM t1 WHERE
704@arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
705@arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
706@arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
707@arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
708@arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
709@arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
710@arg00=@arg00 ;
711my_const_col
712ABC
713ABC
714ABC
715ABC
716prepare stmt1 from ' select ''ABC'' as my_const_col FROM t1 WHERE
717 ? = ?  and  ? = ?  and  ? = ?  and  ? = ?  and
718 ? = ?  and  ? = ?  and  ? = ?  and  ? = ?  and
719 ? = ?  and  ? = ?  and  ? = ?  and  ? = ?  and
720 ? = ?  and  ? = ?  and  ? = ?  and  ? = ?  and
721 ? = ?  and  ? = ?  and  ? = ?  and  ? = ?  and
722 ? = ?  and  ? = ?  and  ? = ?  and  ? = ?  and
723 ? = ?  ' ;
724execute stmt1 using
725@arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
726@arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
727@arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
728@arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
729@arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
730@arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
731@arg00, @arg00;
732my_const_col
733ABC
734ABC
735ABC
736ABC
737execute stmt1 using
738@arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07,
739@arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, @arg17,
740@arg20, @arg21, @arg22, @arg23, @arg24, @arg25, @arg26, @arg27,
741@arg30, @arg31, @arg32, @arg33, @arg34, @arg35, @arg36, @arg37,
742@arg40, @arg41, @arg42, @arg43, @arg44, @arg45, @arg46, @arg47,
743@arg50, @arg51, @arg52, @arg53, @arg54, @arg55, @arg56, @arg57,
744@arg60, @arg61 ;
745my_const_col
746ABC
747ABC
748ABC
749ABC
750drop table if exists t5 ;
751set @col_num= 1000 ;
752select @string as "" ;
753
754create table t5( c999 int,c998 int,c997 int,c996 int,c995 int,c994 int,c993 int,c992 int,c991 int,c990 int,c989 int,c988 int,c987 int,c986 int,c985 int,c984 int,c983 int,c982 int,c981 int,c980 int,c979 int,c978 int,c977 int,c976 int,c975 int,c974 int,c973 int,c972 int,c971 int,c970 int,c969 int,c968 int,c967 int,c966 int,c965 int,c964 int,c963 int,c962 int,c961 int,c960 int,c959 int,c958 int,c957 int,c956 int,c955 int,c954 int,c953 int,c952 int,c951 int,c950 int,c949 int,c948 int,c947 int,c946 int,c945 int,c944 int,c943 int,c942 int,c941 int,c940 int,c939 int,c938 int,c937 int,c936 int,c935 int,c934 int,c933 int,c932 int,c931 int,c930 int,c929 int,c928 int,c927 int,c926 int,c925 int,c924 int,c923 int,c922 int,c921 int,c920 int,c919 int,c918 int,c917 int,c916 int,c915 int,c914 int,c913 int,c912 int,c911 int,c910 int,c909 int,c908 int,c907 int,c906 int,c905 int,c904 int,c903 int,c902 int,c901 int,c900 int,c899 int,c898 int,c897 int,c896 int,c895 int,c894 int,c893 int,c892 int,c891 int,c890 int,c889 int,c888 int,c887 int,c886 int,c885 int,c884 int,c883 int,c882 int,c881 int,c880 int,c879 int,c878 int,c877 int,c876 int,c875 int,c874 int,c873 int,c872 int,c871 int,c870 int,c869 int,c868 int,c867 int,c866 int,c865 int,c864 int,c863 int,c862 int,c861 int,c860 int,c859 int,c858 int,c857 int,c856 int,c855 int,c854 int,c853 int,c852 int,c851 int,c850 int,c849 int,c848 int,c847 int,c846 int,c845 int,c844 int,c843 int,c842 int,c841 int,c840 int,c839 int,c838 int,c837 int,c836 int,c835 int,c834 int,c833 int,c832 int,c831 int,c830 int,c829 int,c828 int,c827 int,c826 int,c825 int,c824 int,c823 int,c822 int,c821 int,c820 int,c819 int,c818 int,c817 int,c816 int,c815 int,c814 int,c813 int,c812 int,c811 int,c810 int,c809 int,c808 int,c807 int,c806 int,c805 int,c804 int,c803 int,c802 int,c801 int,c800 int,c799 int,c798 int,c797 int,c796 int,c795 int,c794 int,c793 int,c792 int,c791 int,c790 int,c789 int,c788 int,c787 int,c786 int,c785 int,c784 int,c783 int,c782 int,c781 int,c780 int,c779 int,c778 int,c777 int,c776 int,c775 int,c774 int,c773 int,c772 int,c771 int,c770 int,c769 int,c768 int,c767 int,c766 int,c765 int,c764 int,c763 int,c762 int,c761 int,c760 int,c759 int,c758 int,c757 int,c756 int,c755 int,c754 int,c753 int,c752 int,c751 int,c750 int,c749 int,c748 int,c747 int,c746 int,c745 int,c744 int,c743 int,c742 int,c741 int,c740 int,c739 int,c738 int,c737 int,c736 int,c735 int,c734 int,c733 int,c732 int,c731 int,c730 int,c729 int,c728 int,c727 int,c726 int,c725 int,c724 int,c723 int,c722 int,c721 int,c720 int,c719 int,c718 int,c717 int,c716 int,c715 int,c714 int,c713 int,c712 int,c711 int,c710 int,c709 int,c708 int,c707 int,c706 int,c705 int,c704 int,c703 int,c702 int,c701 int,c700 int,c699 int,c698 int,c697 int,c696 int,c695 int,c694 int,c693 int,c692 int,c691 int,c690 int,c689 int,c688 int,c687 int,c686 int,c685 int,c684 int,c683 int,c682 int,c681 int,c680 int,c679 int,c678 int,c677 int,c676 int,c675 int,c674 int,c673 int,c672 int,c671 int,c670 int,c669 int,c668 int,c667 int,c666 int,c665 int,c664 int,c663 int,c662 int,c661 int,c660 int,c659 int,c658 int,c657 int,c656 int,c655 int,c654 int,c653 int,c652 int,c651 int,c650 int,c649 int,c648 int,c647 int,c646 int,c645 int,c644 int,c643 int,c642 int,c641 int,c640 int,c639 int,c638 int,c637 int,c636 int,c635 int,c634 int,c633 int,c632 int,c631 int,c630 int,c629 int,c628 int,c627 int,c626 int,c625 int,c624 int,c623 int,c622 int,c621 int,c620 int,c619 int,c618 int,c617 int,c616 int,c615 int,c614 int,c613 int,c612 int,c611 int,c610 int,c609 int,c608 int,c607 int,c606 int,c605 int,c604 int,c603 int,c602 int,c601 int,c600 int,c599 int,c598 int,c597 int,c596 int,c595 int,c594 int,c593 int,c592 int,c591 int,c590 int,c589 int,c588 int,c587 int,c586 int,c585 int,c584 int,c583 int,c582 int,c581 int,c580 int,c579 int,c578 int,c577 int,c576 int,c575 int,c574 int,c573 int,c572 int,c571 int,c570 int,c569 int,c568 int,c567 int,c566 int,c565 int,c564 int,c563 int,c562 int,c561 int,c560 int,c559 int,c558 int,c557 int,c556 int,c555 int,c554 int,c553 int,c552 int,c551 int,c550 int,c549 int,c548 int,c547 int,c546 int,c545 int,c544 int,c543 int,c542 int,c541 int,c540 int,c539 int,c538 int,c537 int,c536 int,c535 int,c534 int,c533 int,c532 int,c531 int,c530 int,c529 int,c528 int,c527 int,c526 int,c525 int,c524 int,c523 int,c522 int,c521 int,c520 int,c519 int,c518 int,c517 int,c516 int,c515 int,c514 int,c513 int,c512 int,c511 int,c510 int,c509 int,c508 int,c507 int,c506 int,c505 int,c504 int,c503 int,c502 int,c501 int,c500 int,c499 int,c498 int,c497 int,c496 int,c495 int,c494 int,c493 int,c492 int,c491 int,c490 int,c489 int,c488 int,c487 int,c486 int,c485 int,c484 int,c483 int,c482 int,c481 int,c480 int,c479 int,c478 int,c477 int,c476 int,c475 int,c474 int,c473 int,c472 int,c471 int,c470 int,c469 int,c468 int,c467 int,c466 int,c465 int,c464 int,c463 int,c462 int,c461 int,c460 int,c459 int,c458 int,c457 int,c456 int,c455 int,c454 int,c453 int,c452 int,c451 int,c450 int,c449 int,c448 int,c447 int,c446 int,c445 int,c444 int,c443 int,c442 int,c441 int,c440 int,c439 int,c438 int,c437 int,c436 int,c435 int,c434 int,c433 int,c432 int,c431 int,c430 int,c429 int,c428 int,c427 int,c426 int,c425 int,c424 int,c423 int,c422 int,c421 int,c420 int,c419 int,c418 int,c417 int,c416 int,c415 int,c414 int,c413 int,c412 int,c411 int,c410 int,c409 int,c408 int,c407 int,c406 int,c405 int,c404 int,c403 int,c402 int,c401 int,c400 int,c399 int,c398 int,c397 int,c396 int,c395 int,c394 int,c393 int,c392 int,c391 int,c390 int,c389 int,c388 int,c387 int,c386 int,c385 int,c384 int,c383 int,c382 int,c381 int,c380 int,c379 int,c378 int,c377 int,c376 int,c375 int,c374 int,c373 int,c372 int,c371 int,c370 int,c369 int,c368 int,c367 int,c366 int,c365 int,c364 int,c363 int,c362 int,c361 int,c360 int,c359 int,c358 int,c357 int,c356 int,c355 int,c354 int,c353 int,c352 int,c351 int,c350 int,c349 int,c348 int,c347 int,c346 int,c345 int,c344 int,c343 int,c342 int,c341 int,c340 int,c339 int,c338 int,c337 int,c336 int,c335 int,c334 int,c333 int,c332 int,c331 int,c330 int,c329 int,c328 int,c327 int,c326 int,c325 int,c324 int,c323 int,c322 int,c321 int,c320 int,c319 int,c318 int,c317 int,c316 int,c315 int,c314 int,c313 int,c312 int,c311 int,c310 int,c309 int,c308 int,c307 int,c306 int,c305 int,c304 int,c303 int,c302 int,c301 int,c300 int,c299 int,c298 int,c297 int,c296 int,c295 int,c294 int,c293 int,c292 int,c291 int,c290 int,c289 int,c288 int,c287 int,c286 int,c285 int,c284 int,c283 int,c282 int,c281 int,c280 int,c279 int,c278 int,c277 int,c276 int,c275 int,c274 int,c273 int,c272 int,c271 int,c270 int,c269 int,c268 int,c267 int,c266 int,c265 int,c264 int,c263 int,c262 int,c261 int,c260 int,c259 int,c258 int,c257 int,c256 int,c255 int,c254 int,c253 int,c252 int,c251 int,c250 int,c249 int,c248 int,c247 int,c246 int,c245 int,c244 int,c243 int,c242 int,c241 int,c240 int,c239 int,c238 int,c237 int,c236 int,c235 int,c234 int,c233 int,c232 int,c231 int,c230 int,c229 int,c228 int,c227 int,c226 int,c225 int,c224 int,c223 int,c222 int,c221 int,c220 int,c219 int,c218 int,c217 int,c216 int,c215 int,c214 int,c213 int,c212 int,c211 int,c210 int,c209 int,c208 int,c207 int,c206 int,c205 int,c204 int,c203 int,c202 int,c201 int,c200 int,c199 int,c198 int,c197 int,c196 int,c195 int,c194 int,c193 int,c192 int,c191 int,c190 int,c189 int,c188 int,c187 int,c186 int,c185 int,c184 int,c183 int,c182 int,c181 int,c180 int,c179 int,c178 int,c177 int,c176 int,c175 int,c174 int,c173 int,c172 int,c171 int,c170 int,c169 int,c168 int,c167 int,c166 int,c165 int,c164 int,c163 int,c162 int,c161 int,c160 int,c159 int,c158 int,c157 int,c156 int,c155 int,c154 int,c153 int,c152 int,c151 int,c150 int,c149 int,c148 int,c147 int,c146 int,c145 int,c144 int,c143 int,c142 int,c141 int,c140 int,c139 int,c138 int,c137 int,c136 int,c135 int,c134 int,c133 int,c132 int,c131 int,c130 int,c129 int,c128 int,c127 int,c126 int,c125 int,c124 int,c123 int,c122 int,c121 int,c120 int,c119 int,c118 int,c117 int,c116 int,c115 int,c114 int,c113 int,c112 int,c111 int,c110 int,c109 int,c108 int,c107 int,c106 int,c105 int,c104 int,c103 int,c102 int,c101 int,c100 int,c99 int,c98 int,c97 int,c96 int,c95 int,c94 int,c93 int,c92 int,c91 int,c90 int,c89 int,c88 int,c87 int,c86 int,c85 int,c84 int,c83 int,c82 int,c81 int,c80 int,c79 int,c78 int,c77 int,c76 int,c75 int,c74 int,c73 int,c72 int,c71 int,c70 int,c69 int,c68 int,c67 int,c66 int,c65 int,c64 int,c63 int,c62 int,c61 int,c60 int,c59 int,c58 int,c57 int,c56 int,c55 int,c54 int,c53 int,c52 int,c51 int,c50 int,c49 int,c48 int,c47 int,c46 int,c45 int,c44 int,c43 int,c42 int,c41 int,c40 int,c39 int,c38 int,c37 int,c36 int,c35 int,c34 int,c33 int,c32 int,c31 int,c30 int,c29 int,c28 int,c27 int,c26 int,c25 int,c24 int,c23 int,c22 int,c21 int,c20 int,c19 int,c18 int,c17 int,c16 int,c15 int,c14 int,c13 int,c12 int,c11 int,c10 int,c9 int,c8 int,c7 int,c6 int,c5 int,c4 int,c3 int,c2 int,c1 int,c0 int)
755prepare stmt1 from @string ;
756execute stmt1 ;
757select @string as "" ;
758
759insert into t5 values(1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1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