forked from percona/percona-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request percona#3535 from kamil-holubicki/PS-1469-5.7
PS-1469: MEMORY table "is full" flag stuck when should not be (5.7)
- Loading branch information
Showing
3 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CALL mtr.add_suppression("The table 't1' is full"); | ||
SET @@session.max_heap_table_size = 10485760; | ||
CREATE TABLE t1 (inmem VARCHAR(8192)) ENGINE=MEMORY; | ||
CREATE PROCEDURE load_test() | ||
BEGIN | ||
DECLARE v_iterations int default 0; | ||
TRUNCATE TABLE t1; | ||
WHILE v_iterations < 8192 DO | ||
INSERT INTO t1 (inmem) VALUES (REPEAT("a", 8192)); | ||
SET v_iterations=v_iterations+1; | ||
END WHILE; | ||
END// | ||
CALL load_test; | ||
ERROR HY000: The table 't1' is full | ||
DELETE FROM t1 LIMIT 100; | ||
INSERT INTO t1 VALUES (REPEAT("a", 8192)); | ||
DROP PROCEDURE load_test; | ||
DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# | ||
# PS-1469: MEMORY table "is full" flag stuck when should not be | ||
# | ||
|
||
CALL mtr.add_suppression("The table 't1' is full"); | ||
|
||
SET @@session.max_heap_table_size = 10485760; | ||
|
||
CREATE TABLE t1 (inmem VARCHAR(8192)) ENGINE=MEMORY; | ||
|
||
DELIMITER //; | ||
|
||
CREATE PROCEDURE load_test() | ||
BEGIN | ||
DECLARE v_iterations int default 0; | ||
TRUNCATE TABLE t1; | ||
WHILE v_iterations < 8192 DO | ||
INSERT INTO t1 (inmem) VALUES (REPEAT("a", 8192)); | ||
SET v_iterations=v_iterations+1; | ||
END WHILE; | ||
END// | ||
|
||
DELIMITER ;// | ||
|
||
--error ER_RECORD_FILE_FULL | ||
CALL load_test; | ||
|
||
DELETE FROM t1 LIMIT 100; | ||
|
||
INSERT INTO t1 VALUES (REPEAT("a", 8192)); | ||
|
||
# cleanup | ||
DROP PROCEDURE load_test; | ||
DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters