summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorgkodinov/kgeorge@magare.gmz <>2007-03-20 19:49:38 +0200
committergkodinov/kgeorge@magare.gmz <>2007-03-20 19:49:38 +0200
commit354c364ad4fd23587374bfe91ca6c7de22ed2662 (patch)
tree563495cf458bd9a81b6885b7855f23c12fd43c68 /sql/sql_insert.cc
parent31b9145ab3de8813a10937f0894d3e127e78533c (diff)
parent28962a76a3a1e9bd91a85ec238f6e6fdca1736a2 (diff)
downloadmariadb-git-354c364ad4fd23587374bfe91ca6c7de22ed2662.tar.gz
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B24484-5.0
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index d9d32d14321..3c8f9fd5fc2 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -2349,12 +2349,14 @@ bool mysql_insert_select_prepare(THD *thd)
DBUG_ASSERT(select_lex->leaf_tables != 0);
lex->leaf_tables_insert= select_lex->leaf_tables;
/* skip all leaf tables belonged to view where we are insert */
- for (first_select_leaf_table= select_lex->leaf_tables->next_leaf;
+ for (first_select_leaf_table= select_lex->leaf_tables->next_leaf,
+ thd->leaf_count --;
first_select_leaf_table &&
first_select_leaf_table->belong_to_view &&
first_select_leaf_table->belong_to_view ==
lex->leaf_tables_insert->belong_to_view;
- first_select_leaf_table= first_select_leaf_table->next_leaf)
+ first_select_leaf_table= first_select_leaf_table->next_leaf,
+ thd->leaf_count --)
{}
select_lex->leaf_tables= first_select_leaf_table;
DBUG_RETURN(FALSE);