summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-11-26 16:32:51 +0200
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-11-26 16:32:51 +0200
commit6fe1b33f201e1855f8b85dd9c5316b61d00b8021 (patch)
tree74a1415aa93abdbe676036e4386aadf2b13ea031 /sql/sql_select.cc
parentce441751ed12a80aed10b8e5d718dac34d4c68b7 (diff)
parentdb8bd7beb83e513870b16ea95381018a48a4079d (diff)
downloadmariadb-git-6fe1b33f201e1855f8b85dd9c5316b61d00b8021.tar.gz
merge
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 066b279cba0..ef2dd1d76e1 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -1756,6 +1756,9 @@ JOIN::reinit()
func->clear();
}
+ if (!(select_options & SELECT_DESCRIBE))
+ init_ftfuncs(thd, select_lex, test(order));
+
DBUG_RETURN(0);
}
@@ -2513,6 +2516,13 @@ mysql_select(THD *thd, Item ***rref_pointer_array,
{
DBUG_RETURN(TRUE);
}
+ /*
+ Original join tabs might be overwritten at first
+ subselect execution. So we need to restore them.
+ */
+ Item_subselect *subselect= select_lex->master_unit()->item;
+ if (subselect && subselect->is_uncacheable() && join->reinit())
+ DBUG_RETURN(TRUE);
}
else
{
@@ -13435,6 +13445,8 @@ static bool
list_contains_unique_index(TABLE *table,
bool (*find_func) (Field *, void *), void *data)
{
+ if (table->pos_in_table_list->outer_join)
+ return 0;
for (uint keynr= 0; keynr < table->s->keys; keynr++)
{
if (keynr == table->s->primary_key ||
@@ -13448,7 +13460,7 @@ list_contains_unique_index(TABLE *table,
key_part < key_part_end;
key_part++)
{
- if (key_part->field->maybe_null() ||
+ if (key_part->field->real_maybe_null() ||
!find_func(key_part->field, data))
break;
}