diff options
author | bell@sanja.is.com.ua <> | 2004-04-08 00:16:17 +0300 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2004-04-08 00:16:17 +0300 |
commit | 5e37c41faee13cdc977842d253e6da0266766baf (patch) | |
tree | fd9a8f8f063a77fbde120e4c655eda322010feeb /sql/sql_union.cc | |
parent | 75e7ca479e52e14358df0b70c35e6c604c6bca72 (diff) | |
download | mariadb-git-5e37c41faee13cdc977842d253e6da0266766baf.tar.gz |
new error for unsupported command in PS
fixed IN subselect with basic constant left expression
SQLCOM_CREATE_TABLE, SQLCOM_UPDATE_MULTI, SQLCOM_REPLACE_SELECT, SQLCOM_INSERT_SELECT, QLCOM_DELETE_MULTI fixed to be compatible with PS (BUG#3398, BUG#3406)
fixed multiupdate privelege check (BUG#3408)
fixed multiupdate tables check (BUG#3411)
unchecked commands now is rejected by PS protocol to avoid serever crash
fixed cleunup procedure to be compatible sith DO/SET (BUG#3393)
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 7265a99d6e5..468bdab9119 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -460,13 +460,24 @@ int st_select_lex_unit::cleanup() table= 0; // Safety } JOIN *join; - for (SELECT_LEX *sl= first_select_in_union(); sl; sl= sl->next_select()) + SELECT_LEX *sl= first_select_in_union(); + for (; sl; sl= sl->next_select()) { if ((join= sl->join)) { error|= sl->join->cleanup(); delete join; } + else + { + // it can be DO/SET with subqueries + for (SELECT_LEX_UNIT *lex_unit= sl->first_inner_unit(); + lex_unit != 0; + lex_unit= lex_unit->next_unit()) + { + error|= lex_unit->cleanup(); + } + } } if (fake_select_lex && (join= fake_select_lex->join)) { |