summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_default.test
blob: 9ac6ccf934324072f797cdd0b41c9edb56668eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# simplified test case reduced from an RQG trial that crashes tokudb 
# alter drop default breaks the row encoding because mysql changed
# null_bytes on the new table without tokudb's knowledge

source include/have_tokudb.inc;
set default_storage_engine=tokudb;

disable_warnings;
drop table if exists t;
enable_warnings;

CREATE TABLE t (
c25 char(1),
c277 int,
c195 int unsigned,
c129 char(1),
c196 int unsigned,
c58 date,
c7 varchar(1),
c121 varchar(1),
c21 char(1),
c56 date,
c2 varchar(1),
c12 varchar(1),
c13 char(1),
c14 int,
c15 date,
c16 char(1),
c17 varchar(1),
c18 int unsigned,
c120 varchar(1),
c19 varchar(1),
c5 varchar(1),
c22 char(1),
c9 varchar(1),
c23 char(1),
c28 char(1),
c279 int unsigned,
c26 char(1),
c27 varchar(1),
c24 char(1),
c193 int,
c29 date,
c30 varchar(1),
c194 int,
c31 date,
key(c31)) ENGINE=tokudb;
INSERT INTO t (c25) VALUES (NULL);
UPDATE t SET c27=0;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH;
SET sql_mode = DEFAULT;
UPDATE t SET c27=0;
ALTER TABLE t ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
UPDATE t SET c27=0;
set tokudb_disable_hot_alter=0;
set tokudb_disable_slow_alter=1;
#--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t ALTER c120 DROP DEFAULT;
#set tokudb_disable_slow_alter=0;
#ALTER TABLE t ALTER c120 DROP DEFAULT;
UPDATE t SET c27=0;

drop table t;