summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
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 /sql/sql_parse.cc
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 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 2dd71b2214a..df2c1854914 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3352,9 +3352,9 @@ end_with_restore_list:
select_lex->where,
0, (ORDER *)NULL, (ORDER *)NULL, (Item *)NULL,
(ORDER *)NULL,
- select_lex->options | thd->options |
+ (select_lex->options | thd->options |
SELECT_NO_JOIN_CACHE | SELECT_NO_UNLOCK |
- OPTION_SETUP_TABLES_DONE,
+ OPTION_SETUP_TABLES_DONE) & ~OPTION_BUFFER_RESULT,
del_result, unit, select_lex);
res|= thd->is_error();
if (res)