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

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

into mysql.com:/home/my/mysql-5.0


BitKeeper/etc/ignore:
  auto-union
sql/item_subselect.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
This commit is contained in:
unknown
2004-11-09 21:47:46 +02:00
247 changed files with 10313 additions and 17030 deletions

View File

@ -509,7 +509,7 @@ void close_temporary_tables(THD *thd)
*/
query_buf_size+= table->key_length+1;
if ((query = alloc_root(&thd->mem_root, query_buf_size)))
if ((query = alloc_root(thd->mem_root, query_buf_size)))
// Better add "if exists", in case a RESET MASTER has been done
end=strmov(query, "DROP /*!40005 TEMPORARY */ TABLE IF EXISTS ");
@ -824,7 +824,7 @@ TABLE *reopen_name_locked_table(THD* thd, TABLE_LIST* table_list)
pthread_mutex_lock(&LOCK_open);
if (open_unireg_entry(thd, table, db, table_name, table_name, 0,
&thd->mem_root) ||
thd->mem_root) ||
!(table->table_cache_key =memdup_root(&table->mem_root,(char*) key,
key_length)))
{
@ -1144,7 +1144,7 @@ bool reopen_table(TABLE *table,bool locked)
safe_mutex_assert_owner(&LOCK_open);
if (open_unireg_entry(table->in_use, &tmp, db, table_name,
table->table_name, 0, &table->in_use->mem_root))
table->table_name, 0, table->in_use->mem_root))
goto end;
free_io_cache(table);
@ -1783,7 +1783,7 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type)
thd->current_tablenr= 0;
/* open_ltable can be used only for BASIC TABLEs */
table_list->required_type= FRMTYPE_TABLE;
while (!(table= open_table(thd, table_list, &thd->mem_root, &refresh)) &&
while (!(table= open_table(thd, table_list, thd->mem_root, &refresh)) &&
refresh)
;
@ -2608,24 +2608,20 @@ int setup_wild(THD *thd, TABLE_LIST *tables, List<Item> &fields,
List<Item> *sum_func_list,
uint wild_num)
{
Item *item;
DBUG_ENTER("setup_wild");
if (!wild_num)
DBUG_RETURN(0);
return(0);
Item_arena *arena= thd->current_arena, backup;
Item *item;
List_iterator<Item> it(fields);
Item_arena *arena, backup;
DBUG_ENTER("setup_wild");
/*
Don't use arena if we are not in prepared statements or stored procedures
For PS/SP we have to use arena to remember the changes
*/
if (arena->is_conventional())
arena= 0; // For easier test later one
else
thd->set_n_backup_item_arena(arena, &backup);
arena= thd->change_arena_if_needed(&backup);
List_iterator<Item> it(fields);
while (wild_num && (item= it++))
{
if (item->type() == Item::FIELD_ITEM &&
@ -3014,7 +3010,8 @@ insert_fields(THD *thd, TABLE_LIST *tables, const char *db_name,
during cleunup() this item will be put in list to replace
expression from VIEW
*/
thd->nocheck_register_item_tree_change(it->ref(), item, &thd->mem_root);
thd->nocheck_register_item_tree_change(it->ref(), item,
thd->mem_root);
}
}
/* All fields are used */
@ -3119,7 +3116,7 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds)
}
if (arena)
thd->set_n_backup_item_arena(arena, &backup);
arena= thd->change_arena_if_needed(&backup);
TABLE *t1=tab1->table;
TABLE *t2=tab2->table;
@ -3220,7 +3217,7 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds)
embedding->nested_join->join_list.head() == embedded);
}
if (arena)
if (!thd->current_arena->is_conventional())
{
/*
We are in prepared statement preparation code => we should store