1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merged with mysql-5.1 tree.

client/mysqltest.cc:
  Manually merged
configure.in:
  Manually merged
mysql-test/r/variables.result:
  Manually merged
mysql-test/t/variables.test:
  Manually merged
mysys/my_pread.c:
  Manually merged
mysys/my_read.c:
  Manually merged
sql/mysqld.cc:
  Manually merged
storage/csv/ha_tina.h:
  Manually merged
storage/myisam/ha_myisam.cc:
  Manually merged
storage/myisam/mi_check.c:
  Manually merged
storage/myisam/mi_search.c:
  Manually merged
This commit is contained in:
Michael Widenius
2009-04-25 13:05:32 +03:00
264 changed files with 4589 additions and 1605 deletions

View File

@ -7658,7 +7658,7 @@ static COND *build_equal_items_for_cond(THD *thd, COND *cond,
if (and_level)
{
/*
Retrieve all conjucts of this level detecting the equality
Retrieve all conjuncts of this level detecting the equality
that are subject to substitution by multiple equality items and
removing each such predicate from the conjunction after having
found/created a multiple equality whose inference the predicate is.
@ -7674,6 +7674,15 @@ static COND *build_equal_items_for_cond(THD *thd, COND *cond,
li.remove();
}
/*
Check if we eliminated all the predicates of the level, e.g.
(a=a AND b=b AND a=a).
*/
if (!args->elements &&
!cond_equal.current_level.elements &&
!eq_list.elements)
return new Item_int((longlong) 1, 1);
List_iterator_fast<Item_equal> it(cond_equal.current_level);
while ((item_equal= it++))
{
@ -9820,6 +9829,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
table->in_use= thd;
table->quick_keys.init();
table->covering_keys.init();
table->merge_keys.init();
table->keys_in_use_for_query.init();
table->s= share;