diff options
author | Jan Lindström <jplindst@mariadb.org> | 2014-04-16 12:13:43 +0300 |
---|---|---|
committer | Jan Lindström <jplindst@mariadb.org> | 2014-04-16 12:13:43 +0300 |
commit | 150e88e8c9b85e3e6ce500a91fd215d231e99881 (patch) | |
tree | e029a8c9beae4cf67edc5239694c68f8b4de28c0 /sql/sql_base.cc | |
parent | 983366e0eef50b95329bcba154ee4fb38b85df3c (diff) | |
parent | 142c20eda9d287f7f898dd8d89821f0e809dafc6 (diff) | |
download | mariadb-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.cc | 11 |
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. |