summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <sanja@montyprogram.com>2014-03-07 13:57:07 +0200
committerunknown <sanja@montyprogram.com>2014-03-07 13:57:07 +0200
commit321ff25f3d419bc1a1fae2390450d1b4db30b64c (patch)
treeb67582cb1540d4174936149df2f103507bd7a74b /sql/sql_base.cc
parent1f2ef5740360148961151a71603faae497919aa6 (diff)
downloadmariadb-git-321ff25f3d419bc1a1fae2390450d1b4db30b64c.tar.gz
MDEV-5740: Assertion `!derived->first_select()->exclude_from_table_unique_test || derived->outer_select()-> exclude_from_table_unique_test' failed on 2nd execution of PS with derived_merge
Do not check tables of executed units. Debug info about stages of derived tables execution added.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 4e8847d1fe0..9d3a59afa0b 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1735,6 +1735,17 @@ retry:
DBUG_PRINT("info", ("real table: %s.%s", d_name, t_name));
for (TABLE_LIST *tl= table_list;;)
{
+ if (tl &&
+ tl->select_lex && tl->select_lex->master_unit() &&
+ tl->select_lex->master_unit()->executed)
+ {
+ /*
+ There is no sense to check tables of already executed parts
+ of the query
+ */
+ tl= tl->next_global;
+ continue;
+ }
if (((! (res= find_table_in_global_list(tl, d_name, t_name))) &&
(! (res= mysql_lock_have_duplicate(thd, table, tl)))) ||
((!res->table || res->table != table->table) &&