summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-06-25 23:26:29 +0300
committerMonty <monty@mariadb.org>2015-06-25 23:26:29 +0300
commit8c815751c92313dfa45ef0398b609c9988a0a451 (patch)
tree8818073046a1bbe69eb6156c682a1c592bfac6b0 /sql/sql_base.cc
parent2e941fe9fce7f1667993916ff3f238a283286d3f (diff)
downloadmariadb-git-8c815751c92313dfa45ef0398b609c9988a0a451.tar.gz
Problem was that for cases like:
SELECT ... WHERE XX IN (SELECT YY) this was transformed to something like: SELECT ... WHERE IF_EXISTS(SELECT ... HAVING XX=YY) The bug was that for normal execution XX was fixed in the original outer SELECT context while in PS it was fixed in the sub query context and this confused the optimizer. Fixed by ensuring that XX is always fixed in the outer context.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index fcd17b25b2d..aefa82405ff 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -6859,6 +6859,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
if (item->cached_table)
{
+ DBUG_PRINT("info", ("using cached table"));
/*
This shortcut is used by prepared statements. We assume that
TABLE_LIST *first_table is not changed during query execution (which
@@ -6935,8 +6936,6 @@ find_field_in_tables(THD *thd, Item_ident *item,
return found;
}
}
- else
- item->can_be_depended= TRUE;
if (db && lower_case_table_names)
{