1 ####################### ps_query.inc #########################
3 # Tests for prepared statements: SELECTs #
5 ##############################################################
8 # NOTE: PLEASE SEE ps_1general.test (bottom)
9 # BEFORE ADDING NEW TEST CASES HERE !!!
12 # Please be aware, that this file will be sourced by several test case files
13 # stored within the subdirectory 't'. So every change here will affect
16 # Please do not modify (INSERT/UPDATE/DELETE) the content or the
17 # structure (DROP/ALTER..) of the tables
19 # Such tests should be done in include/ps_modify.inc .
21 # But you are encouraged to use these two tables within your SELECT statements
23 # t1 - very simple table
24 # t9 - table with nearly all available column types
26 # The structure and the content of these tables can be found in
27 # include/ps_create.inc CREATE TABLE ...
28 # include/ps_renew.inc DELETE all rows and INSERT some rows
30 # Both tables are managed by the same storage engine.
31 # The type of the storage engine is stored in the variable '$type' .
35 #------------------- Please insert your test cases here -------------------#
39 #-------- Please be very carefull when editing behind this line ----------#
41 ################ simple select tests ################
43 select
'------ simple select tests ------' as test_sequence ;
46 ##### many column types, but no parameter
47 # heavy modified case derived from client_test.c: test_func_fields()
48 prepare stmt1 from
' select * from t9 order by c1 ' ;
53 ##### parameter used for keyword like SELECT (must fail)
56 @arg00 a from t1 where a=1;
58 prepare stmt1 from
' ? a from t1 where a=1 ';
60 ##### parameter in select column list
61 ## parameter is not NULL
63 select @arg00, b from t1 where a=1 ;
64 prepare stmt1 from
' select ?, b from t1 where a=1 ' ;
65 execute stmt1
using @arg00 ;
67 select @arg00, b from t1 where a=1 ;
68 prepare stmt1 from
' select ?, b from t1 where a=1 ' ;
69 execute stmt1
using @arg00 ;
72 select @arg00, b from t1 where a=1 ;
73 prepare stmt1 from
' select ?, b from t1 where a=1 ' ;
74 execute stmt1
using @arg00 ;
75 ## parameter within an expression
77 select b, a - @arg00 from t1 where a=1 ;
78 prepare stmt1 from
' select b, a - ? from t1 where a=1 ' ;
79 execute stmt1
using @arg00 ;
80 # case derived from client_test.c: test_ps_null_param()
82 select @arg00 as my_col ;
83 prepare stmt1 from
' select ? as my_col';
84 execute stmt1
using @arg00 ;
85 select @arg00 + 1 as my_col ;
86 prepare stmt1 from
' select ? + 1 as my_col';
87 execute stmt1
using @arg00 ;
88 select 1 + @arg00 as my_col ;
89 prepare stmt1 from
' select 1 + ? as my_col';
90 execute stmt1
using @arg00 ;
91 ## parameter is within a function
92 # variations on 'substr'
94 select substr(@arg00,1,2) from t1 where a=1 ;
95 prepare stmt1 from ' select substr(?,1,2) from t1 where a=1 ' ;
96 execute stmt1 using @arg00 ;
98 select substr('MySQL',@arg00,5) from t1 where a=1 ;
99 prepare stmt1 from ' select substr(''MySQL'',?,5) from t1 where a=1 ' ;
100 execute stmt1 using @arg00 ;
101 select substr('MySQL',1,@arg00) from t1 where a=1 ;
102 prepare stmt1 from ' select substr(''MySQL'',1,?) from t1 where a=1 ' ;
103 execute stmt1 using @arg00 ;
104 # variations on 'concat'
106 select a , concat(@arg00,b) from t1 order by a;
107 # BUG#3796 Prepared statement, select concat(<parameter>,<column>),wrong result
108 prepare stmt1 from
' select a , concat(?,b) from t1 order by a ' ;
109 execute stmt1
using @arg00;
111 select a , concat(b,@arg00) from t1 order by a ;
112 prepare stmt1 from ' select a , concat(b,?) from t1 order by a ' ;
113 execute stmt1 using @arg00;
115 # variations on 'group_concat'
117 select group_concat(@arg00,b order by a) from t1
119 prepare stmt1 from
' select group_concat(?,b order by a) from t1
121 execute stmt1
using @arg00;
123 select group_concat(b,@arg00 order by a) from t1
125 prepare stmt1 from
' select group_concat(b,? order by a) from t1
127 execute stmt1
using @arg00;
131 set @arg01=
'second' ;
133 select @arg00, @arg01 from t1 where a=1 ;
134 prepare stmt1 from
' select ?, ? from t1 where a=1 ' ;
135 execute stmt1
using @arg00, @arg01 ;
136 # NULL as first and/or last parameter
137 execute stmt1
using @arg02, @arg01 ;
138 execute stmt1
using @arg00, @arg02 ;
139 execute stmt1
using @arg02, @arg02 ;
140 # case derived from client_test.c: test_ps_conj_select()
141 # for BUG#3420: select returned all rows of the table
143 drop
table if exists t5 ;
145 create
table t5 (id1
int(11) not null
default '0',
146 value2 varchar(100), value1 varchar(100)) ;
147 insert into t5 values (1,
'hh',
'hh'),(2,
'hh',
'hh'),
148 (1,
'ii',
'ii'),(2,
'ii',
'ii') ;
149 prepare stmt1 from
' select id1,value1 from t5 where id1=? or value1=? order by id1,value1 ' ;
152 execute stmt1
using @arg00, @arg01 ;
154 # case derived from client_test.c: test_bug1180()
155 # for BUG#1180 optimized away part of WHERE clause
157 drop
table if exists t5 ;
159 create
table t5(session_id
char(9) not null) ;
160 insert into t5 values (
'abc') ;
161 prepare stmt1 from
' select * from t5
162 where ?=''1111'' and session_id = ''abc'' ' ;
164 execute stmt1
using @arg00 ;
166 execute stmt1
using @arg00 ;
168 execute stmt1
using @arg00 ;
172 ##### parameter used for keyword FROM (must fail)
175 select a @arg00 t1 where a=1 ;
177 prepare stmt1 from
' select a ? t1 where a=1 ' ;
178 ##### parameter used for tablename (must fail)
181 select a from @arg00 where a=1 ;
183 prepare stmt1 from
' select a from ? where a=1 ' ;
184 ##### parameter used for keyword WHERE tablename (must fail)
187 select a from t1 @arg00 a=1 ;
189 prepare stmt1 from
' select a from t1 ? a=1 ' ;
191 ##### parameter used in where clause
192 # parameter is not NULL
194 select a FROM t1 where a=@arg00 ;
195 prepare stmt1 from
' select a FROM t1 where a=? ' ;
196 execute stmt1
using @arg00 ;
199 execute stmt1
using @arg00 ;
202 select a FROM t1 where a=@arg00 ;
203 prepare stmt1 from
' select a FROM t1 where a=? ' ;
204 execute stmt1
using @arg00 ;
205 # parameter is not NULL within a function
207 select a FROM t1 where a=sqrt(@arg00) ;
208 prepare stmt1 from
' select a FROM t1 where a=sqrt(?) ' ;
209 execute stmt1
using @arg00 ;
210 # parameter is NULL within a function
212 select a FROM t1 where a=sqrt(@arg00) ;
213 prepare stmt1 from
' select a FROM t1 where a=sqrt(?) ' ;
214 execute stmt1
using @arg00 ;
218 select a FROM t1 where a in (@arg00,@arg01) order by a;
219 prepare stmt1 from ' select a FROM t1 where a in (?,?) order by a ';
220 execute stmt1 using @arg00, @arg01;
221 # case derived from client_test.c: test_bug1500()
225 prepare stmt1 from
' select b FROM t1 where b in (?,?,?) order by b ' ;
226 execute stmt1
using @arg00, @arg01, @arg02 ;
228 prepare stmt1 from
' select b FROM t1 where b like ? ';
230 execute stmt1
using @arg00 ;
232 execute stmt1
using @arg00 ;
234 execute stmt1
using @arg00 ;
235 # case derived from client_test.c: test_ps_null_param():
236 # second part, comparisions with NULL placeholders in prepared
239 insert into t9
set c1= 0, c5 = NULL ;
240 select c5 from t9 where c5 > NULL ;
241 prepare stmt1 from
' select c5 from t9 where c5 > ? ';
242 execute stmt1
using @arg00 ;
243 select c5 from t9 where c5 < NULL ;
244 prepare stmt1 from
' select c5 from t9 where c5 < ? ';
245 execute stmt1
using @arg00 ;
246 select c5 from t9 where c5 = NULL ;
247 prepare stmt1 from
' select c5 from t9 where c5 = ? ';
248 execute stmt1
using @arg00 ;
249 select c5 from t9 where c5 <=> NULL ;
250 prepare stmt1 from
' select c5 from t9 where c5 <=> ? ';
251 execute stmt1
using @arg00 ;
252 delete from t9 where c1= 0 ;
254 ##### parameter used for operator in WHERE clause (must fail)
257 select a FROM t1 where a @arg00 1 ;
259 prepare stmt1 from
' select a FROM t1 where a ? 1 ' ;
261 ##### parameter used in group by clause
263 select a,b FROM t1 where a is not NULL
264 AND b is not NULL
group by a - @arg00 ;
265 prepare stmt1 from
' select a,b FROM t1 where a is not NULL
266 AND b is not NULL group by a - ? ' ;
267 execute stmt1
using @arg00 ;
269 ##### parameter used in having clause
271 select a,b FROM t1 where a is not NULL
272 AND b is not NULL having b <> @arg00 order by a ;
273 prepare stmt1 from
' select a,b FROM t1 where a is not NULL
274 AND b is not NULL having b <> ? order by a ' ;
275 execute stmt1
using @arg00 ;
277 ##### parameter used in order clause
279 select a,b FROM t1 where a is not NULL
280 AND b is not NULL order by a - @arg00 ;
281 prepare stmt1 from
' select a,b FROM t1 where a is not NULL
282 AND b is not NULL order by a - ? ' ;
283 execute stmt1
using @arg00 ;
284 ## What is the semantic of a single parameter (integer >0)
285 # after order by? column number or constant
287 select a,b from t1 order by 2 ;
288 prepare stmt1 from
' select a,b from t1
290 execute stmt1
using @arg00;
292 execute stmt1
using @arg00;
295 execute stmt1
using @arg00;
297 ##### parameter used in limit clause
299 prepare stmt1 from
' select a,b from t1 order by a
302 prepare stmt1 from
' select a,b from t1 order by a limit ? ';
303 execute stmt1
using @arg00;
305 ##### parameter used in many places
310 select sum(a), @arg00 from t1 where a > @arg01
311 and b is not null
group by substr(b,@arg02)
312 having sum(a) <> @arg03 ;
313 prepare stmt1 from ' select sum(a), ? from t1 where a > ?
314 and b is not null
group by substr(b,?)
315 having sum(a) <> ? ';
316 execute stmt1 using @arg00, @arg01, @arg02, @arg03;
319 ################ join tests ################
321 select
'------ join tests ------' as test_sequence ;
325 select first.a as a1, second.a as a2
326 from t1 first, t1 second
327 where first.a = second.a order by a1 ;
328 prepare stmt1 from
' select first.a as a1, second.a as a2
329 from t1 first, t1 second
330 where first.a = second.a order by a1 ';
337 select first.a, @arg00, second.a FROM t1 first, t1 second
338 where @arg01 = first.b or first.a = second.a or second.b = @arg02
339 order by second.a, first.a;
340 prepare stmt1 from
' select first.a, ?, second.a FROM t1 first, t1 second
341 where ? = first.b or first.a = second.a or second.b = ?
342 order by second.a, first.a';
343 execute stmt1
using @arg00, @arg01, @arg02;
345 # test case derived from client_test.c: test_join()
347 drop
table if exists t2 ;
349 create
table t2 as select * from t1 ;
350 set @query1=
'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ;
351 set @query2=
'SELECT * FROM t2 natural join t1 order by t2.a ' ;
352 set @query3=
'SELECT * FROM t2 join t1 using(a) order by t2.a ' ;
353 set @query4=
'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ;
354 set @query5=
'SELECT * FROM t2 natural left join t1 order by t2.a ' ;
355 set @query6=
'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ;
356 set @query7=
'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ;
357 set @query8=
'SELECT * FROM t2 natural right join t1 order by t2.a ' ;
358 set @query9=
'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ;
363 eval select @
query$1 as
'the join statement is:' ;
365 eval prepare stmt1 from @
query$1 ;
377 ################ subquery tests ################
379 select
'------ subquery tests ------' as test_sequence ;
383 prepare stmt1 from
' select a, b FROM t1 outer_table where
384 a = (select a from t1 where b = ''two'') ';
387 ###### parameter in the outer part
389 select a, b FROM t1 outer_table where
390 a = (select a from t1 where b =
'two' ) and b=@arg00 ;
391 prepare stmt1 from
' select a, b FROM t1 outer_table where
392 a = (select a from t1 where b = ''two'') and b=? ';
393 execute stmt1
using @arg00;
394 ###### parameter in the inner part
396 # Bug#4000 (only BDB tables)
397 select a, b FROM t1 outer_table where
398 a = (select a from t1 where b = @arg00 ) and b=
'two' ;
399 prepare stmt1 from
' select a, b FROM t1 outer_table where
400 a = (select a from t1 where b = ? ) and b=''two'' ' ;
401 execute stmt1
using @arg00;
404 select a,b FROM t1 where (a,b) in (select 3, 'three');
405 select a FROM t1 where (a,b) in (select @arg00,@arg01);
406 prepare stmt1 from ' select a FROM t1 where (a,b) in (select ?, ?) ';
407 execute stmt1 using @arg00, @arg01;
409 ###### parameters in the both parts
414 # Bug#4000 (only BDB tables)
415 select a, @arg00, b FROM t1 outer_table where
416 b=@arg01 and a = (select @arg02 from t1 where b = @arg03 ) ;
417 prepare stmt1 from
' select a, ?, b FROM t1 outer_table where
418 b=? and a = (select ? from t1 where b = ? ) ' ;
419 execute stmt1
using @arg00, @arg01, @arg02, @arg03 ;
422 prepare stmt1 from
'select c4 FROM t9 where
423 c13 = (select MAX(b) from t1 where a = ?) and c22 = ? ' ;
424 execute stmt1
using @arg01, @arg02;
426 ######## correlated subquery
428 prepare stmt1 from
' select a, b FROM t1 outer_table where
429 a = (select a from t1 where b = outer_table.b ) order by a ';
430 # also Bug#4000 (only BDB tables)
431 # Bug#4106 : ndb table, query with correlated subquery, wrong result
433 # test case derived from client_test.c: test_subqueries_ref
437 prepare stmt1 from
' SELECT a as ccc from t1 outr where a+1=
438 (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
440 deallocate prepare stmt1 ;
445 ###### parameter in the outer part
447 # Bug#4000 (only BDB tables)
448 select a, b FROM t1 outer_table where
449 a = (select a from t1 where b = outer_table.b ) and b=@arg00 ;
450 prepare stmt1 from
' select a, b FROM t1 outer_table where
451 a = (select a from t1 where b = outer_table.b) and b=? ';
452 # also Bug#4000 (only BDB tables)
453 execute stmt1
using @arg00;
455 ###### parameter in the inner part
457 select a, b FROM t1 outer_table where
458 a = (select a from t1 where a = @arg00 and b = outer_table.b) and b=
'two' ;
459 prepare stmt1 from
' select a, b FROM t1 outer_table where
460 a = (select a from t1 where a = ? and b = outer_table.b) and b=''two'' ' ;
461 execute stmt1
using @arg00;
464 select a, b FROM t1 outer_table where
465 a = (select a from t1 where outer_table.a = @arg00 and a=2) and b=
'two' ;
466 prepare stmt1 from
' select a, b FROM t1 outer_table where
467 a = (select a from t1 where outer_table.a = ? and a=2) and b=''two'' ' ;
468 execute stmt1
using @arg00;
470 ###### parameters in the both parts
475 # Bug#4000 (only BDB tables)
476 select a, @arg00, b FROM t1 outer_table where
477 b=@arg01 and a = (select @arg02 from t1 where outer_table.b = @arg03
478 and outer_table.a=a ) ;
479 prepare stmt1 from
' select a, ?, b FROM t1 outer_table where
480 b=? and a = (select ? from t1 where outer_table.b = ?
481 and outer_table.a=a ) ' ;
482 # also Bug#4000 (only BDB tables)
483 execute stmt1
using @arg00, @arg01, @arg02, @arg03 ;
485 ###### subquery after from
489 from ( select a - @arg00 as a from t1 where a=@arg00 ) as t2
491 prepare stmt1 from ' select a, ?
492 from ( select a - ? as a from t1 where a=? ) as t2
494 execute stmt1 using @arg00, @arg00, @arg00, @arg01 ;
496 ###### subquery in select list
497 # test case derived from client_test.c: test_create_drop
499 drop
table if exists t2 ;
501 create
table t2 as select * from t1;
502 prepare stmt1 from
' select a in (select a from t2) from t1 ' ;
504 # test case derived from client_test.c: test_selecttmp()
506 drop
table if exists t5, t6, t7 ;
508 create
table t5 (a
int , b
int) ;
509 create
table t6 like t5 ;
510 create
table t7 like t5 ;
511 insert into t5 values (0, 100), (1, 2), (1, 3), (2, 2), (2, 7),
513 insert into t6 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1) ;
514 insert into t7 values (3, 3), (2, 2), (1, 1) ;
515 prepare stmt1 from
' select a, (select count(distinct t5.b) as sum from t5, t6
516 where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b
517 group by t5.a order by sum limit 1) from t7 ' ;
524 drop
table t5, t6, t7 ;
527 ###### heavy modified case derived from client_test.c: test_distinct()
529 drop
table if exists t2 ;
531 create
table t2 as select * from t9;
532 ## unusual and complex SELECT without parameters
534 (SELECT SUM(c1 + c12 + 0.0) FROM t2
535 where (t9.c2 - 0e-3) = t2.c2
536 GROUP BY t9.c15 LIMIT 1) as scalar_s,
537 exists (select 1.0e+0 from t2
538 where t2.c3 * 9.0000000000 = t9.c4) as exists_s,
539 c5 * 4 in (select c6 + 0.3e+1 from t2) as in_s,
540 (c7 - 4, c8 - 4) in (select c9 + 4.0, c10 + 40e-1 from t2) as in_row_s
542 (select c25 x, c32 y from t2) tt WHERE x = c25 ' ;
544 prepare stmt1 from @stmt ;
546 # Result log was disabled upon test case failure in the optimized build.
552 ## now expand the terrible SELECT to EXPLAIN SELECT
553 set @stmt= concat(
'explain ',@stmt);
555 prepare stmt1 from @stmt ;
558 # Bug#4271 prepared explain complex select, second executes crashes the server
561 ## replace the constants of the complex SELECT with parameters
563 (SELECT SUM(c1+c12+?) FROM t2 where (t9.c2-?)=t2.c2
564 GROUP BY t9.c15 LIMIT 1) as scalar_s,
565 exists (select ? from t2
566 where t2.c3*?=t9.c4) as exists_s,
567 c5*? in (select c6+? from t2) as in_s,
568 (c7-?, c8-?) in (select c9+?, c10+? from t2) as in_row_s
570 (select c25 x, c32 y from t2) tt WHERE x =c25 ' ;
574 set @arg03= 9.0000000000 ;
582 prepare stmt1 from @stmt ;
583 execute stmt1
using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
584 @arg07, @arg08, @arg09 ;
586 execute stmt1
using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
587 @arg07, @arg08, @arg09 ;
588 ## now expand the terrible SELECT to EXPLAIN SELECT
589 set @stmt= concat(
'explain ',@stmt);
591 prepare stmt1 from @stmt ;
592 execute stmt1
using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
593 @arg07, @arg08, @arg09 ;
595 execute stmt1
using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
596 @arg07, @arg08, @arg09 ;
601 ##### test case derived from client_test.c: test_bug4079()
603 select 1 < (select a from t1) ;
604 prepare stmt1 from
' select 1 < (select a from t1) ' ;
607 # Bug#5066 embedded server, select after failed subquery provides wrong result
608 # (two additional records, all column values NULL)
611 ################ union tests ################
613 select
'------ union tests ------' as test_sequence ;
617 prepare stmt1 from
' select a FROM t1 where a=1
619 select a FROM t1 where a=1 ';
621 # Bug#3577: the second execute crashes mysqld
623 prepare stmt1 from
' select a FROM t1 where a=1
625 select a FROM t1 where a=1 ';
627 # test case derived from client_test.c: test_bad_union()
629 prepare stmt1 from
' SELECT 1, 2 union SELECT 1 ' ;
631 prepare stmt1 from
' SELECT 1 union SELECT 1, 2 ' ;
633 prepare stmt1 from
' SELECT * from t1 union SELECT 1 ' ;
635 prepare stmt1 from
' SELECT 1 union SELECT * from t1 ' ;
638 ##### everything in the first table
639 # one parameter as constant in the first table
641 select @arg00 FROM t1 where a=1
643 select 1 FROM t1 where a=1;
644 prepare stmt1 from
' select ? FROM t1 where a=1
646 select 1 FROM t1 where a=1 ' ;
647 execute stmt1
using @arg00;
649 ##### everything in the second table
650 # one parameter as constant
652 select 1 FROM t1 where a=1
654 select @arg00 FROM t1 where a=1;
655 prepare stmt1 from
' select 1 FROM t1 where a=1
657 select ? FROM t1 where a=1 ' ;
658 execute stmt1
using @arg00;
660 # one parameter in every table
662 select @arg00 FROM t1 where a=1
664 select @arg00 FROM t1 where a=1;
665 prepare stmt1 from
' select ? FROM t1 where a=1
667 select ? FROM t1 where a=1 ';
668 # BUG#3811 wrong result, prepared statement, union,
669 # parameter in result column list
670 execute stmt1
using @arg00, @arg00;
671 prepare stmt1 from
' select ?
674 execute stmt1
using @arg00, @arg00;
681 select @arg00 FROM t1 where a=@arg01
683 select @arg02 FROM t1 where a=@arg03;
684 prepare stmt1 from
' select ? FROM t1 where a=?
686 select ? FROM t1 where a=? ' ;
687 execute stmt1
using @arg00, @arg01, @arg02, @arg03;
689 ## increased complexity
692 # Bug#3686 the wrong server response was 1140 Mixing of GROUP columns ..
693 prepare stmt1 from
' select sum(a) + 200, ? from t1
695 select sum(a) + 200, 1 from t1
697 execute stmt1
using @arg00;
699 set @Oporto=
'Oporto' ;
700 set @Lisboa=
'Lisboa' ;
706 select @Oporto,@Lisboa,@0,@1,@2,@3,@4 ;
709 select sum(a) + 200 as the_sum, @Oporto as the_town from t1
712 select sum(a) + 200, @Lisboa from t1
715 prepare stmt1 from
' select sum(a) + 200 as the_sum, ? as the_town from t1
718 select sum(a) + 200, ? from t1
720 execute stmt1
using @Oporto, @Lisboa;
723 ## union + where + group by
724 select sum(a) + 200 as the_sum, @Oporto as the_town from t1
728 select sum(a) + 200, @Lisboa from t1
732 prepare stmt1 from
' select sum(a) + 200 as the_sum, ? as the_town from t1
736 select sum(a) + 200, ? from t1
739 execute stmt1
using @Oporto, @1, @Lisboa, @2;
741 ## union + where + group by + having
742 select sum(a) + 200 as the_sum, @Oporto as the_town from t1
747 select sum(a) + 200, @Lisboa from t1
752 prepare stmt1 from
' select sum(a) + 200 as the_sum, ? as the_town from t1
757 select sum(a) + 200, ? from t1
761 execute stmt1
using @Oporto, @1, @2, @Lisboa, @2, @3;
764 ################ explain select tests ################
766 select
'------ explain select tests ------' as test_sequence ;
769 # table with many column types
770 prepare stmt1 from
' explain select * from t9 ' ;