mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Manual resolving for the following files
Text conflict in mysql-test/collections/default.experimental Text conflict in mysql-test/r/show_check.result Text conflict in mysql-test/r/sp-code.result Text conflict in mysql-test/suite/binlog/r/binlog_tmp_table.result Text conflict in mysql-test/suite/rpl/t/disabled.def Text conflict in mysql-test/t/show_check.test Text conflict in mysys/my_delete.c Text conflict in sql/item.h Text conflict in sql/item_cmpfunc.h Text conflict in sql/log.cc Text conflict in sql/mysqld.cc Text conflict in sql/repl_failsafe.cc Text conflict in sql/slave.cc Text conflict in sql/sql_parse.cc Text conflict in sql/sql_table.cc Text conflict in sql/sql_yacc.yy Text conflict in storage/myisam/ha_myisam.cc Corrected results for stm_auto_increment_bug33029.reject 2009-12-01 20:01:49.000000000 +0300 <andrei> @@ -42,9 +42,6 @@ <andrei> RETURN i; <andrei> END// <andrei> CALL p1(); <andrei> -Warnings: <andrei> -Note 1592 Statement may not be safe to log in statement format. <andrei> -Note 1592 Statement may not be safe to log in statement format. There should be indeed no Note present because there is in fact autoincrement top-level query in sp() that triggers inserting in yet another auto-inc table. (todo: alert DaoGang to improve the test).
This commit is contained in:
@ -4304,73 +4304,6 @@ static int send_check_errmsg(THD *thd, TABLE_LIST* table,
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int prepare_for_restore(THD* thd, TABLE_LIST* table,
|
||||
HA_CHECK_OPT *check_opt)
|
||||
{
|
||||
DBUG_ENTER("prepare_for_restore");
|
||||
|
||||
if (table->table) // do not overwrite existing tables on restore
|
||||
{
|
||||
DBUG_RETURN(send_check_errmsg(thd, table, "restore",
|
||||
"table exists, will not overwrite on restore"
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
char* backup_dir= thd->lex->backup_dir;
|
||||
char src_path[FN_REFLEN], dst_path[FN_REFLEN + 1], uname[FN_REFLEN];
|
||||
char* table_name= table->table_name;
|
||||
char* db= table->db;
|
||||
|
||||
tablename_to_filename(table->table_name, uname, sizeof(uname) - 1);
|
||||
|
||||
if (fn_format_relative_to_data_home(src_path, uname, backup_dir, reg_ext))
|
||||
DBUG_RETURN(-1); // protect buffer overflow
|
||||
|
||||
build_table_filename(dst_path, sizeof(dst_path) - 1,
|
||||
db, table_name, reg_ext, 0);
|
||||
|
||||
if (lock_and_wait_for_table_name(thd,table))
|
||||
DBUG_RETURN(-1);
|
||||
|
||||
if (my_copy(src_path, dst_path, MYF(MY_WME)))
|
||||
{
|
||||
pthread_mutex_lock(&LOCK_open);
|
||||
unlock_table_name(thd, table);
|
||||
pthread_mutex_unlock(&LOCK_open);
|
||||
DBUG_RETURN(send_check_errmsg(thd, table, "restore",
|
||||
"Failed copying .frm file"));
|
||||
}
|
||||
if (mysql_truncate(thd, table, 1))
|
||||
{
|
||||
pthread_mutex_lock(&LOCK_open);
|
||||
unlock_table_name(thd, table);
|
||||
pthread_mutex_unlock(&LOCK_open);
|
||||
DBUG_RETURN(send_check_errmsg(thd, table, "restore",
|
||||
"Failed generating table from .frm file"));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Now we should be able to open the partially restored table
|
||||
to finish the restore in the handler later on
|
||||
*/
|
||||
pthread_mutex_lock(&LOCK_open);
|
||||
if (reopen_name_locked_table(thd, table, TRUE))
|
||||
{
|
||||
unlock_table_name(thd, table);
|
||||
pthread_mutex_unlock(&LOCK_open);
|
||||
DBUG_RETURN(send_check_errmsg(thd, table, "restore",
|
||||
"Failed to open partially restored table"));
|
||||
}
|
||||
/* A MERGE table must not come here. */
|
||||
DBUG_ASSERT(!table->table || !table->table->child_l);
|
||||
pthread_mutex_unlock(&LOCK_open);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
static int prepare_for_repair(THD *thd, TABLE_LIST *table_list,
|
||||
HA_CHECK_OPT *check_opt)
|
||||
{
|
||||
@ -5037,29 +4970,6 @@ err:
|
||||
}
|
||||
|
||||
|
||||
bool mysql_backup_table(THD* thd, TABLE_LIST* table_list)
|
||||
{
|
||||
DBUG_ENTER("mysql_backup_table");
|
||||
WARN_DEPRECATED(thd, "6.0", "BACKUP TABLE",
|
||||
"MySQL Administrator (mysqldump, mysql)");
|
||||
DBUG_RETURN(mysql_admin_table(thd, table_list, 0,
|
||||
"backup", TL_READ, 0, 0, 0, 0,
|
||||
&handler::ha_backup, 0));
|
||||
}
|
||||
|
||||
|
||||
bool mysql_restore_table(THD* thd, TABLE_LIST* table_list)
|
||||
{
|
||||
DBUG_ENTER("mysql_restore_table");
|
||||
WARN_DEPRECATED(thd, "6.0", "RESTORE TABLE",
|
||||
"MySQL Administrator (mysqldump, mysql)");
|
||||
DBUG_RETURN(mysql_admin_table(thd, table_list, 0,
|
||||
"restore", TL_WRITE, 1, 1, 0,
|
||||
&prepare_for_restore,
|
||||
&handler::ha_restore, 0));
|
||||
}
|
||||
|
||||
|
||||
bool mysql_repair_table(THD* thd, TABLE_LIST* tables, HA_CHECK_OPT* check_opt)
|
||||
{
|
||||
DBUG_ENTER("mysql_repair_table");
|
||||
|
Reference in New Issue
Block a user