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
|
DROP TABLE IF EXISTS t;
SET SESSION TOKUDB_DISABLE_SLOW_ALTER=ON;
CREATE TABLE t (a VARBINARY(100), b VARBINARY(100)) ENGINE=Tokudb;
INSERT INTO t VALUES ('hi','there'),('you','people');
SELECT * FROM t;
a b
hi there
you people
ALTER TABLE t CHANGE COLUMN a a VARBINARY(101);
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
`a` varbinary(101) DEFAULT NULL,
`b` varbinary(100) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a VARBINARY(200);
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
`a` varbinary(200) DEFAULT NULL,
`b` varbinary(100) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
SELECT * FROM t;
a b
hi there
you people
DROP TABLE t;
CREATE TABLE t (i INT, a VARBINARY(100), b VARBINARY(100)) ENGINE=Tokudb;
INSERT INTO t VALUES (1, 'hi','there'),(2, 'you','people');
SELECT * FROM t;
i a b
1 hi there
2 you people
ALTER TABLE t CHANGE COLUMN a a VARBINARY(101);
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
`i` int(11) DEFAULT NULL,
`a` varbinary(101) DEFAULT NULL,
`b` varbinary(100) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a VARBINARY(200);
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
`i` int(11) DEFAULT NULL,
`a` varbinary(200) DEFAULT NULL,
`b` varbinary(100) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
SELECT * FROM t;
i a b
1 hi there
2 you people
DROP TABLE t;
|