diff options
author | Georgi Kodinov <joro@sun.com> | 2010-01-29 11:36:28 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2010-01-29 11:36:28 +0200 |
commit | 443003a467ab11b2d34e8d67658338659348325b (patch) | |
tree | f1b1afe0eb664baa572905ec01d1a82a316eb335 /mysql-test/r/delete.result | |
parent | c3a73a8f6d674de1e9efcb498f3343db802d6a6c (diff) | |
download | mariadb-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/r/delete.result')
-rw-r--r-- | mysql-test/r/delete.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result index 1df19a75854..58278492985 100644 --- a/mysql-test/r/delete.result +++ b/mysql-test/r/delete.result @@ -337,3 +337,16 @@ END | DELETE IGNORE FROM t1; ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. DROP TABLE t1; +# +# Bug #49552 : sql_buffer_result cause crash + not found records +# in multitable delete/subquery +# +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; +a +DROP TABLE t1; +End of 5.1 tests |