summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-05-16 22:39:43 -0700
committerIgor Babaev <igor@askmonty.org>2011-05-16 22:39:43 -0700
commit704f97035fed1a454ea3300d2ad5dda906dbce50 (patch)
tree7204d0246b026782b99b8effe9a0ec682e90e209 /sql/sql_load.cc
parent7b797fe66d7167a8f5cbb071a06a640a627f2186 (diff)
parenta8be09a9f26b43139ad84ead314898d23394f673 (diff)
downloadmariadb-git-704f97035fed1a454ea3300d2ad5dda906dbce50.tar.gz
Merged the code of MWL#106 into 5.3
Resolved all conflicts, bad merges and fixed a few minor bugs in the code. Commented out the queries from multi_update, view, subselect_sj, func_str, derived_view, view_grant that failed either with crashes in ps-protocol or with wrong results. The failures are clear indications of some bugs in the code and these bugs are to be fixed.
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index d6276d2f47c..905d32892d9 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -172,12 +172,15 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
if (open_and_lock_tables(thd, table_list))
DBUG_RETURN(TRUE);
+ if (mysql_handle_single_derived(thd->lex, table_list, DT_MERGE_FOR_INSERT) ||
+ mysql_handle_single_derived(thd->lex, table_list, DT_PREPARE))
+ DBUG_RETURN(TRUE);
if (setup_tables_and_check_access(thd, &thd->lex->select_lex.context,
&thd->lex->select_lex.top_join_list,
table_list,
- &thd->lex->select_lex.leaf_tables, FALSE,
+ thd->lex->select_lex.leaf_tables, FALSE,
INSERT_ACL | UPDATE_ACL,
- INSERT_ACL | UPDATE_ACL))
+ INSERT_ACL | UPDATE_ACL, FALSE))
DBUG_RETURN(-1);
if (!table_list->table || // do not suport join view
!table_list->updatable || // and derived tables