blob: 6b80637f3f80ed7b88d0aa4b381f0d0c3c4e2e4b (
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
|
SET @innodb_defragment_orig=@@GLOBAL.innodb_defragment;
SET @innodb_optimize_fulltext_orig=@@GLOBAL.innodb_optimize_fulltext_only;
SET GLOBAL innodb_defragment = 1;
Warnings:
Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release
SET GLOBAL innodb_optimize_fulltext_only = 0;
#
# MDEV-12198 innodb_defragment=1 crashes server on
# OPTIMIZE TABLE when FULLTEXT index exists
#
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(256),
KEY(a, b), FULLTEXT KEY(b)) ENGINE=INNODB;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
INSERT INTO t1 VALUES (100000, REPEAT('A', 256));
INSERT INTO t1 VALUES (200000, REPEAT('A', 256));
INSERT INTO t1 VALUES (300000, REPEAT('A', 256));
INSERT INTO t1 VALUES (400000, REPEAT('A', 256));
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
#
# MDEV-15824 innodb_defragment=ON trumps
# innodb_optimize_fulltext_only=ON in OPTIMIZE TABLE
#
SET GLOBAL innodb_optimize_fulltext_only = 1;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
SET GLOBAL innodb_defragment = 0;
Warnings:
Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
DROP TABLE t1;
CREATE TABLE t1 (c POINT PRIMARY KEY, SPATIAL INDEX(c)) ENGINE=InnoDB;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
DROP TABLE t1;
SET GLOBAL innodb_defragment = @innodb_defragment_orig;
Warnings:
Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release
SET GLOBAL innodb_optimize_fulltext_only = @innodb_optimize_fulltext_orig;
|