Debian Codegraph @

mysql-test/suite/parts/inc/partition_basic.inc

raw
1 ################################################################################
2 # inc/partition_basic.inc #
3 # #
4 # Purpose: #
5 # Basic tests around create partitioned table with/without PRIMARY KEY and #
6 # /or UNIQUE INDEX #
7 # #
8 #------------------------------------------------------------------------------#
9 # Original Author: mleich #
10 # Original Date: 2006-03-05 #
11 # Change Author: #
12 # Change Date: #
13 # Change: #
14 ################################################################################
15 --enable_abort_on_error
16
17 --echo
18 --echo #========================================================================
19 --echo # Check partitioning methods on just created tables
20 --echo # The tables should be defined without/with PRIMARY KEY and
21 --echo # UNIQUE INDEXes.
22 --echo # Every test round has to check
23 --echo # PARTITION BY HASH/KEY/LIST/RANGE
24 --echo # PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ...
25 --echo #========================================================================
26 --echo #------------------------------------------------------------------------
27 --echo # 1 Tables without PRIMARY KEY or UNIQUE INDEXes
28 --echo #------------------------------------------------------------------------
29 --echo # 1.1 The partitioning function contains one column.
30 let $unique= ;
31 --source suite/parts/inc/partition_methods1.inc
32 #
33 --echo # 1.2 The partitioning function contains two columns.
34 let $unique= ;
35 --source suite/parts/inc/partition_methods2.inc
36 #
37 --echo #------------------------------------------------------------------------
38 --echo # 2 Tables with PRIMARY KEY and/or UNIQUE INDEXes
39 --echo # The partitioning function contains one column.
40 --echo #------------------------------------------------------------------------
41 if ($more_pk_ui_tests)
42 {
43 if ($do_pk_tests)
44 {
45 --echo # 2.1 PRIMARY KEY consisting of one column
46 let $unique= , PRIMARY KEY(f_int1);
47 --source suite/parts/inc/partition_methods1.inc
48 }
49 --echo # 2.2 UNIQUE INDEX consisting of one column
50 let $unique= , UNIQUE INDEX uidx1 (f_int1);
51 --source suite/parts/inc/partition_methods1.inc
52 #
53 if ($do_pk_tests)
54 {
55 --echo # 2.3 PRIMARY KEY consisting of two columns
56 let $unique= , PRIMARY KEY(f_int1,f_int2);
57 --source suite/parts/inc/partition_methods1.inc
58 let $unique= , PRIMARY KEY(f_int2,f_int1);
59 --source suite/parts/inc/partition_methods1.inc
60 }
61 #
62 --echo # 2.4 UNIQUE INDEX consisting of two columns
63 let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
64 --source suite/parts/inc/partition_methods1.inc
65 let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
66 --source suite/parts/inc/partition_methods1.inc
67 #
68 }
69 --echo # 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns
70 if ($do_pk_tests)
71 {
72 let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
73 --source suite/parts/inc/partition_methods1.inc
74 let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
75 --source suite/parts/inc/partition_methods1.inc
76 }
77 let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
78 --source suite/parts/inc/partition_methods1.inc
79
80 --echo #------------------------------------------------------------------------
81 --echo # 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes
82 --echo # The partitioning function contains two columns.
83 --echo #------------------------------------------------------------------------
84 #
85 if ($more_pk_ui_tests)
86 {
87 if ($do_pk_tests)
88 {
89 --echo # 3.1 PRIMARY KEY consisting of two columns
90 let $unique= , PRIMARY KEY(f_int1,f_int2);
91 --source suite/parts/inc/partition_methods2.inc
92
93 let $unique= , PRIMARY KEY(f_int2,f_int1);
94 --source suite/parts/inc/partition_methods2.inc
95 }
96 #
97 --echo # 3.2 UNIQUE INDEX consisting of two columns
98 let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
99 --source suite/parts/inc/partition_methods2.inc
100 let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
101 --source suite/parts/inc/partition_methods2.inc
102 }
103 #
104 --echo # 3.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns
105 if ($do_pk_tests)
106 {
107 let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
108 --source suite/parts/inc/partition_methods2.inc
109 let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
110 --source suite/parts/inc/partition_methods2.inc
111 }
112 let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
113 --source suite/parts/inc/partition_methods2.inc