mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
BACKUP TABLE TO 'directory'
RESTORE TABLE FROM 'directory' log on slave when it connects to the master include/mysql_com.h: Added COM_CONNECT_OUT so we can log on the slave when connects to the master sql/ha_myisam.cc: added restore() and backup() sql/ha_myisam.h: Added restore() and backup() sql/handler.cc: restore()/backup() sql/handler.h: restore()/backup() sql/lex.h: BACKUP/RESTORE sql/mysql_priv.h: gave global ( non-static) scope to generate_table() added mysql_backup_table()/mysql_restore_table() sql/slave.cc: Log when slave connects to the master on the slave sql/sql_delete.cc: changed the scope of generate_table() from static to global sql/sql_lex.h: changes for BACKUP TABLE/RESTORE TABLE sql/sql_parse.cc: Changes for BACKUP TABLE/RESTORE TABLE sql/sql_table.cc: Changes for BACKUP TABLE/RESTORE TABLE sql/sql_yacc.yy: BACKUP TABLE/ RESTORE TABLE
This commit is contained in:
@ -60,7 +60,7 @@ const char *command_name[]={
|
||||
"Sleep", "Quit", "Init DB", "Query", "Field List", "Create DB",
|
||||
"Drop DB", "Refresh", "Shutdown", "Statistics", "Processlist",
|
||||
"Connect","Kill","Debug","Ping","Time","Delayed_insert","Change user",
|
||||
"Binlog Dump","Start Slave", "Abort Slave"
|
||||
"Binlog Dump","Table Dump", "Connect Out"
|
||||
};
|
||||
|
||||
bool volatile abort_slave = 0;
|
||||
@ -927,6 +927,25 @@ mysql_execute_command(void)
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case SQLCOM_BACKUP_TABLE:
|
||||
{
|
||||
if (check_db_used(thd,tables) ||
|
||||
check_table_access(thd,SELECT_ACL, tables) ||
|
||||
check_access(thd, FILE_ACL, any_db))
|
||||
goto error; /* purecov: inspected */
|
||||
res = mysql_backup_table(thd, tables);
|
||||
|
||||
break;
|
||||
}
|
||||
case SQLCOM_RESTORE_TABLE:
|
||||
{
|
||||
if (check_db_used(thd,tables) ||
|
||||
check_table_access(thd,INSERT_ACL, tables) ||
|
||||
check_access(thd, FILE_ACL, any_db))
|
||||
goto error; /* purecov: inspected */
|
||||
res = mysql_restore_table(thd, tables);
|
||||
break;
|
||||
}
|
||||
case SQLCOM_CHANGE_MASTER:
|
||||
{
|
||||
if(check_access(thd, PROCESS_ACL, any_db))
|
||||
|
Reference in New Issue
Block a user