diff options
author | Luis Soares <luis.soares@sun.com> | 2009-11-04 12:28:20 +0000 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2009-11-04 12:28:20 +0000 |
commit | fb175a1beb109efd095e2da4a391b52976b4a842 (patch) | |
tree | b80f9a53099f9ca553f3731d7db011c4c110239e /sql/sql_table.cc | |
parent | 39f7da882e2a90e8d5eb3f49c4ba361f2b631ad9 (diff) | |
download | mariadb-git-fb175a1beb109efd095e2da4a391b52976b4a842.tar.gz |
BUG#48048: Deprecated constructs need removal in Betony
NOTE: Backport of:
bzr log -r revid:sp1r-serg@sergbook.mysql.com-20070505200319-38337
------------------------------------------------------------
revno: 2469.263.4
committer: serg@sergbook.mysql.com
timestamp: Sat 2007-05-05 13:03:19 -0700
message:
Removing deprecated features:
--master-XXX command-line options
log_bin_trust_routine_creators
table_type
BACKUP TABLE ...
RESTORE TABLE ...
SHOW PLUGIN
LOAD TABLE ... FROM MASTER
LOAD DATA FROM MASTER
SHOW INNODB STATUS
SHOW MUTEX STATUS
SHOW TABLE TYPES
... TIMESTAMP(N)
... TYPE=engine
RESET SLAVE don't reset connection parameters anymore
LOAD DATA: check opt_secure_file_priv before access(filename)
improved WARN_DEPRECATED macro
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 4ec104aedc3..64a8b8bb2f6 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4260,73 +4260,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; - - VOID(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) { @@ -4992,29 +4925,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"); |