summaryrefslogtreecommitdiff
path: root/mysql-test/r/heap_hash.result
diff options
context:
space:
mode:
authorGleb Shchepa <gshchepa@mysql.com>2010-07-29 01:02:43 +0400
committerGleb Shchepa <gshchepa@mysql.com>2010-07-29 01:02:43 +0400
commit95d9205c170dd70967a95d33e91200be0c9f8415 (patch)
tree48f6c38311592333d70c6139b2b532d2aa32bd88 /mysql-test/r/heap_hash.result
parente4cbcaf942796e5ba1f865485ea56c3903cf2fb8 (diff)
downloadmariadb-git-95d9205c170dd70967a95d33e91200be0c9f8415.tar.gz
Bug #55472: Assertion failed in heap_rfirst function of hp_rfirst.c on
DELETE statement Single-table delete ordered by a field that has a hash-type index may cause an assertion failure or a crash. An optimization added by the fix for the bug 36569 forced the optimizer to use ORDER BY-compatible indices when applicable. However, the existence of unsorted indices (HASH index algorithm for some engines such as MEMORY/HEAP, NDB) was ignored. The test_if_order_by_key function has been modified to skip unsorted indices. mysql-test/r/heap_hash.result: Test case for bug #55472. mysql-test/t/heap_hash.test: Test case for bug #55472. sql/sql_select.cc: Bug #55472: Assertion failed in heap_rfirst function of hp_rfirst.c on DELETE statement The test_if_order_by_key function has been modified to skip unsorted indices.
Diffstat (limited to 'mysql-test/r/heap_hash.result')
-rw-r--r--mysql-test/r/heap_hash.result11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/heap_hash.result b/mysql-test/r/heap_hash.result
index 7cc76611fb8..e3a3e0e9740 100644
--- a/mysql-test/r/heap_hash.result
+++ b/mysql-test/r/heap_hash.result
@@ -382,3 +382,14 @@ INSERT INTO t1 VALUES('A ', 'A ');
ERROR 23000: Duplicate entry 'A -A ' for key 'key1'
DROP TABLE t1;
End of 5.0 tests
+#
+# Bug #55472: Assertion failed in heap_rfirst function of hp_rfirst.c
+# on DELETE statement
+#
+CREATE TABLE t1 (col_int_nokey INT,
+col_int_key INT,
+INDEX(col_int_key) USING HASH) ENGINE = HEAP;
+INSERT INTO t1 (col_int_nokey, col_int_key) VALUES (3, 0), (4, 0), (3, 1);
+DELETE FROM t1 WHERE col_int_nokey = 5 ORDER BY col_int_key LIMIT 2;
+DROP TABLE t1;
+End of 5.5 tests