diff options
author | bell@sanja.is.com.ua <> | 2005-03-28 15:13:31 +0300 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2005-03-28 15:13:31 +0300 |
commit | 1659dacab1b2a0228c032e5a08d1b8ce2da69eac (patch) | |
tree | abaf6431b6a4ac4bc0bfee9962284ccf6a91588a /sql/sql_derived.cc | |
parent | eeeedd31b9a99e73914ab831cfb167147382880a (diff) | |
download | mariadb-git-1659dacab1b2a0228c032e5a08d1b8ce2da69eac.tar.gz |
fixed mechanism of detection selection from table wich we update
(BUG##9398, BUG#8703)
fixed wrong join view detection in multi-delete which lead to server crash
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r-- | sql/sql_derived.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index eb7b3e8a319..4fcde212716 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -43,8 +43,10 @@ int mysql_handle_derived(LEX *lex, int (*processor)(THD*, LEX*, TABLE_LIST*)) { + int res= 0; if (lex->derived_tables) { + lex->thd->derived_tables_processing= TRUE; for (SELECT_LEX *sl= lex->all_selects_list; sl; sl= sl->next_select_in_list()) @@ -53,9 +55,8 @@ mysql_handle_derived(LEX *lex, int (*processor)(THD*, LEX*, TABLE_LIST*)) cursor; cursor= cursor->next_local) { - int res; if ((res= (*processor)(lex->thd, lex, cursor))) - return res; + goto out; } if (lex->describe) { @@ -68,7 +69,9 @@ mysql_handle_derived(LEX *lex, int (*processor)(THD*, LEX*, TABLE_LIST*)) } } } - return 0; +out: + lex->thd->derived_tables_processing= FALSE; + return res; } |