Skip to content

Commit

Permalink
Record in test suite that temporary tables only uses write locks
Browse files Browse the repository at this point in the history
  • Loading branch information
montywi committed Jun 7, 2021
1 parent 3d6eb7a commit be84f9c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mysql-test/main/temp_table.result
Original file line number Diff line number Diff line change
Expand Up @@ -619,3 +619,15 @@ ERROR 42S02: Unknown table 'test.t2'
#
# End of 10.5 tests
#
#
# Record that temporary table locks are always WRITE locks
#
CREATE TEMPORARY TABLE t1 (a INT);
LOCK TABLE t1 READ;
TRUNCATE TABLE t1;
TRUNCATE TABLE t1;
UNLOCK TABLES;
DROP TABLE t1;
#
# End of 10.6 tests
#
14 changes: 14 additions & 0 deletions mysql-test/main/temp_table.test
Original file line number Diff line number Diff line change
Expand Up @@ -681,3 +681,17 @@ drop temporary table t2;
--echo # End of 10.5 tests
--echo #

--echo #
--echo # Record that temporary table locks are always WRITE locks
--echo #

CREATE TEMPORARY TABLE t1 (a INT);
LOCK TABLE t1 READ;
TRUNCATE TABLE t1;
TRUNCATE TABLE t1;
UNLOCK TABLES;
DROP TABLE t1;

--echo #
--echo # End of 10.6 tests
--echo #

0 comments on commit be84f9c

Please sign in to comment.