Bug #86809 | Failed to drop tablespace after unsuccessful attempt to create partitioned table | ||
---|---|---|---|
Submitted: | 23 Jun 2017 8:47 | Modified: | 23 Jun 2017 9:12 |
Reporter: | Sergei Glushchenko | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S1 (Critical) |
Version: | 5.7.18 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[23 Jun 2017 8:47]
Sergei Glushchenko
[23 Jun 2017 9:01]
Sergei Glushchenko
My bad. Crash happened due to wrong --basedir option provided. With proper basedir I got mysql> DROP TABLESPACE ts_compressed; ERROR 1529 (HY000): Failed to drop TABLESPACE ts_compressed Which still looks incorrect. mysql> SHOW TABLES; Empty set (0.00 sec) And there is leftover file-per-table partition as well: mysql> SELECT FILE_NAME FROM INFORMATION_SCHEMA.FILES; +---------------------------------------+ | FILE_NAME | +---------------------------------------+ | ./ibdata1 | | ./mysql/engine_cost.ibd | | ./mysql/gtid_executed.ibd | | ./mysql/help_category.ibd | | ./mysql/help_keyword.ibd | | ./mysql/help_relation.ibd | | ./mysql/help_topic.ibd | | ./mysql/innodb_index_stats.ibd | | ./mysql/innodb_table_stats.ibd | | ./mysql/plugin.ibd | | ./mysql/server_cost.ibd | | ./mysql/servers.ibd | | ./mysql/slave_master_info.ibd | | ./mysql/slave_relay_log_info.ibd | | ./mysql/slave_worker_info.ibd | | ./mysql/time_zone.ibd | | ./mysql/time_zone_leap_second.ibd | | ./mysql/time_zone_name.ibd | | ./mysql/time_zone_transition.ibd | | ./mysql/time_zone_transition_type.ibd | | ./sys/sys_config.ibd | | ./ibtmp1 | | ./ts_compressed.ibd | | ./test/t#P#p2.ibd | +---------------------------------------+
[23 Jun 2017 9:12]
MySQL Verification Team
Hello Sergei, Thank you for the report and feedback! Thanks, Umesh
[23 Jun 2017 9:13]
MySQL Verification Team
## Crash not observed but observed incorrect behavior as observed in the report [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-advanced-5.7.18: bin/mysqld-debug --basedir=$PWD --datadir=$PWD/86809 --core-file --socket=/tmp/mysql.sock --port=3306 --log-error=$PWD/86809/log.err 2>&1 & [1] 21137 [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-advanced-5.7.18: bin/mysql -uroot -S /tmp/mysql.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.18-enterprise-commercial-advanced-debug MySQL Enterprise Server - Advanced Edition Debug (Commercial) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. root@localhost [(none)]> CREATE DATABASE test; Query OK, 1 row affected (0.00 sec) root@localhost [(none)]> use test; Database changed root@localhost [test]> CREATE TABLESPACE ts_compressed ADD DATAFILE 'ts_compressed.ibd' ENGINE=InnoDB FILE_BLOCK_SIZE=8192; Query OK, 0 rows affected (0.01 sec) root@localhost [test]> CREATE TABLESPACE ts_not_compressed ADD DATAFILE 'ts_not_compressed.ibd'; Query OK, 0 rows affected (0.00 sec) root@localhost [test]> CREATE TABLE t (a INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB TABLESPACE ts_compressed ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 PARTITION BY RANGE (a) PARTITIONS 3 (PARTITION p1 VALUES LESS THAN (2), PARTITION p2 VALUES LESS THAN (4) TABLESPACE innodb_file_per_table, PARTITION p3 VALUES LESS THAN (6) TABLESPACE ts_not_compressed); DROP TABLE IF EXISTS t; ERROR 1478 (HY000): InnoDB: Tablespace `ts_not_compressed` cannot contain a COMPRESSED table root@localhost [test]> DROP TABLE IF EXISTS t; DROP TABLESPACE ts_not_compressed; Query OK, 0 rows affected, 1 warning (0.00 sec) root@localhost [test]> DROP TABLESPACE ts_not_compressed; Query OK, 0 rows affected (0.00 sec) root@localhost [test]> DROP TABLESPACE ts_compressed; ERROR 1529 (HY000): Failed to drop TABLESPACE ts_compressed root@localhost [test]> root@localhost [test]> DROP TABLESPACE ts_compressed; ERROR 1529 (HY000): Failed to drop TABLESPACE ts_compressed root@localhost [test]> SELECT FILE_NAME FROM INFORMATION_SCHEMA.FILES; +---------------------------------------+ | FILE_NAME | +---------------------------------------+ | ./ibdata1 | | ./mysql/engine_cost.ibd | | ./mysql/gtid_executed.ibd | | ./mysql/help_category.ibd | | ./mysql/help_keyword.ibd | | ./mysql/help_relation.ibd | | ./mysql/help_topic.ibd | | ./mysql/innodb_index_stats.ibd | | ./mysql/innodb_table_stats.ibd | | ./mysql/plugin.ibd | | ./mysql/server_cost.ibd | | ./mysql/servers.ibd | | ./mysql/slave_master_info.ibd | | ./mysql/slave_relay_log_info.ibd | | ./mysql/slave_worker_info.ibd | | ./mysql/time_zone.ibd | | ./mysql/time_zone_leap_second.ibd | | ./mysql/time_zone_name.ibd | | ./mysql/time_zone_transition.ibd | | ./mysql/time_zone_transition_type.ibd | | ./sys/sys_config.ibd | | ./ibtmp1 | | ./ts_compressed.ibd | | ./test/t#P#p2.ibd | +---------------------------------------+ 24 rows in set (0.00 sec) root@localhost [test]> root@localhost [test]> show tables; Empty set (0.00 sec)
[13 Dec 2018 3:52]
Satya Bodapati
This bug is automatically fixed in 8.0.13 Partitions in general tablespaces are no longer allowed