Skip to content

Commit

Permalink
BUG#29836204: P_S TABLE ACCESS HANGS WHILE IN LOCK TABLES MODE
Browse files Browse the repository at this point in the history
Analysis
========

Post push fix for test failure in embedded mode.

Change-Id: I82e06292071c58d731d85c749a1e9a5716fa8dbf
  • Loading branch information
Nisha Gopalakrishnan committed Oct 28, 2019
1 parent 106ae35 commit 5b88eb6
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 52 deletions.
25 changes: 0 additions & 25 deletions mysql-test/r/lock.result
Expand Up @@ -471,28 +471,3 @@ DROP TABLE m1, t1;
#
# End of 6.0 tests.
#
#
# Bug#29836204: P_S TABLE ACCESS HANGS WHILE IN LOCK TABLES MODE
#
SET @saved_show_compatibility_56= @@global.show_compatibility_56;
# Ensures that the P_S is used for the SHOW command.
SET GLOBAL show_compatibility_56= OFF;
CREATE TABLE t1(fld1 int) ENGINE=MYISAM;
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DISABLE KEYS;
# Without patch, the SHOW command hangs.
SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';
Variable_name Value
foreign_key_checks ON
# Wihout patch, the SELECT from P_S hangs.
SELECT * FROM performance_schema.global_variables WHERE variable_name="read_only";
VARIABLE_NAME VARIABLE_VALUE
read_only OFF
# Test added for coverage (Querying from I_S)
SET GLOBAL show_compatibility_56= @saved_show_compatibility_56;
SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';
Variable_name Value
foreign_key_checks ON
# Clean up.
UNLOCK TABLES;
DROP TABLE t1;
25 changes: 25 additions & 0 deletions mysql-test/r/status_debug.result
Expand Up @@ -51,3 +51,28 @@ SELECT (SELECT val FROM t1 WHERE id = 3) - (SELECT val FROM t1 WHERE id = 2);
set global SHOW_COMPATIBILITY_56=1;
disconnect con1;
DROP TABLE t1;
#
# Bug#29836204: P_S TABLE ACCESS HANGS WHILE IN LOCK TABLES MODE
#
SET @saved_show_compatibility_56= @@global.show_compatibility_56;
# Ensures that the P_S is used for the SHOW command.
SET GLOBAL show_compatibility_56= OFF;
CREATE TABLE t1(fld1 int) ENGINE=MYISAM;
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DISABLE KEYS;
# Without patch, the SHOW command hangs.
SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';
Variable_name Value
foreign_key_checks ON
# Wihout patch, the SELECT from P_S hangs.
SELECT * FROM performance_schema.global_variables WHERE variable_name="read_only";
VARIABLE_NAME VARIABLE_VALUE
read_only OFF
# Test added for coverage (Querying from I_S)
SET GLOBAL show_compatibility_56= @saved_show_compatibility_56;
SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';
Variable_name Value
foreign_key_checks ON
# Clean up.
UNLOCK TABLES;
DROP TABLE t1;
27 changes: 0 additions & 27 deletions mysql-test/t/lock.test
Expand Up @@ -583,33 +583,6 @@ DROP TABLE m1, t1;
--echo # End of 6.0 tests.
--echo #


--echo #
--echo # Bug#29836204: P_S TABLE ACCESS HANGS WHILE IN LOCK TABLES MODE
--echo #

SET @saved_show_compatibility_56= @@global.show_compatibility_56;
--echo # Ensures that the P_S is used for the SHOW command.
SET GLOBAL show_compatibility_56= OFF;
CREATE TABLE t1(fld1 int) ENGINE=MYISAM;
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DISABLE KEYS;

--echo # Without patch, the SHOW command hangs.
SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';

--echo # Wihout patch, the SELECT from P_S hangs.
SELECT * FROM performance_schema.global_variables WHERE variable_name="read_only";

--echo # Test added for coverage (Querying from I_S)
SET GLOBAL show_compatibility_56= @saved_show_compatibility_56;
SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';

--echo # Clean up.
UNLOCK TABLES;
DROP TABLE t1;


# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc
27 changes: 27 additions & 0 deletions mysql-test/t/status_debug.test
Expand Up @@ -78,5 +78,32 @@ DROP TABLE t1;

--disable_connect_log


--echo #
--echo # Bug#29836204: P_S TABLE ACCESS HANGS WHILE IN LOCK TABLES MODE
--echo #

SET @saved_show_compatibility_56= @@global.show_compatibility_56;
--echo # Ensures that the P_S is used for the SHOW command.
SET GLOBAL show_compatibility_56= OFF;
CREATE TABLE t1(fld1 int) ENGINE=MYISAM;
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DISABLE KEYS;

--echo # Without patch, the SHOW command hangs.
SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';

--echo # Wihout patch, the SELECT from P_S hangs.
SELECT * FROM performance_schema.global_variables WHERE variable_name="read_only";

--echo # Test added for coverage (Querying from I_S)
SET GLOBAL show_compatibility_56= @saved_show_compatibility_56;
SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';

--echo # Clean up.
UNLOCK TABLES;
DROP TABLE t1;


# Wait till we reached the initial number of concurrent sessions
--source include/wait_until_count_sessions.inc

0 comments on commit 5b88eb6

Please sign in to comment.