diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-11-26 14:51:48 +0200 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-11-26 14:51:48 +0200 |
commit | c5987223db0158389602e57c25c13368aad80b34 (patch) | |
tree | c48ad0e6cae3c6805e0e56810c191edf4210919f /sql/sql_select.cc | |
parent | 7074a99580ea7b89aef387838205778401d002c3 (diff) | |
parent | dce374bb663c0450546a6836cea763e8c3eca8dd (diff) | |
download | mariadb-git-c5987223db0158389602e57c25c13368aad80b34.tar.gz |
merge
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 748071986b1..c17cb946fa3 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1713,6 +1713,9 @@ JOIN::reinit() func->clear(); } + if (!(select_options & SELECT_DESCRIBE)) + init_ftfuncs(thd, select_lex, test(order)); + DBUG_RETURN(0); } @@ -2487,6 +2490,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 { @@ -13206,6 +13216,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 || @@ -13219,7 +13231,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; } |