mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / t / ps_5merge.test
blobe6ce9bf42d31776ab872eefbec489c224caaf074
1 ###############################################
2 #                                             #
3 #  Prepared Statements test on MERGE tables   #
4 #                                             #
5 ###############################################
7 #    
8 # NOTE: PLEASE SEE ps_1general.test (bottom) 
9 #       BEFORE ADDING NEW TEST CASES HERE !!!
11 use test;
13 --disable_warnings
14 drop table if exists t1, t1_1, t1_2,
15      t9, t9_1, t9_2;
16 --enable_warnings
17 let $type= 'MYISAM' ;
18 -- source include/ps_create.inc
19 rename table t1 to t1_1, t9 to t9_1 ;
20 -- source include/ps_create.inc
21 rename table t1 to t1_2, t9 to t9_2 ;
23 create table t1
25   a int, b varchar(30),
26   primary key(a)
27 ) ENGINE = MERGE UNION=(t1_1,t1_2)
28 INSERT_METHOD=FIRST;
29 create table t9
31   c1  tinyint, c2  smallint, c3  mediumint, c4  int,
32   c5  integer, c6  bigint, c7  float, c8  double,
33   c9  double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
34   c13 date, c14 datetime, c15 timestamp, c16 time,
35   c17 year, c18 tinyint, c19 bool, c20 char,
36   c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
37   c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
38   c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
39   c32 set('monday', 'tuesday', 'wednesday'),
40   primary key(c1)
41 )  ENGINE = MERGE UNION=(t9_1,t9_2)
42 INSERT_METHOD=FIRST;
43 -- source include/ps_renew.inc
45 -- source include/ps_query.inc
46 -- source include/ps_modify.inc
47 # no test of ps_modify1, because insert .. select 
48 # is not allowed on MERGE tables
49 # -- source include/ps_modify1.inc
50 -- source include/ps_conv.inc
52 # Lets's try the same tests with INSERT_METHOD=LAST
53 drop table t1, t9 ;
54 create table t1
56   a int, b varchar(30),
57   primary key(a)
58 ) ENGINE = MERGE UNION=(t1_1,t1_2)
59 INSERT_METHOD=LAST;
60 create table t9
62   c1  tinyint, c2  smallint, c3  mediumint, c4  int,
63   c5  integer, c6  bigint, c7  float, c8  double,
64   c9  double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
65   c13 date, c14 datetime, c15 timestamp, c16 time,
66   c17 year, c18 tinyint, c19 bool, c20 char,
67   c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
68   c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
69   c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
70   c32 set('monday', 'tuesday', 'wednesday'),
71   primary key(c1)
72 )  ENGINE = MERGE UNION=(t9_1,t9_2)
73 INSERT_METHOD=LAST;
74 -- source include/ps_renew.inc
76 -- source include/ps_query.inc
77 -- source include/ps_modify.inc
78 # no test of ps_modify1, because insert .. select
79 # is not allowed on MERGE tables
80 # -- source include/ps_modify1.inc
81 -- source include/ps_conv.inc
83 drop table t1, t1_1, t1_2, 
84            t9_1, t9_2, t9;
86 # End of 4.1 tests