1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-recentcommmerge

into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1


client/mysqlcheck.c:
  Auto merged
configure.in:
  Auto merged
include/config-win.h:
  Auto merged
mysql-test/r/func_in.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/func_in.test:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
sql/sql_lex.h:
  SCCS merged
This commit is contained in:
unknown
2007-10-29 12:42:06 -04:00
368 changed files with 12510 additions and 12534 deletions

View File

@ -2466,7 +2466,13 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
DBUG_RETURN(0);
}
/* close handler tables which are marked for flush */
/*
In order for the back off and re-start process to work properly,
handler tables having old versions (due to FLUSH TABLES or pending
name-lock) MUST be closed. This is specially important if a name-lock
is pending for any table of the handler_tables list, otherwise a
deadlock may occur.
*/
if (thd->handler_tables)
mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE, TRUE);
@ -2533,6 +2539,10 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
table->db_stat == 0 signals wait_for_locked_table_names
that the tables in question are not used any more. See
table_is_used call for details.
Notice that HANDLER tables were already taken care of by
the earlier call to mysql_ha_flush() in this same critical
section.
*/
close_old_data_files(thd,thd->open_tables,0,0);
/*
@ -6553,10 +6563,7 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
!any_privileges)
{
field_iterator.set(tables);
if (check_grant_all_columns(thd, SELECT_ACL, field_iterator.grant(),
field_iterator.db_name(),
field_iterator.table_name(),
&field_iterator))
if (check_grant_all_columns(thd, SELECT_ACL, &field_iterator))
DBUG_RETURN(TRUE);
}
#endif
@ -7748,7 +7755,17 @@ open_performance_schema_table(THD *thd, TABLE_LIST *one_table,
table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET;
}
else
{
/*
If error in mysql_lock_tables(), open_ltable doesn't close the
table. Thread kill during mysql_lock_tables() is such error. But
open tables cannot be accepted when restoring the open tables
state.
*/
if (thd->killed)
close_thread_tables(thd);
thd->restore_backup_open_tables_state(backup);
}
thd->utime_after_lock= save_utime_after_lock;
DBUG_RETURN(table);