~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
################################################################################
2
# inc/partition_syntax_2.inc                                                   #
3
#                                                                              #
4
# Purpose:                                                                     #
5
#   Auxiliary script, only useful when sourced by inc/partition_syntax.inc.    #
6
#                                                                              #
7
#------------------------------------------------------------------------------#
8
# Original Author: mleich                                                      #
9
# Original Date: 2006-05-11                                                    #
10
# Change Author:                                                               #
11
# Change Date:                                                                 #
12
# Change:                                                                      #
13
################################################################################
14
15
if (`SELECT @@session.storage_engine NOT IN('ndbcluster')`)
16
{
17
   --error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
18
   eval CREATE TABLE t1 (
19
   $column_list,
20
   $unique_index
21
   )
22
   $partition_scheme;
23
   --error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
24
   eval CREATE TABLE t1 (
25
   $column_list,
26
   PRIMARY KEY(f_int1,f_int2), $unique_index
27
   )
28
   $partition_scheme;
29
}
30
if (`SELECT @@session.storage_engine IN('ndbcluster')`)
31
{
32
   eval CREATE TABLE t1 (
33
   $column_list,
34
   $unique_index
35
   )
36
   $partition_scheme;
37
   eval $insert_all;
38
   --source suite/parts/inc/partition_check.inc
39
   DROP TABLE t1;
40
   eval CREATE TABLE t1 (
41
   $column_list,
42
   PRIMARY KEY(f_int1,f_int2), $unique_index
43
   )
44
   $partition_scheme;
45
   eval $insert_all;
46
   --source suite/parts/inc/partition_check.inc
47
   DROP TABLE t1;
48
}