~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/t/ps_5merge.test

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
###############################################
 
2
#                                             #
 
3
#  Prepared Statements test on MERGE tables   #
 
4
#                                             #
 
5
###############################################
 
6
 
 
7
#    
 
8
# NOTE: PLEASE SEE ps_1general.test (bottom) 
 
9
#       BEFORE ADDING NEW TEST CASES HERE !!!
 
10
 
 
11
use test;
 
12
 
 
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 ;
 
22
 
 
23
create table t1
 
24
(
 
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
 
30
(
 
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 NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_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
 
44
 
 
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
 
51
 
 
52
# Lets's try the same tests with INSERT_METHOD=LAST
 
53
drop table t1, t9 ;
 
54
create table t1
 
55
(
 
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
 
61
(
 
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 NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_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
 
75
 
 
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
 
82
 
 
83
drop table t1, t1_1, t1_2, 
 
84
           t9_1, t9_2, t9;
 
85
 
 
86
# End of 4.1 tests