diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2008-03-28 19:16:52 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2008-03-28 19:16:52 +0400 |
commit | 0795e14ca0dd01d03fb7b804b9eaf3ef843e2ef1 (patch) | |
tree | 928d36536678630f85f55c212679a67535017a6e /mysql-test/t/temp_table.test | |
parent | 9d0385d62bfb439855ec8de027776ef847f47369 (diff) | |
download | mariadb-git-0795e14ca0dd01d03fb7b804b9eaf3ef843e2ef1.tar.gz |
Fix for bug #35392: Delete all statement does not execute properly
after few delete statements
Problem: changing a file size might require that it must be
unmapped beforehand.
Fix: unmap the file before changing its size.
mysql-test/r/temp_table.result:
Fix for bug #35392: Delete all statement does not execute properly
after few delete statements
- test result.
mysql-test/t/temp_table.test:
Fix for bug #35392: Delete all statement does not execute properly
after few delete statements
- test case.
storage/myisam/mi_delete_all.c:
Fix for bug #35392: Delete all statement does not execute properly
after few delete statements
- unmap file before changing its size as it's required
by SetEndOfFile() function (see my_chsize()).
- as no other threads allowed to perform concurrent inserts
when delete_all is called, mmap_lock locking removed.
Diffstat (limited to 'mysql-test/t/temp_table.test')
-rw-r--r-- | mysql-test/t/temp_table.test | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test index d1ad7ab8ffa..4ab8a982e63 100644 --- a/mysql-test/t/temp_table.test +++ b/mysql-test/t/temp_table.test @@ -191,3 +191,17 @@ truncate t1; insert into t1 values (42); select * from t1; drop table t1; + +# +# Bug #35392: Delete all statement does not execute properly after +# few delete statements +# +CREATE TEMPORARY TABLE t1(a INT, b VARCHAR(20)); +INSERT INTO t1 VALUES(1, 'val1'), (2, 'val2'), (3, 'val3'); +DELETE FROM t1 WHERE a=1; +SELECT count(*) FROM t1; +DELETE FROM t1; +SELECT * FROM t1; +DROP TABLE t1; + +--echo End of 5.1 tests |