Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into mysql.com:/home/my/mysql-5.0
This commit is contained in:
monty@mysql.com 2005-05-20 17:32:35 +03:00
commit f5f92ce146
10 changed files with 48 additions and 24 deletions

View file

@ -605,7 +605,11 @@ void field_conv(Field *to,Field *from)
to->type() != FIELD_TYPE_DATE &&
to->type() != FIELD_TYPE_DATETIME))
{ // Identical fields
memcpy(to->ptr,from->ptr,to->pack_length());
#ifdef HAVE_purify
/* This may happen if one does 'UPDATE ... SET x=x' */
if (to->ptr != from->ptr)
#endif
memcpy(to->ptr,from->ptr,to->pack_length());
return;
}
}

View file

@ -584,13 +584,8 @@ bool Item_sum_distinct::setup(THD *thd)
{
List<create_field> field_list;
create_field field_def; /* field definition */
DBUG_ENTER("Item_sum_distinct::setup");
/*
Setup can be called twice for ROLLUP items. This is a bug.
Please add DBUG_ASSERT(tree == 0) here when it's fixed.
*/
DBUG_ASSERT(tree == 0);
/*
Virtual table and the tree are created anew on each re-execution of
@ -610,7 +605,7 @@ bool Item_sum_distinct::setup(THD *thd)
args[0]->unsigned_flag);
if (! (table= create_virtual_tmp_table(thd, field_list)))
return TRUE;
return TRUE;
/* XXX: check that the case of CHAR(0) works OK */
tree_key_length= table->s->reclength - table->s->null_bytes;

View file

@ -48,7 +48,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
{
my_error(ER_VIEW_DELETE_MERGE_VIEW, MYF(0),
table_list->view_db.str, table_list->view_name.str);
DBUG_RETURN(-1);
DBUG_RETURN(TRUE);
}
table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
thd->proc_info="init";

View file

@ -1270,8 +1270,10 @@ void free_items(Item *item)
void cleanup_items(Item *item)
{
DBUG_ENTER("cleanup_items");
for (; item ; item=item->next)
item->cleanup();
DBUG_VOID_RETURN;
}
int mysql_table_dump(THD* thd, char* db, char* tbl_name, int fd)

View file

@ -12659,8 +12659,10 @@ static bool setup_sum_funcs(THD *thd, Item_sum **func_ptr)
Item_sum *func;
DBUG_ENTER("setup_sum_funcs");
while ((func= *(func_ptr++)))
{
if (func->setup(thd))
DBUG_RETURN(TRUE);
}
DBUG_RETURN(FALSE);
}
@ -12947,8 +12949,6 @@ bool JOIN::rollup_make_fields(List<Item> &fields_arg, List<Item> &sel_fields,
*/
item= item->copy_or_same(thd);
((Item_sum*) item)->make_unique();
if (((Item_sum*) item)->setup(thd))
return 1;
*(*func)= (Item_sum*) item;
(*func)++;
}