summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorJan Lindström <jplindst@mariadb.org>2014-04-16 12:13:43 +0300
committerJan Lindström <jplindst@mariadb.org>2014-04-16 12:13:43 +0300
commit150e88e8c9b85e3e6ce500a91fd215d231e99881 (patch)
treee029a8c9beae4cf67edc5239694c68f8b4de28c0 /sql/sql_base.cc
parent983366e0eef50b95329bcba154ee4fb38b85df3c (diff)
parent142c20eda9d287f7f898dd8d89821f0e809dafc6 (diff)
downloadmariadb-git-150e88e8c9b85e3e6ce500a91fd215d231e99881.tar.gz
Merge from lp:maria/5.5 to maria-5.5.37 release revision 4154.
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 9eb88e90b6b..e840b5c7072 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1942,6 +1942,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;
+ }
/*
Table is unique if it is present only once in the global list
of tables and once in the list of table locks.