We're updating the issue view to help you get more done. 

Server is hanging in 'System lock' state while executing 'DROP DATABASE' statement.

Description

Server is hanging in 'System lock' state while executing 'DROP DATABASE' statement.

Testcase

1 2 3 4 5 6 7 8 9 10 11 12 DROP DATABASE test;CREATE DATABASE test;USE test; SET @@SESSION.SQL_MODE=(SELECT CONCAT(@@SQL_MODE,',REAL_AS_FLOAT')); CREATE TEMPORARY TABLE IF NOT EXISTS t1 (c1 BLOB,c2 VARCHAR(254) BINARY CHARACTER SET 'latin1' COLLATE 'latin1_bin',c3 VARCHAR(40) CHARACTER SET 'latin1' COLLATE 'latin1_bin', PRIMARY KEY(c1(9))) ENGINE=TokuDB; CREATE TEMPORARY TABLE IF NOT EXISTS t3 (c1 YEAR PRIMARY KEY,c2 CHAR(1) BINARY CHARACTER SET 'utf8' COLLATE 'utf8_bin',c3 NUMERIC(1) ZEROFILL) ENGINE=MEMORY; CREATE TABLE IF NOT EXISTS t3 (c1 REAL(255,30) ZEROFILL,c2 BINARY(1),c3 YEAR) ENGINE=TokuDB; ALTER TABLE t1 ADD COLUMN c4 CHAR BINARY CHARACTER SET 'utf8' COLLATE 'utf8_bin'; DROP TABLE IF EXISTS t3; INSERT INTO t3 VALUES (-1.e-10,CURRENT_TIMESTAMP()+100000,5000000000000000); ALTER TABLE t1 DROP COLUMN c2; OPTIMIZE LOCAL TABLE t1; INSERT INTO t1 SELECT * FROM t3; SELECT 1;

Please execute above testcase multiple times from cli.

1 mysql > source testcase.sql; source testcase.sql; source testcase.sql; source testcase.sql; source testcase.sql;

Processlist. PS : If you have problems connecting with the client you can use -A to skip table reads

1 2 3 4 5 6 7 8 9 10 mysql> show processlist; +----+------+-----------+------+---------+------+-------------+--------------------+-----------+---------------+ | Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined | +----+------+-----------+------+---------+------+-------------+--------------------+-----------+---------------+ | 3 | root | localhost | test | Query | 3 | System lock | DROP DATABASE test | 0 | 0 | | 4 | root | localhost | test | Query | 0 | starting | show processlist | 0 | 0 | +----+------+-----------+------+---------+------+-------------+--------------------+-----------+---------------+ 2 rows in set (0.00 sec) mysql>

Environment

None

Status

Assignee

Unassigned

Reporter

Ramesh Sivaraman

Labels

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

Freshdesk Tickets

None

Affects versions

Percona-Server-5.7.17-11

Priority

Major