summaryrefslogtreecommitdiff
path: root/mysql-test/t/delete.test
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2010-01-29 11:36:28 +0200
committerGeorgi Kodinov <joro@sun.com>2010-01-29 11:36:28 +0200
commit443003a467ab11b2d34e8d67658338659348325b (patch)
treef1b1afe0eb664baa572905ec01d1a82a316eb335 /mysql-test/t/delete.test
parentc3a73a8f6d674de1e9efcb498f3343db802d6a6c (diff)
downloadmariadb-git-443003a467ab11b2d34e8d67658338659348325b.tar.gz
Bug #49552 : sql_buffer_result cause crash + not found records
in multitable delete/subquery SQL_BUFFER_RESULT should not have an effect on non-SELECT statements according to our documentation. Fixed by not passing it through to multi-table DELETE (similarly to how it's done for multi-table UPDATE).
Diffstat (limited to 'mysql-test/t/delete.test')
-rw-r--r--mysql-test/t/delete.test19
1 files changed, 18 insertions, 1 deletions
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test
index a5dff38c078..2f51fafd6a6 100644
--- a/mysql-test/t/delete.test
+++ b/mysql-test/t/delete.test
@@ -357,4 +357,21 @@ END |
--error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG
DELETE IGNORE FROM t1;
-DROP TABLE t1; \ No newline at end of file
+DROP TABLE t1;
+
+
+--echo #
+--echo # Bug #49552 : sql_buffer_result cause crash + not found records
+--echo # in multitable delete/subquery
+--echo #
+
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SET SESSION SQL_BUFFER_RESULT=1;
+DELETE t1 FROM (SELECT SUM(a) a FROM t1) x,t1;
+
+SET SESSION SQL_BUFFER_RESULT=DEFAULT;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+--echo End of 5.1 tests