1 ###################### ps_general.test #######################
3 # basic and miscellaneous tests for prepared statements #
5 ##############################################################
8 # NOTE: PLEASE SEE THE DETAILED DESCRIPTION AT THE BOTTOM OF THIS FILE
9 # BEFORE ADDING NEW TEST CASES HERE !!!
12 drop table if exists t5, t6, t7, t8;
13 drop database if exists mysqltest ;
15 # Cleanup from other tests
16 drop database if exists client_test_db;
17 drop database if exists testtets;
18 drop table if exists t1Aa,t2Aa,v1Aa,v2Aa;
19 drop view if exists t1Aa,t2Aa,v1Aa,v2Aa;
23 select '------ basic tests ------' as test_sequence ;
27 # create the tables (t1 and t9) used in many tests
28 --source include/ps_create.inc
29 # insert data into these tables
30 --source include/ps_renew.inc
33 ################ The basic functions ################
35 # 1. PREPARE stmt_name FROM <preparable statement>;
36 # <preparable statement> ::=
39 # The statement may contain question marks as placeholders for parameters.
41 # Bind a statement name to a string containing a SQL statement and
42 # send it to the server. The server will parse the statement and
43 # reply with "Query Ok" or an error message.
45 PREPARE stmt FROM ' select * from t1 where a = ? ' ;
47 # 2. EXECUTE stmt_name [USING @var [, @var ]];
48 # Current values of supplied variables are used as parameters.
50 # Send the server the order to execute the statement and supply values
51 # for the input parameters needed.
52 # If no error occurs the server reply will be identical to the reply for
53 # the query used in PREPARE with question marks replaced with values of
54 # the input variables.
57 EXECUTE stmt USING @var ;
58 # The non prepared statement with the same server reply would be:
59 select * from t1 where a = @var ;
61 # 3. DEALLOCATE PREPARE stmt_name;
63 # Send the server the order to drop the parse informations.
64 # The server will reply with "Query Ok" or an error message.
65 DEALLOCATE PREPARE stmt ;
67 ################ PREPARE ################
68 # prepare without parameter
69 prepare stmt1 from ' select 1 as my_col ' ;
70 # prepare with parameter
71 prepare stmt1 from ' select ? as my_col ' ;
72 # prepare must fail (incomplete statements/wrong syntax)
73 --error ER_PARSE_ERROR
75 --error ER_PARSE_ERROR
77 --error ER_PARSE_ERROR
79 --error ER_PARSE_ERROR
80 prepare_garbage stmt1 from ' select 1 ' ;
81 --error ER_PARSE_ERROR
82 prepare stmt1 from_garbage ' select 1 ' ;
83 --error ER_PARSE_ERROR
84 prepare stmt1 from ' select_garbage 1 ' ;
85 --error ER_PARSE_ERROR
86 prepare from ' select 1 ' ;
87 --error ER_PARSE_ERROR
88 prepare stmt1 ' select 1 ' ;
89 --error ER_PARSE_ERROR
90 prepare ? from ' select ? as my_col ' ;
91 # statement in variable
92 set @arg00='select 1 as my_col';
93 prepare stmt1 from @arg00;
94 # prepare must fail (query variable is empty)
96 --error ER_EMPTY_QUERY
97 prepare stmt1 from @arg00;
99 # prepare must fail (query variable is NULL)
100 --error ER_PARSE_ERROR
101 prepare stmt1 from @arg01;
103 prepare stmt1 from ' select * from t1 where a <= 2 ' ;
104 # prepare must fail (column x does not exist)
105 --error ER_BAD_FIELD_ERROR
106 prepare stmt1 from ' select * from t1 where x <= 2 ' ;
107 # cases derived from client_test.c: test_null()
108 # prepare must fail (column x does not exist)
109 --error ER_BAD_FIELD_ERROR
110 prepare stmt1 from ' insert into t1(a,x) values(?,?) ' ;
111 --error ER_BAD_FIELD_ERROR
112 prepare stmt1 from ' insert into t1(x,a) values(?,?) ' ;
114 drop table if exists not_exist ;
116 # prepare must fail (table does not exist)
117 --error ER_NO_SUCH_TABLE
118 prepare stmt1 from ' select * from not_exist where a <= 2 ' ;
120 # case derived from client_test.c: test_prepare_syntax()
121 # prepare must fail (incomplete statement)
122 --error ER_PARSE_ERROR
123 prepare stmt1 from ' insert into t1 values(? ' ;
124 --error ER_PARSE_ERROR
125 prepare stmt1 from ' select a, b from t1
126 where a=? and where ' ;
128 ################ EXECUTE ################
129 # execute must fail (statement never_prepared never prepared)
130 --error ER_UNKNOWN_STMT_HANDLER
131 execute never_prepared ;
132 # execute must fail (prepare stmt1 just failed,
133 # but there was a successful prepare of stmt1 before)
134 prepare stmt1 from ' select * from t1 where a <= 2 ' ;
135 --error ER_NO_SUCH_TABLE
136 prepare stmt1 from ' select * from not_exist where a <= 2 ' ;
137 --error ER_UNKNOWN_STMT_HANDLER
140 # drop the table between prepare and execute
147 insert into t5( a, b, c) values( 1, 'original table', 1);
148 prepare stmt2 from ' select * from t5 ' ;
151 # execute must fail (table was dropped after prepare)
152 --error ER_NO_SUCH_TABLE
154 # cases derived from client_test.c: test_select_prepare()
155 # 1. drop + create table (same column names/types/order)
156 # between prepare and execute
163 insert into t5( a, b, c) values( 9, 'recreated table', 9);
166 # 2. drop + create table (same column names/types but different order)
167 # between prepare and execute
174 insert into t5( a, b, c) values( 9, 'recreated table', 9);
177 # 3. drop + create table (same column names/types/order+extra column)
178 # between prepare and execute
184 d timestamp default '2008-02-23 09:23:45'
186 insert into t5( a, b, c) values( 9, 'recreated table', 9);
189 # 4. drop + create table (same column names/types, different order +
190 # additional column) between prepare and execute
194 d timestamp default '2008-02-23 09:23:45',
198 insert into t5( a, b, c) values( 9, 'recreated table', 9);
201 # 5. drop + create table (same column names/order, different types)
202 # between prepare and execute
205 a timestamp default '2004-02-29 18:01:59',
209 insert into t5( b, c) values( 'recreated table', 9);
212 # 6. drop + create table (same column types/order, different names)
213 # between prepare and execute
220 insert into t5( f1, f2, f3) values( 9, 'recreated table', 9);
224 # execute without parameter
225 prepare stmt1 from ' select * from t1 where a <= 2 ' ;
227 # execute with parameter
230 prepare stmt1 from ' select * from t1 where a <= ? ' ;
231 execute stmt1 using @arg00;
232 # execute must fail (too small number of parameters)
233 --error ER_WRONG_ARGUMENTS
235 # execute must fail (too big number of parameters)
236 --error ER_WRONG_ARGUMENTS
237 execute stmt1 using @arg00, @arg01;
238 # execute must fail (parameter is not set)
239 execute stmt1 using @not_set;
241 ################ DEALLOCATE ################
242 # deallocate must fail (the statement 'never_prepared' was never prepared)
243 --error ER_UNKNOWN_STMT_HANDLER
244 deallocate prepare never_prepared ;
245 # deallocate must fail (prepare stmt1 just failed,
246 # but there was a successful prepare before)
247 prepare stmt1 from ' select * from t1 where a <= 2 ' ;
248 --error ER_NO_SUCH_TABLE
249 prepare stmt1 from ' select * from not_exist where a <= 2 ' ;
250 --error ER_UNKNOWN_STMT_HANDLER
251 deallocate prepare stmt1;
257 prepare stmt2 from ' select a,b from t5 where a <= 2 ' ;
259 # deallocate prepared statement where the table was dropped after prepare
260 deallocate prepare stmt2;
262 ## parallel use of more than one prepared statement handlers
263 # switch between different queries
264 prepare stmt1 from ' select a from t1 where a <= 2 ' ;
265 prepare stmt2 from ' select b from t1 where a <= 2 ' ;
268 # switch between statement handlers of the same query
269 prepare stmt1 from ' select a from t1 where a <= 2 ' ;
270 prepare stmt2 from ' select a from t1 where a <= 2 ' ;
273 deallocate prepare stmt1 ;
274 # Will the deallocate of stmt1 with the same query affect stmt2 ?
278 select '------ show and misc tests ------' as test_sequence ;
282 drop table if exists t2;
286 a int primary key, b char(10)
289 ################ SHOW COMMANDS ################
290 prepare stmt4 from ' show databases ';
292 prepare stmt4 from ' show tables from test like ''t2%'' ';
294 prepare stmt4 from ' show columns from t2 where field in (select ?) ';
296 execute stmt4 using @arg00;
298 execute stmt4 using @arg00;
300 execute stmt4 using @arg00;
302 prepare stmt4 from ' show columns from t2 from test like ''a%'' ';
304 create index t2_idx on t2(b);
305 prepare stmt4 from ' show index from t2 from test ';
307 prepare stmt4 from ' show table status from test like ''t2%'' ';
308 # egalize date and time values
309 --replace_column 8 # 12 # 13 # 14 #
310 # Bug#4288 : prepared statement 'show table status ..', wrong output on execute
312 # try the same with the big table
313 prepare stmt4 from ' show table status from test like ''t9%'' ';
314 # egalize date and time values
315 --replace_column 8 # 12 # 13 # 14 #
318 prepare stmt4 from ' show status like ''Threads_running'' ';
321 prepare stmt4 from ' show variables like ''sql_mode'' ';
323 prepare stmt4 from ' show engine myisam logs ';
325 prepare stmt4 from ' show grants for user ';
326 prepare stmt4 from ' show create table t2 ';
327 prepare stmt4 from ' show master status ';
328 prepare stmt4 from ' show master logs ';
329 prepare stmt4 from ' show slave status ';
330 prepare stmt4 from ' show warnings limit 20 ';
331 prepare stmt4 from ' show errors limit 20 ';
332 prepare stmt4 from ' show storage engines ';
333 # The output depends upon the precise order in which
334 # storage engines are registered, so we switch off the output.
339 ################ MISC STUFF ################
340 ## get a warning and an error
341 # cases derived from client_test.c: test_warnings(), test_errors()
343 drop table if exists t5;
345 prepare stmt1 from ' drop table if exists t5 ' ;
347 prepare stmt1 from ' drop table t5 ' ;
348 --error ER_BAD_TABLE_ERROR
352 # cases derived from client_test.c: test_select_version()
354 # TODO: Metadata check is temporary disabled here, because metadata of
355 # this statement also depends on @@version contents and you can't apply
356 # replace_column and replace_result to it. It will be enabled again when
357 # support of replace_column and replace_result on metadata will be
361 prepare stmt1 from ' SELECT @@version ' ;
362 # egalize the version
363 --replace_column 1 <version>
367 ## do @var:= and set @var=
368 # cases derived from client_test.c: test_do_set()
369 prepare stmt_do from ' do @var:= (1 in (select a from t1)) ' ;
370 prepare stmt_set from ' set @var= (1 in (select a from t1)) ' ;
376 select @var as 'content of @var is:' ;
380 select @var as 'content of @var is:' ;
384 # the same test with a table containing one column and 'select *'
386 drop table if exists t5 ;
388 create table t5 (a int) ;
389 prepare stmt_do from ' do @var:= (1 in (select a from t5)) ' ;
390 prepare stmt_set from ' set @var= (1 in (select a from t5)) ' ;
396 select @var as 'content of @var is:' ;
400 select @var as 'content of @var is:' ;
405 deallocate prepare stmt_do ;
406 deallocate prepare stmt_set ;
408 ## nonsense like prepare of prepare,execute or deallocate
409 --error ER_UNSUPPORTED_PS
410 prepare stmt1 from ' prepare stmt2 from '' select 1 '' ' ;
411 --error ER_UNSUPPORTED_PS
412 prepare stmt1 from ' execute stmt2 ' ;
413 --error ER_UNSUPPORTED_PS
414 prepare stmt1 from ' deallocate prepare never_prepared ' ;
416 ## We don't support alter view as prepared statements
417 --error ER_UNSUPPORTED_PS
418 prepare stmt1 from 'alter view v1 as select 2';
420 ## switch the database connection
421 --error ER_UNSUPPORTED_PS
422 prepare stmt4 from ' use test ' ;
424 ## create/drop database
425 prepare stmt3 from ' create database mysqltest ';
426 create database mysqltest ;
427 prepare stmt3 from ' drop database mysqltest ';
428 drop database mysqltest ;
430 #### table related commands
432 prepare stmt3 from ' describe t2 ';
435 --error ER_NO_SUCH_TABLE
438 --error ER_UNSUPPORTED_PS
439 prepare stmt3 from ' lock tables t1 read ' ;
440 --error ER_UNSUPPORTED_PS
441 prepare stmt3 from ' unlock tables ' ;
442 ## Load/Unload table contents
444 --let $datafile = $MYSQLTEST_VARDIR/tmp/data.txt
446 --remove_file $datafile
448 --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
449 --error ER_UNSUPPORTED_PS
450 eval prepare stmt1 from ' load data infile ''$datafile''
451 into table t1 fields terminated by ''\t'' ';
452 --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
453 eval prepare stmt1 from ' select * into outfile ''$datafile'' from t1 ';
456 prepare stmt1 from ' optimize table t1 ' ;
457 prepare stmt1 from ' analyze table t1 ' ;
458 prepare stmt1 from ' checksum table t1 ' ;
459 prepare stmt1 from ' repair table t1 ' ;
461 --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
462 --error ER_UNSUPPORTED_PS
463 eval prepare stmt1 from ' restore table t1 from ''$datafile'' ' ;
464 --remove_file $datafile
467 --error ER_UNSUPPORTED_PS
468 prepare stmt1 from ' handler t1 open ';
472 prepare stmt3 from ' commit ' ;
473 prepare stmt3 from ' rollback ' ;
476 ## switch the sql_mode
477 prepare stmt4 from ' SET sql_mode=ansi ';
479 # check if the sql_mode is now ansi
481 prepare stmt4 from ' SET sql_mode="" ';
483 # check if the sql_mode is not ansi
485 # Will a switch of the sqlmode affect the execution of already prepared
487 prepare stmt5 from ' select ''2'' || ''3'' ' ;
493 prepare stmt1 from ' flush local privileges ' ;
494 prepare stmt1 from ' reset query cache ' ;
495 prepare stmt1 from ' KILL 0 ';
498 # cases derived from client_test.c: test_explain_bug()
499 prepare stmt1 from ' explain select a from t1 order by b ';
500 # PS protocol gives slightly different metadata
501 --disable_ps_protocol
506 prepare stmt1 from ' explain select a from t1 where a > ? order by b ';
508 execute stmt1 using @arg00;
512 ## parameters with probably problematic characters (quote, double quote)
513 # cases derived from client_test.c: test_logs()
516 drop table if exists t2;
518 create table t2 (id smallint, name varchar(20)) ;
519 prepare stmt1 from ' insert into t2 values(?, ?) ' ;
521 set @arg00= 'MySQL - Open Source Database' ;
524 set @arg03= "my'sql'" ;
525 set @arg04= 'my"sql"' ;
526 insert into t2 values ( @id , @arg00 );
527 insert into t2 values ( @id , @arg01 );
528 insert into t2 values ( @id , @arg02 );
529 insert into t2 values ( @id , @arg03 );
530 insert into t2 values ( @id , @arg04 );
531 prepare stmt1 from ' select * from t2 where id= ? and name= ? ';
532 execute stmt1 using @id, @arg00 ;
533 execute stmt1 using @id, @arg01 ;
534 execute stmt1 using @id, @arg02 ;
535 execute stmt1 using @id, @arg03 ;
536 execute stmt1 using @id, @arg04 ;
539 ################ CREATE/DROP/ALTER/RENAME TESTS ################
541 select '------ create/drop/alter/rename tests ------' as test_sequence ;
545 drop table if exists t2, t3;
549 prepare stmt_drop from ' drop table if exists t2 ' ;
555 prepare stmt_create from ' create table t2 (
556 a int primary key, b char(10)) ';
558 prepare stmt3 from ' create table t3 like t2 ';
562 ## CREATE TABLE .. SELECT
564 prepare stmt3 from ' create table t3 (m int) select ? as m ' ;
565 # Bug#4280 server hangs, prepared "create table .. as select ? .."
566 execute stmt3 using @arg00;
570 prepare stmt3 from ' create index t2_idx on t2(b) ';
571 prepare stmt3 from ' drop index t2_idx on t2 ' ;
572 prepare stmt3 from ' alter table t2 drop primary key ';
576 drop table if exists new_t2;
578 prepare stmt3 from ' rename table t2 to new_t2 ';
580 --error ER_TABLE_EXISTS_ERROR
582 rename table new_t2 to t2;
584 ## RENAME more than on TABLE within one statement
585 # cases derived from client_test.c: test_rename()
586 prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
587 create table t5 (a int) ;
588 # rename must fail, t7 does not exist
589 # Clean up the filename here because embedded server reports whole path
590 --replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' t7.frm t7
591 --error ER_FILE_NOT_FOUND
593 create table t7 (a int) ;
594 # rename, t5 -> t6 and t7 -> t8
596 # rename must fail, t5 and t7 does not exist t6 and t8 already exist
597 --error ER_TABLE_EXISTS_ERROR
599 rename table t6 to t5, t8 to t7 ;
600 # rename, t5 -> t6 and t7 -> t8
605 ################ BIG STATEMENT TESTS ################
607 select '------ big statement tests ------' as test_sequence ;
609 # The following tests use huge numbers of lines, characters or parameters
610 # per prepared statement.
611 # I assume the server and also the client (mysqltest) are stressed.
613 # Attention: The limits used are NOT derived from the manual
617 let $my_stmt= select 'ABC' as my_const_col from t1 where
668 eval prepare stmt1 from "$my_stmt" ;
672 ## many characters ( about 1400 )
674 let $my_stmt= select 'ABC' as my_const_col FROM t1 WHERE
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' AND
691 '1234567890123456789012345678901234567890123456789012345678901234567890'
692 = '1234567890123456789012345678901234567890123456789012345678901234567890' ;
694 eval prepare stmt1 from "$my_stmt" ;
699 ## many parameters ( 50 )
753 select 'ABC' as my_const_col FROM t1 WHERE
754 @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
755 @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
756 @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
757 @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
758 @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
759 @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
761 prepare stmt1 from ' select ''ABC'' as my_const_col FROM t1 WHERE
762 ? = ? and ? = ? and ? = ? and ? = ? and
763 ? = ? and ? = ? and ? = ? and ? = ? and
764 ? = ? and ? = ? and ? = ? and ? = ? and
765 ? = ? and ? = ? and ? = ? and ? = ? and
766 ? = ? and ? = ? and ? = ? and ? = ? and
767 ? = ? and ? = ? and ? = ? and ? = ? and
770 @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
771 @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
772 @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
773 @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
774 @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
775 @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
778 @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07,
779 @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, @arg17,
780 @arg20, @arg21, @arg22, @arg23, @arg24, @arg25, @arg26, @arg27,
781 @arg30, @arg31, @arg32, @arg33, @arg34, @arg35, @arg36, @arg37,
782 @arg40, @arg41, @arg42, @arg43, @arg44, @arg45, @arg46, @arg47,
783 @arg50, @arg51, @arg52, @arg53, @arg54, @arg55, @arg56, @arg57,
786 # cases derived from client_test.c: test_mem_overun()
788 drop table if exists t5 ;
794 set @string= 'create table t5( ' ;
795 let $1=`select @col_num - 1` ;
798 eval set @string= concat(@string, 'c$1 int,') ;
801 set @string= concat(@string, 'c0 int)' );
803 select @string as "" ;
804 prepare stmt1 from @string ;
808 set @string= 'insert into t5 values(' ;
809 let $1=`select @col_num - 1` ;
812 eval set @string= concat(@string, '1 ,') ;
815 eval set @string= concat(@string, '1 )') ;
817 select @string as "" ;
818 prepare stmt1 from @string ;
821 prepare stmt1 from ' select * from t5 ' ;
823 # prevent too long lines
831 drop table t1, t5, t9;
833 ##### RULES OF THUMB TO PRESERVE THE SYSTEMATICS OF THE PS TEST CASES #####
835 # 0. You don't have the time to
836 # - read and pay attention to these rules of thumb
837 # - accept that QA may move your test case to a different place
838 # (I will not change your code!!) .
839 # Please append your test case to
842 # 1. You have more time and want to get as much value from you test case as
843 # possible. Please try to make the following decisions:
845 # Will the execution or result of the sub test case depend on the
846 # properties of a storage engine ?
848 # NO --> alter t/ps_1general.test (Example: Command with syntax error)
849 # If you need a table, please try to use
850 # t1 - very simple table
851 # t9 - table with nearly all available column types
854 # The structure and the content of these tables can be found in
855 # include/ps_create.inc CREATE TABLE ...
856 # include/ps_renew.inc DELETE all rows and INSERT some rows
858 # Both tables are managed by the same storage engine.
859 # The type of the storage engine is stored in the variable
860 # '$type' . In ps_1general.test $type is set to 'MYISAM'.
862 # Please feel free to source ps_create.inc or ps_renew.inc
863 # whenever you think it helps. But please restore the original
864 # state of these tables after your tests, because the following
865 # statements may depend on it.
870 # Is it possible to apply the sub test case to all table types ?
871 # YES --> alter include/ps_query.inc (for SELECTs)
872 # include/ps_modify.inc (for INSERT/UPDATE/DELETE)
873 # include/ps_modify1.inc (also for INSERT/UPDATE/DELETE,
874 # but t/ps_5merge.test will not source that file)
875 # Please try to find an appropriate place within the file.
876 # It would be nice if we have some systematics in the
877 # order of the sub test cases (if possible).
879 # Please be aware, that
880 # include: ps_query.inc, ps_modify.inc, ps_modify1.inc
881 # will be sourced by several test case files stored within the
882 # subdirectory 't'. So every change here will affect several test
888 # Append the sub test case to the appropriate
889 # ps_<number><table type>.test .
891 # 2. The current structure of the PS tests
893 # t/ps_1general.test Check of basic PS features, SHOW commands and DDL
894 # The tests should not depend on the table type.
896 # t/ps_2myisam Check of PS on tables of type MYISAM .
897 # t/ps_3innodb Check of PS on tables of type InnoDB .
899 # t/ps_6bdb Check of PS on tables of type BDB .
900 # All storage engine related tests use the variable $type to hold the
901 # name of the storage engine.
903 # include/ps_query.inc test cases with SELECT/...
904 # These test cases should not modify the content or
905 # the structure (DROP/ALTER..) of the tables
907 # include/ps_modify.inc test cases with INSERT/UPDATE/...
908 # These test cases should not modify the structure
909 # (DROP/ALTER..) of the tables
911 # These two test sequences will be applied to all table types .
913 # include/ps_modify1.inc test cases with INSERT/UPDATE/...
914 # This test sequences will be applied to all table types
915 # except MERGE tables.
917 # include/ps_create.inc DROP and CREATE of the tables
919 # include/ps_renew.inc DELETE all rows and INSERT some rows, that means
920 # recreate the original content of these tables.
921 # Please do not alter the commands concerning these two tables.
923 # Please feel free and encouraged to exploit the current code sharing
924 # mechanism of the 'ps_<number><table type>' test cases. It is an convenient
925 # way to check all storage engines.
927 # Thank you for reading these rules of thumb.