Debian Codegraph @

mysql-test/suite/ndb/t/ndb_restore_compat_partitioning.test

raw
1 --source include/have_ndb.inc
2 --source suite/ndb/include/backup_restore_setup.inc
3
4 # Test schema restore using pre-7.5 metadata to check
5 # for regressions introduced since then.
6 # A selection of partitioning variants are
7 # checked.
8 #
9 # CREATE TABLE `standard` (
10 # `a` int(11) NOT NULL,
11 # `b` int(11) DEFAULT NULL,
12 # PRIMARY KEY (`a`)
13 # ) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
14 #
15 #
16 # CREATE TABLE `maxrows_low` (
17 # `a` int(11) NOT NULL,
18 # `b` int(11) DEFAULT NULL,
19 # PRIMARY KEY (`a`)
20 # ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 MAX_ROWS=10000000;
21 #
22 #
23 # CREATE TABLE `maxrows_high` (
24 # `a` int(11) NOT NULL,
25 # `b` int(11) DEFAULT NULL,
26 # PRIMARY KEY (`a`)
27 # ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 MAX_ROWS=1000000000;
28 #
29 #
30 # CREATE TABLE `bykeycount` (
31 # `a` int(11) NOT NULL,
32 # `b` int(11) DEFAULT NULL,
33 # PRIMARY KEY (`a`)
34 # ) ENGINE=ndbcluster DEFAULT CHARSET=latin1
35 # PARTITION BY KEY (a)
36 # PARTITIONS 8;
37 #
38 # CREATE TABLE `bykeycount_big` (
39 # `a` int(11) NOT NULL,
40 # `b` int(11) DEFAULT NULL,
41 # PRIMARY KEY (`a`)
42 # ) ENGINE=ndbcluster DEFAULT CHARSET=latin1
43 # PARTITION BY KEY (a)
44 # PARTITIONS 32;
45 #
46 # CREATE TABLE `another` (
47 # `a` int(11) NOT NULL,
48 # `b` int(11) DEFAULT NULL,
49 # PRIMARY KEY (`a`)
50 # ) ENGINE=ndbcluster DEFAULT CHARSET=latin1
51 # PARTITION BY LINEAR KEY (a);
52 #
53 #
54
55 --exec $NDB_RESTORE $NDB_RESTORE_NO_ENCR -b 1 -n 1 -m $NDB_SAVED_BACKUPS/pre_75_partitioning_variants >> $NDB_TOOLS_OUTPUT
56
57 use test;
58
59 show create table standard;
60 show create table maxrows_low;
61 show create table maxrows_high;
62 show create table bykeycount;
63 show create table bykeycount_big;
64 show create table another;
65
66 --sorted_result
67 show tables;
68
69
70 drop table standard;
71 drop table maxrows_low;
72 drop table maxrows_high;
73 drop table bykeycount;
74 drop table bykeycount_big;
75 drop table another;
76
77 --remove_file $NDB_TOOLS_OUTPUT