1CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 2ENGINE = InnoDB 3PARTITION BY RANGE (a) 4(PARTITION p0 VALUES LESS THAN (100), 5PARTITION p1 VALUES LESS THAN (200), 6PARTITION pmax VALUES LESS THAN MAXVALUE); 7INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 8UPDATE t575 SET b = CONCAT("Filler_", a); 9INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 10INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 11# Flush out the old table definition so it can be replaced 12FLUSH TABLE t575; 13# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 14# table. InnoDB internals is the same. Notice char(64) instead of (63)! 15found 3 *.ibd file(s) 16.par file exists 17.frm created by version: 50705 18DB_TYPE (byte 3): 20 19DEFAULT_PART_DB_TYPE (byte 61): 12 20DB_TYPE string: 'partition' 21SHOW CREATE TABLE t575; 22Table Create Table 23t575 CREATE TABLE `t575` ( 24 `a` int(11) NOT NULL, 25 `b` varchar(64) DEFAULT NULL, 26 PRIMARY KEY (`a`) 27) ENGINE=InnoDB DEFAULT CHARSET=latin1 28/*!50100 PARTITION BY RANGE (a) 29(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, 30 PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB, 31 PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ 32Warnings: 33Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 34# File list of test/t575* 35t575#P#p0.ibd 36t575#P#p1.ibd 37t575#P#pmax.ibd 38t575.frm 39t575.par 40# Flush the table data files 41FLUSH TABLE t575 FOR EXPORT; 42found 3 *.ibd file(s) 43.par file exists 44.frm created by version: 50705 45DB_TYPE (byte 3): 20 46DEFAULT_PART_DB_TYPE (byte 61): 12 47DB_TYPE string: 'partition' 48UNLOCK TABLES; 49SHOW CREATE TABLE t575; 50Table Create Table 51t575 CREATE TABLE `t575` ( 52 `a` int(11) NOT NULL, 53 `b` varchar(64) DEFAULT NULL, 54 PRIMARY KEY (`a`) 55) ENGINE=InnoDB DEFAULT CHARSET=latin1 56/*!50100 PARTITION BY RANGE (a) 57(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, 58 PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB, 59 PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ 60Warnings: 61Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 62CHECK TABLE t575; 63Table Op Msg_type Msg_text 64test.t575 check status OK 65test.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. 66affected rows: 2 67CHECK TABLE t575 FOR UPGRADE; 68Table Op Msg_type Msg_text 69test.t575 check error Partitioning upgrade required. Please dump/reload to fix it or do: ALTER TABLE `test`.`t575` UPGRADE PARTITIONING 70test.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. 71affected rows: 2 72CHECK TABLE t575; 73Table Op Msg_type Msg_text 74test.t575 check status OK 75test.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. 76affected rows: 2 77ALTER TABLE t575 UPGRADE PARTITIONING; 78affected rows: 0 79info: Records: 0 Duplicates: 0 Warnings: 0 80Warnings: 81Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 82ALTER TABLE t575 UPGRADE PARTITIONING; 83affected rows: 0 84info: Records: 0 Duplicates: 0 Warnings: 0 85# Flush the table data files 86FLUSH TABLE t575 FOR EXPORT; 87affected rows: 0 88UNLOCK TABLES; 89affected rows: 0 90# Test mysql_upgrade 91# First with the already upgraded table 92mysql.columns_priv OK 93mysql.db OK 94mysql.engine_cost OK 95mysql.event OK 96mysql.func OK 97mysql.general_log OK 98mysql.gtid_executed OK 99mysql.help_category OK 100mysql.help_keyword OK 101mysql.help_relation OK 102mysql.help_topic OK 103mysql.innodb_index_stats OK 104mysql.innodb_table_stats OK 105mysql.ndb_binlog_index OK 106mysql.plugin OK 107mysql.proc OK 108mysql.procs_priv OK 109mysql.proxies_priv OK 110mysql.server_cost OK 111mysql.servers OK 112mysql.slave_master_info OK 113mysql.slave_relay_log_info OK 114mysql.slave_worker_info OK 115mysql.slow_log OK 116mysql.tables_priv OK 117mysql.time_zone OK 118mysql.time_zone_leap_second OK 119mysql.time_zone_name OK 120mysql.time_zone_transition OK 121mysql.time_zone_transition_type OK 122mysql.user OK 123mtr.global_suppressions OK 124mtr.test_suppressions OK 125sys.sys_config OK 126test.t575 OK 127# Flush the table data files 128FLUSH TABLE t575 FOR EXPORT; 129affected rows: 0 130found 3 *.ibd file(s) 131.frm created by version >= 5.7.8 132DB_TYPE (byte 3): 12 133DEFAULT_PART_DB_TYPE (byte 61): 12 134DB_TYPE string: 'InnoDB' 135SHOW CREATE TABLE t575; 136Table Create Table 137t575 CREATE TABLE `t575` ( 138 `a` int(11) NOT NULL, 139 `b` varchar(64) DEFAULT NULL, 140 PRIMARY KEY (`a`) 141) ENGINE=InnoDB DEFAULT CHARSET=latin1 142/*!50100 PARTITION BY RANGE (a) 143(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, 144 PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB, 145 PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ 146affected rows: 1 147UNLOCK TABLES; 148affected rows: 0 149# Flush out the old table definition 150FLUSH TABLE t575; 151affected rows: 0 152# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 153# table. InnoDB internals is the same. 154found 3 *.ibd file(s) 155.par file exists 156.frm created by version: 50705 157DB_TYPE (byte 3): 20 158DEFAULT_PART_DB_TYPE (byte 61): 12 159DB_TYPE string: 'partition' 160SHOW CREATE TABLE t575; 161Table Create Table 162t575 CREATE TABLE `t575` ( 163 `a` int(11) NOT NULL, 164 `b` varchar(64) DEFAULT NULL, 165 PRIMARY KEY (`a`) 166) ENGINE=InnoDB DEFAULT CHARSET=latin1 167/*!50100 PARTITION BY RANGE (a) 168(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, 169 PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB, 170 PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ 171affected rows: 1 172Warnings: 173Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 174# Then with 5.7.5 version of .frm and .par files 175mysql.columns_priv OK 176mysql.db OK 177mysql.engine_cost OK 178mysql.event OK 179mysql.func OK 180mysql.general_log OK 181mysql.gtid_executed OK 182mysql.help_category OK 183mysql.help_keyword OK 184mysql.help_relation OK 185mysql.help_topic OK 186mysql.innodb_index_stats OK 187mysql.innodb_table_stats OK 188mysql.ndb_binlog_index OK 189mysql.plugin OK 190mysql.proc OK 191mysql.procs_priv OK 192mysql.proxies_priv OK 193mysql.server_cost OK 194mysql.servers OK 195mysql.slave_master_info OK 196mysql.slave_relay_log_info OK 197mysql.slave_worker_info OK 198mysql.slow_log OK 199mysql.tables_priv OK 200mysql.time_zone OK 201mysql.time_zone_leap_second OK 202mysql.time_zone_name OK 203mysql.time_zone_transition OK 204mysql.time_zone_transition_type OK 205mysql.user OK 206mtr.global_suppressions OK 207mtr.test_suppressions OK 208sys.sys_config OK 209test.t575 210error : Partitioning upgrade required. Please dump/reload to fix it or do: ALTER TABLE `test`.`t575` UPGRADE PARTITIONING 211warning : The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 212 213Upgrading tables 214Running : ALTER TABLE `test`.`t575` UPGRADE PARTITIONING 215status : OK 216# Flush the table data files 217FLUSH TABLE t575 FOR EXPORT; 218affected rows: 0 219found 3 *.ibd file(s) 220.frm created by version >= 5.7.8 221DB_TYPE (byte 3): 12 222DEFAULT_PART_DB_TYPE (byte 61): 12 223DB_TYPE string: 'InnoDB' 224SHOW CREATE TABLE t575; 225Table Create Table 226t575 CREATE TABLE `t575` ( 227 `a` int(11) NOT NULL, 228 `b` varchar(64) DEFAULT NULL, 229 PRIMARY KEY (`a`) 230) ENGINE=InnoDB DEFAULT CHARSET=latin1 231/*!50100 PARTITION BY RANGE (a) 232(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, 233 PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB, 234 PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ 235affected rows: 1 236UNLOCK TABLES; 237affected rows: 0 238# Verify that ALTER TABLE would change the file digest hash 239ALTER TABLE t575 ENGINE = INNODB, ALGORITHM = COPY; 240affected rows: 40 241info: Records: 40 Duplicates: 0 Warnings: 0 242# Flush the table data files 243FLUSH TABLE t575 FOR EXPORT; 244affected rows: 0 245found 3 *.ibd file(s) 246.frm created by version >= 5.7.8 247DB_TYPE (byte 3): 12 248DEFAULT_PART_DB_TYPE (byte 61): 12 249DB_TYPE string: 'InnoDB' 250UNLOCK TABLES; 251affected rows: 0 252SHOW CREATE TABLE t575; 253Table Create Table 254t575 CREATE TABLE `t575` ( 255 `a` int(11) NOT NULL, 256 `b` varchar(64) DEFAULT NULL, 257 PRIMARY KEY (`a`) 258) ENGINE=InnoDB DEFAULT CHARSET=latin1 259/*!50100 PARTITION BY RANGE (a) 260(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, 261 PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB, 262 PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ 263affected rows: 1 264DROP TABLE t575; 265affected rows: 0 266CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 267ENGINE = InnoDB 268PARTITION BY RANGE (a) 269(PARTITION p0 VALUES LESS THAN (100), 270PARTITION p1 VALUES LESS THAN (200), 271PARTITION pmax VALUES LESS THAN MAXVALUE); 272affected rows: 0 273INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 274affected rows: 10 275info: Records: 10 Duplicates: 0 Warnings: 0 276UPDATE t575 SET b = CONCAT("Filler_", a); 277affected rows: 10 278info: Rows matched: 10 Changed: 10 Warnings: 0 279INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 280affected rows: 10 281info: Records: 10 Duplicates: 0 Warnings: 0 282INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 283affected rows: 20 284info: Records: 20 Duplicates: 0 Warnings: 0 285# Flush out the old table definition so it can be replaced 286FLUSH TABLE t575; 287affected rows: 0 288# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 289# table. InnoDB internals is the same. Notice char(64) instead of (63)! 290ALTER TABLE t575 COMMENT = 'test' UPGRADE PARTITIONING; 291ERROR 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 292ALTER TABLE t575 UPGRADE PARTITIONING COMMENT = 'test'; 293ERROR 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 294# Test that all ALTER that modify the .frm contents also updates to 295# native partitioning. (I.e. all ALTER except empty, RENAME and 296# ENABLE/DISABLE KEYS) 297ALTER TABLE t575 ALGORITHM = INPLACE; 298affected rows: 0 299Warnings: 300Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 301found 3 *.ibd file(s) 302.par file exists 303.frm created by version: 50705 304DB_TYPE (byte 3): 20 305DEFAULT_PART_DB_TYPE (byte 61): 12 306DB_TYPE string: 'partition' 307ALTER TABLE t575 ALGORITHM = DEFAULT; 308affected rows: 0 309Warnings: 310Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 311found 3 *.ibd file(s) 312.par file exists 313.frm created by version: 50705 314DB_TYPE (byte 3): 20 315DEFAULT_PART_DB_TYPE (byte 61): 12 316DB_TYPE string: 'partition' 317ALTER TABLE t575; 318affected rows: 0 319Warnings: 320Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 321found 3 *.ibd file(s) 322.par file exists 323.frm created by version: 50705 324DB_TYPE (byte 3): 20 325DEFAULT_PART_DB_TYPE (byte 61): 12 326DB_TYPE string: 'partition' 327ALTER TABLE t575 ALGORITHM = COPY; 328affected rows: 40 329info: Records: 40 Duplicates: 0 Warnings: 0 330found 3 *.ibd file(s) 331.frm created by version >= 5.7.8 332DB_TYPE (byte 3): 12 333DEFAULT_PART_DB_TYPE (byte 61): 12 334DB_TYPE string: 'InnoDB' 335DROP TABLE t575; 336affected rows: 0 337CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 338ENGINE = InnoDB 339PARTITION BY RANGE (a) 340(PARTITION p0 VALUES LESS THAN (100), 341PARTITION p1 VALUES LESS THAN (200), 342PARTITION pmax VALUES LESS THAN MAXVALUE); 343affected rows: 0 344INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 345affected rows: 10 346info: Records: 10 Duplicates: 0 Warnings: 0 347UPDATE t575 SET b = CONCAT("Filler_", a); 348affected rows: 10 349info: Rows matched: 10 Changed: 10 Warnings: 0 350INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 351affected rows: 10 352info: Records: 10 Duplicates: 0 Warnings: 0 353INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 354affected rows: 20 355info: Records: 20 Duplicates: 0 Warnings: 0 356# Flush out the old table definition so it can be replaced 357FLUSH TABLE t575; 358affected rows: 0 359# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 360# table. InnoDB internals is the same. Notice char(64) instead of (63)! 361ALTER TABLE t575 RENAME TO t1; 362affected rows: 0 363Warnings: 364Warning 1287 The partition engine, used by table 'test.t1', is deprecated and will be removed in a future release. Please use native partitioning instead. 365found 3 *.ibd file(s) 366.par file exists 367.frm created by version: 50705 368DB_TYPE (byte 3): 20 369DEFAULT_PART_DB_TYPE (byte 61): 12 370DB_TYPE string: 'partition' 371ALTER TABLE t1 RENAME TO t575, ALGORITHM = INPLACE; 372affected rows: 0 373Warnings: 374Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 375found 3 *.ibd file(s) 376.par file exists 377.frm created by version: 50705 378DB_TYPE (byte 3): 20 379DEFAULT_PART_DB_TYPE (byte 61): 12 380DB_TYPE string: 'partition' 381ALTER TABLE t575 RENAME TO t1, ALGORITHM = DEFAULT; 382affected rows: 0 383Warnings: 384Warning 1287 The partition engine, used by table 'test.t1', is deprecated and will be removed in a future release. Please use native partitioning instead. 385found 3 *.ibd file(s) 386.par file exists 387.frm created by version: 50705 388DB_TYPE (byte 3): 20 389DEFAULT_PART_DB_TYPE (byte 61): 12 390DB_TYPE string: 'partition' 391ALTER TABLE t1 RENAME TO t575, ALGORITHM = COPY; 392affected rows: 40 393info: Records: 40 Duplicates: 0 Warnings: 0 394found 3 *.ibd file(s) 395.frm created by version >= 5.7.8 396DB_TYPE (byte 3): 12 397DEFAULT_PART_DB_TYPE (byte 61): 12 398DB_TYPE string: 'InnoDB' 399DROP TABLE t575; 400affected rows: 0 401CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 402ENGINE = InnoDB 403PARTITION BY RANGE (a) 404(PARTITION p0 VALUES LESS THAN (100), 405PARTITION p1 VALUES LESS THAN (200), 406PARTITION pmax VALUES LESS THAN MAXVALUE); 407affected rows: 0 408INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 409affected rows: 10 410info: Records: 10 Duplicates: 0 Warnings: 0 411UPDATE t575 SET b = CONCAT("Filler_", a); 412affected rows: 10 413info: Rows matched: 10 Changed: 10 Warnings: 0 414INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 415affected rows: 10 416info: Records: 10 Duplicates: 0 Warnings: 0 417INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 418affected rows: 20 419info: Records: 20 Duplicates: 0 Warnings: 0 420# Flush out the old table definition so it can be replaced 421FLUSH TABLE t575; 422affected rows: 0 423# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 424# table. InnoDB internals is the same. Notice char(64) instead of (63)! 425ALTER TABLE t575 DISABLE KEYS, ALGORITHM = INPLACE; 426affected rows: 0 427Warnings: 428Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 429Note 1031 Table storage engine for 't575' doesn't have this option 430found 3 *.ibd file(s) 431.par file exists 432.frm created by version: 50705 433DB_TYPE (byte 3): 20 434DEFAULT_PART_DB_TYPE (byte 61): 12 435DB_TYPE string: 'partition' 436ALTER TABLE t575 ENABLE KEYS, ALGORITHM = DEFAULT; 437affected rows: 0 438Warnings: 439Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 440Note 1031 Table storage engine for 't575' doesn't have this option 441found 3 *.ibd file(s) 442.par file exists 443.frm created by version: 50705 444DB_TYPE (byte 3): 20 445DEFAULT_PART_DB_TYPE (byte 61): 12 446DB_TYPE string: 'partition' 447ALTER TABLE t575 DISABLE KEYS; 448affected rows: 0 449Warnings: 450Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 451Note 1031 Table storage engine for 't575' doesn't have this option 452found 3 *.ibd file(s) 453.par file exists 454.frm created by version: 50705 455DB_TYPE (byte 3): 20 456DEFAULT_PART_DB_TYPE (byte 61): 12 457DB_TYPE string: 'partition' 458ALTER TABLE t575 ENABLE KEYS, ALGORITHM = COPY; 459affected rows: 40 460info: Records: 40 Duplicates: 0 Warnings: 1 461Warnings: 462Note 1031 Table storage engine for '#sql-nnnn_n' doesn't have this option 463found 3 *.ibd file(s) 464.frm created by version >= 5.7.8 465DB_TYPE (byte 3): 12 466DEFAULT_PART_DB_TYPE (byte 61): 12 467DB_TYPE string: 'InnoDB' 468DROP TABLE t575; 469affected rows: 0 470# Forced ALTER must do a rebuilt 471CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 472ENGINE = InnoDB 473PARTITION BY RANGE (a) 474(PARTITION p0 VALUES LESS THAN (100), 475PARTITION p1 VALUES LESS THAN (200), 476PARTITION pmax VALUES LESS THAN MAXVALUE); 477affected rows: 0 478INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 479affected rows: 10 480info: Records: 10 Duplicates: 0 Warnings: 0 481UPDATE t575 SET b = CONCAT("Filler_", a); 482affected rows: 10 483info: Rows matched: 10 Changed: 10 Warnings: 0 484INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 485affected rows: 10 486info: Records: 10 Duplicates: 0 Warnings: 0 487INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 488affected rows: 20 489info: Records: 20 Duplicates: 0 Warnings: 0 490# Flush out the old table definition so it can be replaced 491FLUSH TABLE t575; 492affected rows: 0 493# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 494# table. InnoDB internals is the same. Notice char(64) instead of (63)! 495# Flush the table data files 496FLUSH TABLE t575 FOR EXPORT; 497affected rows: 0 498Warnings: 499Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 500found 3 *.ibd file(s) 501.par file exists 502.frm created by version: 50705 503DB_TYPE (byte 3): 20 504DEFAULT_PART_DB_TYPE (byte 61): 12 505DB_TYPE string: 'partition' 506UNLOCK TABLES; 507affected rows: 0 508ALTER TABLE t575 ENGINE = InnoDB; 509affected rows: 40 510info: Records: 40 Duplicates: 0 Warnings: 0 511# Flush the table data files 512FLUSH TABLE t575 FOR EXPORT; 513affected rows: 0 514found 3 *.ibd file(s) 515.frm created by version >= 5.7.8 516DB_TYPE (byte 3): 12 517DEFAULT_PART_DB_TYPE (byte 61): 12 518DB_TYPE string: 'InnoDB' 519UNLOCK TABLES; 520affected rows: 0 521DROP TABLE t575; 522affected rows: 0 523# ALTER PARTITION will also upgrade the table to native partitioning! 524CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 525ENGINE = InnoDB 526PARTITION BY RANGE (a) 527(PARTITION p0 VALUES LESS THAN (100), 528PARTITION p1 VALUES LESS THAN (200), 529PARTITION pmax VALUES LESS THAN MAXVALUE); 530affected rows: 0 531INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 532affected rows: 10 533info: Records: 10 Duplicates: 0 Warnings: 0 534UPDATE t575 SET b = CONCAT("Filler_", a); 535affected rows: 10 536info: Rows matched: 10 Changed: 10 Warnings: 0 537INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 538affected rows: 10 539info: Records: 10 Duplicates: 0 Warnings: 0 540INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 541affected rows: 20 542info: Records: 20 Duplicates: 0 Warnings: 0 543# Flush out the old table definition so it can be replaced 544FLUSH TABLE t575; 545affected rows: 0 546# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 547# table. InnoDB internals is the same. Notice char(64) instead of (63)! 548ALTER TABLE t575 REORGANIZE PARTITION pmax INTO 549(PARTITION p2 VALUES LESS THAN (300), 550PARTITION pmax VALUES LESS THAN MAXVALUE); 551affected rows: 0 552info: Records: 0 Duplicates: 0 Warnings: 0 553Warnings: 554Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 555found 4 *.ibd file(s) 556.frm created by version >= 5.7.8 557DB_TYPE (byte 3): 12 558DEFAULT_PART_DB_TYPE (byte 61): 12 559DB_TYPE string: 'InnoDB' 560SHOW CREATE TABLE t575; 561Table Create Table 562t575 CREATE TABLE `t575` ( 563 `a` int(11) NOT NULL, 564 `b` varchar(64) DEFAULT NULL, 565 PRIMARY KEY (`a`) 566) ENGINE=InnoDB DEFAULT CHARSET=latin1 567/*!50100 PARTITION BY RANGE (a) 568(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, 569 PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB, 570 PARTITION p2 VALUES LESS THAN (300) ENGINE = InnoDB, 571 PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ 572affected rows: 1 573DROP TABLE t575; 574affected rows: 0 575CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 576ENGINE = InnoDB 577PARTITION BY RANGE (a) 578(PARTITION p0 VALUES LESS THAN (100), 579PARTITION p1 VALUES LESS THAN (200), 580PARTITION pmax VALUES LESS THAN MAXVALUE); 581affected rows: 0 582INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 583affected rows: 10 584info: Records: 10 Duplicates: 0 Warnings: 0 585UPDATE t575 SET b = CONCAT("Filler_", a); 586affected rows: 10 587info: Rows matched: 10 Changed: 10 Warnings: 0 588INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 589affected rows: 10 590info: Records: 10 Duplicates: 0 Warnings: 0 591INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 592affected rows: 20 593info: Records: 20 Duplicates: 0 Warnings: 0 594# Flush out the old table definition so it can be replaced 595FLUSH TABLE t575; 596affected rows: 0 597# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 598# table. InnoDB internals is the same. Notice char(64) instead of (63)! 599# changing comment is default INPLACE with ha_innopart! 600ALTER TABLE t575 COMMENT = 'test comment'; 601affected rows: 0 602info: Records: 0 Duplicates: 0 Warnings: 1 603Warnings: 604Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 605found 3 *.ibd file(s) 606.frm created by version >= 5.7.8 607DB_TYPE (byte 3): 12 608DEFAULT_PART_DB_TYPE (byte 61): 12 609DB_TYPE string: 'InnoDB' 610SHOW CREATE TABLE t575; 611Table Create Table 612t575 CREATE TABLE `t575` ( 613 `a` int(11) NOT NULL, 614 `b` varchar(64) DEFAULT NULL, 615 PRIMARY KEY (`a`) 616) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='test comment' 617/*!50100 PARTITION BY RANGE (a) 618(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, 619 PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB, 620 PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ 621affected rows: 1 622DROP TABLE t575; 623affected rows: 0 624# NOTICE that REPAIR/ANALYZE does not upgrade the table! 625CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 626ENGINE = InnoDB 627PARTITION BY RANGE (a) 628(PARTITION p0 VALUES LESS THAN (100), 629PARTITION p1 VALUES LESS THAN (200), 630PARTITION pmax VALUES LESS THAN MAXVALUE); 631affected rows: 0 632INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 633affected rows: 10 634info: Records: 10 Duplicates: 0 Warnings: 0 635UPDATE t575 SET b = CONCAT("Filler_", a); 636affected rows: 10 637info: Rows matched: 10 Changed: 10 Warnings: 0 638INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 639affected rows: 10 640info: Records: 10 Duplicates: 0 Warnings: 0 641INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 642affected rows: 20 643info: Records: 20 Duplicates: 0 Warnings: 0 644# Flush out the old table definition so it can be replaced 645FLUSH TABLE t575; 646affected rows: 0 647# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 648# table. InnoDB internals is the same. Notice char(64) instead of (63)! 649REPAIR TABLE t575; 650Table Op Msg_type Msg_text 651test.t575 repair status OK 652test.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. 653affected rows: 2 654found 3 *.ibd file(s) 655.par file exists 656.frm created by version >= 5.7.8 657DB_TYPE (byte 3): 20 658DEFAULT_PART_DB_TYPE (byte 61): 12 659DB_TYPE string: 'partition' 660SHOW CREATE TABLE t575; 661Table Create Table 662t575 CREATE TABLE `t575` ( 663 `a` int(11) NOT NULL, 664 `b` varchar(64) DEFAULT NULL, 665 PRIMARY KEY (`a`) 666) ENGINE=InnoDB DEFAULT CHARSET=latin1 667/*!50100 PARTITION BY RANGE (a) 668(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB, 669 PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB, 670 PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ 671Warnings: 672Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 673# File list of test/t575* 674t575#P#p0.ibd 675t575#P#p1.ibd 676t575#P#pmax.ibd 677t575.frm 678t575.par 679ANALYZE TABLE t575; 680Table Op Msg_type Msg_text 681test.t575 analyze status OK 682test.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. 683found 3 *.ibd file(s) 684.par file exists 685.frm created by version >= 5.7.8 686DB_TYPE (byte 3): 20 687DEFAULT_PART_DB_TYPE (byte 61): 12 688DB_TYPE string: 'partition' 689# But OPTIMIZE does upgrade to native partitioning! 690OPTIMIZE TABLE t575; 691Table Op Msg_type Msg_text 692test.t575 optimize note Table does not support optimize, doing recreate + analyze instead 693test.t575 optimize status OK 694test.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. 695Warnings: 696Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 697found 3 *.ibd file(s) 698.frm created by version >= 5.7.8 699DB_TYPE (byte 3): 12 700DEFAULT_PART_DB_TYPE (byte 61): 12 701DB_TYPE string: 'InnoDB' 702DROP TABLE t575; 703CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 704ENGINE = InnoDB 705PARTITION BY RANGE (a) 706(PARTITION p0 VALUES LESS THAN (100), 707PARTITION p1 VALUES LESS THAN (200), 708PARTITION pmax VALUES LESS THAN MAXVALUE); 709INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 710UPDATE t575 SET b = CONCAT("Filler_", a); 711INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 712INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 713# Flush out the old table definition so it can be replaced 714FLUSH TABLE t575; 715# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 716# table. InnoDB internals is the same. Notice char(64) instead of (63)! 717found 3 *.ibd file(s) 718.par file exists 719.frm created by version: 50705 720DB_TYPE (byte 3): 20 721DEFAULT_PART_DB_TYPE (byte 61): 12 722DB_TYPE string: 'partition' 723ALTER TABLE t575 MODIFY b varchar(65), ALGORITHM = INPLACE; 724affected rows: 0 725info: Records: 0 Duplicates: 0 Warnings: 1 726Warnings: 727Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 728found 3 *.ibd file(s) 729.frm created by version >= 5.7.8 730DB_TYPE (byte 3): 12 731DEFAULT_PART_DB_TYPE (byte 61): 12 732DB_TYPE string: 'InnoDB' 733DROP TABLE t575; 734CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 735ENGINE = InnoDB 736PARTITION BY RANGE (a) 737(PARTITION p0 VALUES LESS THAN (100), 738PARTITION p1 VALUES LESS THAN (200), 739PARTITION pmax VALUES LESS THAN MAXVALUE); 740INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 741UPDATE t575 SET b = CONCAT("Filler_", a); 742INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 743INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 744# Flush out the old table definition so it can be replaced 745FLUSH TABLE t575; 746# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 747# table. InnoDB internals is the same. Notice char(64) instead of (63)! 748found 3 *.ibd file(s) 749.par file exists 750.frm created by version: 50705 751DB_TYPE (byte 3): 20 752DEFAULT_PART_DB_TYPE (byte 61): 12 753DB_TYPE string: 'partition' 754ALTER TABLE t575 change b c varchar(65); 755affected rows: 0 756info: Records: 0 Duplicates: 0 Warnings: 1 757Warnings: 758Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 759found 3 *.ibd file(s) 760.frm created by version >= 5.7.8 761DB_TYPE (byte 3): 12 762DEFAULT_PART_DB_TYPE (byte 61): 12 763DB_TYPE string: 'InnoDB' 764DROP TABLE t575; 765CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 766ENGINE = InnoDB 767PARTITION BY RANGE (a) 768(PARTITION p0 VALUES LESS THAN (100), 769PARTITION p1 VALUES LESS THAN (200), 770PARTITION pmax VALUES LESS THAN MAXVALUE); 771INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 772UPDATE t575 SET b = CONCAT("Filler_", a); 773INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 774INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 775# Flush out the old table definition so it can be replaced 776FLUSH TABLE t575; 777# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 778# table. InnoDB internals is the same. Notice char(64) instead of (63)! 779found 3 *.ibd file(s) 780.par file exists 781.frm created by version: 50705 782DB_TYPE (byte 3): 20 783DEFAULT_PART_DB_TYPE (byte 61): 12 784DB_TYPE string: 'partition' 785ALTER TABLE t575 ADD INDEX (b); 786affected rows: 0 787info: Records: 0 Duplicates: 0 Warnings: 1 788Warnings: 789Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 790found 3 *.ibd file(s) 791.frm created by version >= 5.7.8 792DB_TYPE (byte 3): 12 793DEFAULT_PART_DB_TYPE (byte 61): 12 794DB_TYPE string: 'InnoDB' 795DROP TABLE t575; 796CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 797ENGINE = InnoDB 798PARTITION BY RANGE (a) 799(PARTITION p0 VALUES LESS THAN (100), 800PARTITION p1 VALUES LESS THAN (200), 801PARTITION pmax VALUES LESS THAN MAXVALUE); 802INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 803UPDATE t575 SET b = CONCAT("Filler_", a); 804INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 805INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 806# Flush out the old table definition so it can be replaced 807FLUSH TABLE t575; 808# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 809# table. InnoDB internals is the same. Notice char(64) instead of (63)! 810found 3 *.ibd file(s) 811.par file exists 812.frm created by version: 50705 813DB_TYPE (byte 3): 20 814DEFAULT_PART_DB_TYPE (byte 61): 12 815DB_TYPE string: 'partition' 816CREATE INDEX b ON t575 (b); 817affected rows: 0 818info: Records: 0 Duplicates: 0 Warnings: 1 819Warnings: 820Warning 1287 The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead. 821found 3 *.ibd file(s) 822.frm created by version >= 5.7.8 823DB_TYPE (byte 3): 12 824DEFAULT_PART_DB_TYPE (byte 61): 12 825DB_TYPE string: 'InnoDB' 826DROP TABLE t575; 827CREATE TABLE t575 (a int PRIMARY KEY, b varchar(63)) 828ENGINE = InnoDB 829PARTITION BY RANGE (a) 830(PARTITION p0 VALUES LESS THAN (100), 831PARTITION p1 VALUES LESS THAN (200), 832PARTITION pmax VALUES LESS THAN MAXVALUE); 833INSERT INTO t575 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); 834UPDATE t575 SET b = CONCAT("Filler_", a); 835INSERT INTO t575 SELECT a + 100, CONCAT("Filler_", a + 100) FROM t575; 836INSERT INTO t575 SELECT a + 200, CONCAT("Filler_", a + 200) FROM t575; 837# Flush out the old table definition so it can be replaced 838FLUSH TABLE t575; 839# Replace the .frm and copy a .par file, so it is the same as a 5.7.5 840# table. InnoDB internals is the same. Notice char(64) instead of (63)! 841found 3 *.ibd file(s) 842.par file exists 843.frm created by version: 50705 844DB_TYPE (byte 3): 20 845DEFAULT_PART_DB_TYPE (byte 61): 12 846DB_TYPE string: 'partition' 847DROP INDEX `PRIMARY` ON t575; 848affected rows: 40 849info: Records: 40 Duplicates: 0 Warnings: 0 850found 3 *.ibd file(s) 851.frm created by version >= 5.7.8 852DB_TYPE (byte 3): 12 853DEFAULT_PART_DB_TYPE (byte 61): 12 854DB_TYPE string: 'InnoDB' 855DROP TABLE t575; 856