856 lines
33 KiB
Plaintext
856 lines
33 KiB
Plaintext
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
SHOW CREATE TABLE t575;
|
|
Table Create Table
|
|
t575 CREATE TABLE `t575` (
|
|
`a` int(11) NOT NULL,
|
|
`b` varchar(64) DEFAULT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB,
|
|
PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB,
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
# File list of test/t575*
|
|
t575#P#p0.ibd
|
|
t575#P#p1.ibd
|
|
t575#P#pmax.ibd
|
|
t575.frm
|
|
t575.par
|
|
# Flush the table data files
|
|
FLUSH TABLE t575 FOR EXPORT;
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
UNLOCK TABLES;
|
|
SHOW CREATE TABLE t575;
|
|
Table Create Table
|
|
t575 CREATE TABLE `t575` (
|
|
`a` int(11) NOT NULL,
|
|
`b` varchar(64) DEFAULT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB,
|
|
PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB,
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
CHECK TABLE t575;
|
|
Table Op Msg_type Msg_text
|
|
test.t575 check status OK
|
|
test.t575 check warning The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
affected rows: 2
|
|
CHECK TABLE t575 FOR UPGRADE;
|
|
Table Op Msg_type Msg_text
|
|
test.t575 check error Partitioning upgrade required. Please dump/reload to fix it or do: ALTER TABLE `test`.`t575` UPGRADE PARTITIONING
|
|
test.t575 check warning The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
affected rows: 2
|
|
CHECK TABLE t575;
|
|
Table Op Msg_type Msg_text
|
|
test.t575 check status OK
|
|
test.t575 check warning The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
affected rows: 2
|
|
ALTER TABLE t575 UPGRADE PARTITIONING;
|
|
affected rows: 0
|
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
ALTER TABLE t575 UPGRADE PARTITIONING;
|
|
affected rows: 0
|
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
|
# Flush the table data files
|
|
FLUSH TABLE t575 FOR EXPORT;
|
|
affected rows: 0
|
|
UNLOCK TABLES;
|
|
affected rows: 0
|
|
# Test mysql_upgrade
|
|
# First with the already upgraded table
|
|
mysql.columns_priv OK
|
|
mysql.db OK
|
|
mysql.engine_cost OK
|
|
mysql.event OK
|
|
mysql.func OK
|
|
mysql.general_log OK
|
|
mysql.gtid_executed OK
|
|
mysql.help_category OK
|
|
mysql.help_keyword OK
|
|
mysql.help_relation OK
|
|
mysql.help_topic OK
|
|
mysql.innodb_index_stats OK
|
|
mysql.innodb_table_stats OK
|
|
mysql.ndb_binlog_index OK
|
|
mysql.plugin OK
|
|
mysql.proc OK
|
|
mysql.procs_priv OK
|
|
mysql.proxies_priv OK
|
|
mysql.server_cost OK
|
|
mysql.servers OK
|
|
mysql.slave_master_info OK
|
|
mysql.slave_relay_log_info OK
|
|
mysql.slave_worker_info OK
|
|
mysql.slow_log OK
|
|
mysql.tables_priv OK
|
|
mysql.time_zone OK
|
|
mysql.time_zone_leap_second OK
|
|
mysql.time_zone_name OK
|
|
mysql.time_zone_transition OK
|
|
mysql.time_zone_transition_type OK
|
|
mysql.user OK
|
|
mtr.global_suppressions OK
|
|
mtr.test_suppressions OK
|
|
sys.sys_config OK
|
|
test.t575 OK
|
|
# Flush the table data files
|
|
FLUSH TABLE t575 FOR EXPORT;
|
|
affected rows: 0
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
SHOW CREATE TABLE t575;
|
|
Table Create Table
|
|
t575 CREATE TABLE `t575` (
|
|
`a` int(11) NOT NULL,
|
|
`b` varchar(64) DEFAULT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB,
|
|
PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB,
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
|
affected rows: 1
|
|
UNLOCK TABLES;
|
|
affected rows: 0
|
|
# Flush out the old table definition
|
|
FLUSH TABLE t575;
|
|
affected rows: 0
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same.
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
SHOW CREATE TABLE t575;
|
|
Table Create Table
|
|
t575 CREATE TABLE `t575` (
|
|
`a` int(11) NOT NULL,
|
|
`b` varchar(64) DEFAULT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB,
|
|
PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB,
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
|
affected rows: 1
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
# Then with 5.7.5 version of .frm and .par files
|
|
mysql.columns_priv OK
|
|
mysql.db OK
|
|
mysql.engine_cost OK
|
|
mysql.event OK
|
|
mysql.func OK
|
|
mysql.general_log OK
|
|
mysql.gtid_executed OK
|
|
mysql.help_category OK
|
|
mysql.help_keyword OK
|
|
mysql.help_relation OK
|
|
mysql.help_topic OK
|
|
mysql.innodb_index_stats OK
|
|
mysql.innodb_table_stats OK
|
|
mysql.ndb_binlog_index OK
|
|
mysql.plugin OK
|
|
mysql.proc OK
|
|
mysql.procs_priv OK
|
|
mysql.proxies_priv OK
|
|
mysql.server_cost OK
|
|
mysql.servers OK
|
|
mysql.slave_master_info OK
|
|
mysql.slave_relay_log_info OK
|
|
mysql.slave_worker_info OK
|
|
mysql.slow_log OK
|
|
mysql.tables_priv OK
|
|
mysql.time_zone OK
|
|
mysql.time_zone_leap_second OK
|
|
mysql.time_zone_name OK
|
|
mysql.time_zone_transition OK
|
|
mysql.time_zone_transition_type OK
|
|
mysql.user OK
|
|
mtr.global_suppressions OK
|
|
mtr.test_suppressions OK
|
|
sys.sys_config OK
|
|
test.t575
|
|
error : Partitioning upgrade required. Please dump/reload to fix it or do: ALTER TABLE `test`.`t575` UPGRADE PARTITIONING
|
|
warning : The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
|
|
Upgrading tables
|
|
Running : ALTER TABLE `test`.`t575` UPGRADE PARTITIONING
|
|
status : OK
|
|
# Flush the table data files
|
|
FLUSH TABLE t575 FOR EXPORT;
|
|
affected rows: 0
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
SHOW CREATE TABLE t575;
|
|
Table Create Table
|
|
t575 CREATE TABLE `t575` (
|
|
`a` int(11) NOT NULL,
|
|
`b` varchar(64) DEFAULT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB,
|
|
PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB,
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
|
affected rows: 1
|
|
UNLOCK TABLES;
|
|
affected rows: 0
|
|
# Verify that ALTER TABLE would change the file digest hash
|
|
ALTER TABLE t575 ENGINE = INNODB, ALGORITHM = COPY;
|
|
affected rows: 40
|
|
info: Records: 40 Duplicates: 0 Warnings: 0
|
|
# Flush the table data files
|
|
FLUSH TABLE t575 FOR EXPORT;
|
|
affected rows: 0
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
UNLOCK TABLES;
|
|
affected rows: 0
|
|
SHOW CREATE TABLE t575;
|
|
Table Create Table
|
|
t575 CREATE TABLE `t575` (
|
|
`a` int(11) NOT NULL,
|
|
`b` varchar(64) DEFAULT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB,
|
|
PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB,
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
|
affected rows: 1
|
|
DROP TABLE t575;
|
|
affected rows: 0
|
|
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
affected rows: 0
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
affected rows: 10
|
|
info: Rows matched: 10 Changed: 10 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
affected rows: 20
|
|
info: Records: 20 Duplicates: 0 Warnings: 0
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
affected rows: 0
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
ALTER TABLE t575 COMMENT = 'test' UPGRADE PARTITIONING;
|
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPGRADE PARTITIONING' at line 1
|
|
ALTER TABLE t575 UPGRADE PARTITIONING COMMENT = 'test';
|
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COMMENT = 'test'' at line 1
|
|
# Test that all ALTER that modify the .frm contents also updates to
|
|
# native partitioning. (I.e. all ALTER except empty, RENAME and
|
|
# ENABLE/DISABLE KEYS)
|
|
ALTER TABLE t575 ALGORITHM = INPLACE;
|
|
affected rows: 0
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
ALTER TABLE t575 ALGORITHM = DEFAULT;
|
|
affected rows: 0
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
ALTER TABLE t575;
|
|
affected rows: 0
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
ALTER TABLE t575 ALGORITHM = COPY;
|
|
affected rows: 40
|
|
info: Records: 40 Duplicates: 0 Warnings: 0
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
DROP TABLE t575;
|
|
affected rows: 0
|
|
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
affected rows: 0
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
affected rows: 10
|
|
info: Rows matched: 10 Changed: 10 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
affected rows: 20
|
|
info: Records: 20 Duplicates: 0 Warnings: 0
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
affected rows: 0
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
ALTER TABLE t575 RENAME TO t1;
|
|
affected rows: 0
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t1', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
ALTER TABLE t1 RENAME TO t575, ALGORITHM = INPLACE;
|
|
affected rows: 0
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
ALTER TABLE t575 RENAME TO t1, ALGORITHM = DEFAULT;
|
|
affected rows: 0
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t1', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
ALTER TABLE t1 RENAME TO t575, ALGORITHM = COPY;
|
|
affected rows: 40
|
|
info: Records: 40 Duplicates: 0 Warnings: 0
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
DROP TABLE t575;
|
|
affected rows: 0
|
|
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
affected rows: 0
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
affected rows: 10
|
|
info: Rows matched: 10 Changed: 10 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
affected rows: 20
|
|
info: Records: 20 Duplicates: 0 Warnings: 0
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
affected rows: 0
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
ALTER TABLE t575 DISABLE KEYS, ALGORITHM = INPLACE;
|
|
affected rows: 0
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
Note 1031 Table storage engine for 't575' doesn't have this option
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
ALTER TABLE t575 ENABLE KEYS, ALGORITHM = DEFAULT;
|
|
affected rows: 0
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
Note 1031 Table storage engine for 't575' doesn't have this option
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
ALTER TABLE t575 DISABLE KEYS;
|
|
affected rows: 0
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
Note 1031 Table storage engine for 't575' doesn't have this option
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
ALTER TABLE t575 ENABLE KEYS, ALGORITHM = COPY;
|
|
affected rows: 40
|
|
info: Records: 40 Duplicates: 0 Warnings: 1
|
|
Warnings:
|
|
Note 1031 Table storage engine for '#sql-nnnn_n' doesn't have this option
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
DROP TABLE t575;
|
|
affected rows: 0
|
|
# Forced ALTER must do a rebuilt
|
|
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
affected rows: 0
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
affected rows: 10
|
|
info: Rows matched: 10 Changed: 10 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
affected rows: 20
|
|
info: Records: 20 Duplicates: 0 Warnings: 0
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
affected rows: 0
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
# Flush the table data files
|
|
FLUSH TABLE t575 FOR EXPORT;
|
|
affected rows: 0
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
UNLOCK TABLES;
|
|
affected rows: 0
|
|
ALTER TABLE t575 ENGINE = InnoDB;
|
|
affected rows: 40
|
|
info: Records: 40 Duplicates: 0 Warnings: 0
|
|
# Flush the table data files
|
|
FLUSH TABLE t575 FOR EXPORT;
|
|
affected rows: 0
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
UNLOCK TABLES;
|
|
affected rows: 0
|
|
DROP TABLE t575;
|
|
affected rows: 0
|
|
# ALTER PARTITION will also upgrade the table to native partitioning!
|
|
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
affected rows: 0
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
affected rows: 10
|
|
info: Rows matched: 10 Changed: 10 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
affected rows: 20
|
|
info: Records: 20 Duplicates: 0 Warnings: 0
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
affected rows: 0
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
ALTER TABLE t575 REORGANIZE PARTITION pmax INTO
|
|
(PARTITION p2 VALUES LESS THAN (300),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
affected rows: 0
|
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 4 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
SHOW CREATE TABLE t575;
|
|
Table Create Table
|
|
t575 CREATE TABLE `t575` (
|
|
`a` int(11) NOT NULL,
|
|
`b` varchar(64) DEFAULT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB,
|
|
PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB,
|
|
PARTITION p2 VALUES LESS THAN (300) ENGINE = InnoDB,
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
|
affected rows: 1
|
|
DROP TABLE t575;
|
|
affected rows: 0
|
|
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
affected rows: 0
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
affected rows: 10
|
|
info: Rows matched: 10 Changed: 10 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
affected rows: 20
|
|
info: Records: 20 Duplicates: 0 Warnings: 0
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
affected rows: 0
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
# changing comment is default INPLACE with ha_innopart!
|
|
ALTER TABLE t575 COMMENT = 'test comment';
|
|
affected rows: 0
|
|
info: Records: 0 Duplicates: 0 Warnings: 1
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
SHOW CREATE TABLE t575;
|
|
Table Create Table
|
|
t575 CREATE TABLE `t575` (
|
|
`a` int(11) NOT NULL,
|
|
`b` varchar(64) DEFAULT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='test comment'
|
|
/*!50100 PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB,
|
|
PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB,
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
|
affected rows: 1
|
|
DROP TABLE t575;
|
|
affected rows: 0
|
|
# NOTICE that REPAIR/ANALYZE does not upgrade the table!
|
|
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
affected rows: 0
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
affected rows: 10
|
|
info: Rows matched: 10 Changed: 10 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
affected rows: 10
|
|
info: Records: 10 Duplicates: 0 Warnings: 0
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
affected rows: 20
|
|
info: Records: 20 Duplicates: 0 Warnings: 0
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
affected rows: 0
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
REPAIR TABLE t575;
|
|
Table Op Msg_type Msg_text
|
|
test.t575 repair status OK
|
|
test.t575 repair warning The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
affected rows: 2
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
SHOW CREATE TABLE t575;
|
|
Table Create Table
|
|
t575 CREATE TABLE `t575` (
|
|
`a` int(11) NOT NULL,
|
|
`b` varchar(64) DEFAULT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB,
|
|
PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB,
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
# File list of test/t575*
|
|
t575#P#p0.ibd
|
|
t575#P#p1.ibd
|
|
t575#P#pmax.ibd
|
|
t575.frm
|
|
t575.par
|
|
ANALYZE TABLE t575;
|
|
Table Op Msg_type Msg_text
|
|
test.t575 analyze status OK
|
|
test.t575 analyze warning The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
# But OPTIMIZE does upgrade to native partitioning!
|
|
OPTIMIZE TABLE t575;
|
|
Table Op Msg_type Msg_text
|
|
test.t575 optimize note Table does not support optimize, doing recreate + analyze instead
|
|
test.t575 optimize status OK
|
|
test.t575 optimize warning The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
DROP TABLE t575;
|
|
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
ALTER TABLE t575 MODIFY b varchar(65), ALGORITHM = INPLACE;
|
|
affected rows: 0
|
|
info: Records: 0 Duplicates: 0 Warnings: 1
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
DROP TABLE t575;
|
|
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
ALTER TABLE t575 change b c varchar(65);
|
|
affected rows: 0
|
|
info: Records: 0 Duplicates: 0 Warnings: 1
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
DROP TABLE t575;
|
|
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
ALTER TABLE t575 ADD INDEX (b);
|
|
affected rows: 0
|
|
info: Records: 0 Duplicates: 0 Warnings: 1
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
DROP TABLE t575;
|
|
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
CREATE INDEX b ON t575 (b);
|
|
affected rows: 0
|
|
info: Records: 0 Duplicates: 0 Warnings: 1
|
|
Warnings:
|
|
Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
DROP TABLE t575;
|
|
CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63))
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
|
INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
UPDATE t575 SET b = CONCAT("Filler_", a);
|
|
INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575;
|
|
INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575;
|
|
# Flush out the old table definition so it can be replaced
|
|
FLUSH TABLE t575;
|
|
# Replace the .frm and copy a .par file, so it is the same as a 5.7.5
|
|
# table. InnoDB internals is the same. Notice char(64) instead of (63)!
|
|
found 3 *.ibd file(s)
|
|
.par file exists
|
|
.frm created by version: 50705
|
|
DB_TYPE (byte 3): 20
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'partition'
|
|
DROP INDEX `PRIMARY` ON t575;
|
|
affected rows: 40
|
|
info: Records: 40 Duplicates: 0 Warnings: 0
|
|
found 3 *.ibd file(s)
|
|
.frm created by version >= 5.7.8
|
|
DB_TYPE (byte 3): 12
|
|
DEFAULT_PART_DB_TYPE (byte 61): 12
|
|
DB_TYPE string: 'InnoDB'
|
|
DROP TABLE t575;
|