mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
updates for LOAD DATA FROM MASTER + some cleanup of replication code
include/mysqld_error.h: new errors mysql-test/r/rpl000009.result: test load data from master mysql-test/t/rpl000009.test: test load data from master sql/mini_client.cc: extra functionality needed for load data from master and other things sql/mini_client.h: addition to API sql/mysql_priv.h: mysql_create_db()/mysql_rm_db() now return a value sql/share/english/errmsg.txt: more error messages sql/slave.cc: cleanup of fetch_nx_table() sql/slave.h: cleanup of fetch_nx_table() sql/sql_base.cc: remove unused code originally written for retrieving a non-existent table in slave thread sql/sql_class.cc: remove unused replication variables sql/sql_class.h: remove unused replication variabled sql/sql_db.cc: make mysql_create_db()/mysql_rm_db() work with thd == 0 (do not write messages to the net) and instead return success/error sql/sql_lex.h: added SQLCOM_LOAD_MASTER_DATA sql/sql_parse.cc: LOAD MASTER DATA, cleanup of LOAD TABLE FROM MASTER sql/sql_repl.cc: LOAD DATA FROM MASTER sql/sql_repl.h: LOAD DATA FROM MASTER sql/sql_yacc.yy: LOAD DATA FROM MASTER
This commit is contained in:
@ -1203,6 +1203,13 @@ mysql_execute_command(void)
|
||||
res = show_binlog_info(thd);
|
||||
break;
|
||||
}
|
||||
|
||||
case SQLCOM_LOAD_MASTER_DATA: // sync with master
|
||||
if(check_process_priv(thd))
|
||||
goto error;
|
||||
res = load_master_data(thd);
|
||||
break;
|
||||
|
||||
case SQLCOM_LOAD_MASTER_TABLE:
|
||||
|
||||
if (!tables->db)
|
||||
@ -1226,9 +1233,7 @@ mysql_execute_command(void)
|
||||
break;
|
||||
}
|
||||
|
||||
thd->last_nx_table = tables->real_name;
|
||||
thd->last_nx_db = tables->db;
|
||||
if(fetch_nx_table(thd, &glob_mi))
|
||||
if(fetch_nx_table(thd, tables->db, tables->real_name, &glob_mi, 0))
|
||||
// fetch_nx_table is responsible for sending
|
||||
// the error
|
||||
{
|
||||
|
Reference in New Issue
Block a user