File: rpl_partition_id_commands.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (93 lines) | stat: -rw-r--r-- 4,226 bytes parent folder | download
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
include/master-slave.inc
[connection master]
RESET MASTER;
CREATE TABLE employees (id INT NOT NULL, store_id INT NOT NULL);
Test PARTITION BY
ALTER TABLE employees PARTITION BY RANGE (store_id) (PARTITION p0 VALUES LESS THAN (6), PARTITION p1 VALUES LESS THAN (11), PARTITION p2 VALUES LESS THAN (16));
INSERT INTO employees VALUES (1, 3);
INSERT INTO employees VALUES (2, 7);
INSERT INTO employees VALUES (3, 12);
Test ADD PARTITION
ALTER TABLE employees ADD PARTITION (PARTITION p3 VALUES LESS THAN (20));
INSERT INTO employees VALUES (4, 19);
include/assert.inc [Check that the partition count is increased after ADD PARTITION]
Test DROP PARTITION
ALTER TABLE employees DROP PARTITION p3;
include/assert.inc [Check that the partition count is decreased after ADD PARTITION]
Test TRUNCATE PARTITION
INSERT INTO employees VALUES (2, 4);
ALTER TABLE employees TRUNCATE PARTITION P0;
include/assert.inc [Check that the row count after is zero]
Test REORGANIZE PARTITION
ALTER TABLE employees REORGANIZE PARTITION p1,p2 INTO (PARTITION p3 VALUES LESS THAN (20));
include/assert.inc [Check that the partition count is decreased after REORGANIZE PARTITION]
Test EXCHANGE PARTITION
CREATE TABLE employees1 LIKE employees;
ALTER TABLE employees1 REMOVE PARTITIONING;
ALTER TABLE employees EXCHANGE PARTITION p3 WITH TABLE employees1;
include/assert.inc [Check that the partition count is same after EXCHANGE PARTITION]
DROP TABLE employees1;
Test ANALYZE PARTITION
ALTER TABLE employees ANALYZE PARTITION p0;
Table	Op	Msg_type	Msg_text
test.employees	analyze	status	OK
ALTER TABLE employees ANALYZE PARTITION ALL;
Table	Op	Msg_type	Msg_text
test.employees	analyze	status	OK
Test CHECK PARTITION
ALTER TABLE employees CHECK PARTITION p0;
Table	Op	Msg_type	Msg_text
test.employees	check	status	OK
ALTER TABLE employees CHECK PARTITION ALL;
Table	Op	Msg_type	Msg_text
test.employees	check	status	OK
Test OPTIMIZE PARTITION
ALTER TABLE employees OPTIMIZE PARTITION p3;
Table	Op	Msg_type	Msg_text
test.employees	optimize	note	Table does not support optimize on partitions. All partitions will be rebuilt and analyzed.
test.employees	optimize	status	OK
ALTER TABLE employees OPTIMIZE PARTITION ALL;
Table	Op	Msg_type	Msg_text
test.employees	optimize	note	Table does not support optimize on partitions. All partitions will be rebuilt and analyzed.
test.employees	optimize	status	OK
Test REBUILD PARTITION
ALTER TABLE employees REBUILD PARTITION p3;
ALTER TABLE employees REBUILD PARTITION ALL;
Test REPAIR PARTITION
ALTER TABLE employees REPAIR PARTITION p4;
Table	Op	Msg_type	Msg_text
test.employees	repair	Error	Error in list of partitions to test.employees
test.employees	repair	status	Operation failed
ALTER TABLE employees REPAIR PARTITION ALL;
Table	Op	Msg_type	Msg_text
test.employees	repair	status	OK
include/assert.inc [Check that the partition count is same after REPAIR PARTITION]
Test REMOVE PARTITION
ALTER TABLE employees REMOVE PARTITIONING;
include/assert.inc [Check that the partition count is 0 after REMOVE PARTITIONING]
DROP TABLE employees;
Test DISCARD/IMPORT PARTITION
CREATE TABLE employees (id INT NOT NULL, store_id INT NOT NULL);
ALTER TABLE employees PARTITION BY RANGE (store_id) (PARTITION p0 VALUES LESS THAN (6), PARTITION p1 VALUES LESS THAN (11), PARTITION p2 VALUES LESS THAN (16));
[connection server_2]
CREATE TABLE employees (id INT NOT NULL, store_id INT NOT NULL);
ALTER TABLE employees PARTITION BY RANGE (store_id) (PARTITION p0 VALUES LESS THAN (6), PARTITION p1 VALUES LESS THAN (11), PARTITION p2 VALUES LESS THAN (16));
ALTER TABLE employees DISCARD PARTITION p0 TABLESPACE;
[connection server_1]
FLUSH TABLES employees FOR EXPORT;
[connection server_2]
[connection server_1]
UNLOCK TABLES;
[connection server_2]
ALTER TABLE employees IMPORT PARTITION p0 TABLESPACE;
DROP TABLE employees;
[connection server_1]
DROP TABLE employees;
CREATE TABLE employees (id INT NOT NULL, store_id INT NOT NULL);
Test PARTITION BY
ALTER TABLE employees PARTITION BY HASH(store_id) PARTITIONS 6;
Test COALESCE PARTITION
ALTER TABLE employees COALESCE PARTITION 2;
include/assert.inc [Check that the before count is greater than after count  after COALESCE PARTITION]
DROP TABLE employees;
include/rpl_end.inc