2013-08-08 02:08:51 +02:00
Table Op Msg_type Msg_text
2018-05-31 12:21:59 +02:00
test.innodb_stats_drop_locked analyze status Engine-independent statistics collected
2013-08-08 02:08:51 +02:00
test.innodb_stats_drop_locked analyze status OK
SET autocommit=0;
SELECT table_name FROM mysql.innodb_table_stats
WHERE table_name='innodb_stats_drop_locked'
FOR UPDATE;
table_name
innodb_stats_drop_locked
SELECT table_name FROM mysql.innodb_index_stats
WHERE table_name='innodb_stats_drop_locked'
FOR UPDATE;
table_name
innodb_stats_drop_locked
innodb_stats_drop_locked
innodb_stats_drop_locked
innodb_stats_drop_locked
innodb_stats_drop_locked
innodb_stats_drop_locked
innodb_stats_drop_locked
2016-03-25 17:51:22 +01:00
connect con1,localhost,root,,;
connection con1;
2013-08-08 02:08:51 +02:00
ALTER TABLE innodb_stats_drop_locked DROP INDEX c_key;
Warnings:
Warning 1205 Unable to delete statistics for index c_key from mysql.innodb_index_stats because the rows are locked: Lock wait timeout. They can be deleted later using DELETE FROM mysql.innodb_index_stats WHERE database_name = 'test' AND table_name = 'innodb_stats_drop_locked' AND index_name = 'c_key';
SHOW CREATE TABLE innodb_stats_drop_locked;
Table Create Table
innodb_stats_drop_locked CREATE TABLE `innodb_stats_drop_locked` (
`c` int(11) DEFAULT NULL
2022-09-02 15:32:14 +02:00
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci STATS_PERSISTENT=1
2013-08-08 02:08:51 +02:00
DROP TABLE innodb_stats_drop_locked;
SHOW TABLES;
Tables_in_test
2016-03-25 17:51:22 +01:00
connection default;
disconnect con1;
2013-08-08 02:08:51 +02:00
COMMIT;
SELECT table_name FROM mysql.innodb_table_stats
WHERE table_name='innodb_stats_drop_locked';
table_name
innodb_stats_drop_locked
SELECT table_name FROM mysql.innodb_index_stats
WHERE table_name='innodb_stats_drop_locked';
table_name
innodb_stats_drop_locked
innodb_stats_drop_locked
innodb_stats_drop_locked
innodb_stats_drop_locked
innodb_stats_drop_locked
innodb_stats_drop_locked
innodb_stats_drop_locked
2020-10-01 08:10:11 +02:00
DELETE FROM mysql.innodb_index_stats WHERE database_name='test' AND table_name='innodb_stats_drop_locked';
DELETE FROM mysql.innodb_table_stats WHERE database_name='test' AND table_name='innodb_stats_drop_locked';