Commit 88f7de57 authored by Konstantin Osipov's avatar Konstantin Osipov

Backport of:

------------------------------------------------------------
revno: 2476.657.208
committer: anozdrin/alik@station.
timestamp: Tue 2007-12-04 17:22:53 +0300
message:
Remove rpl_probe, enable_rpl_parse and disable_rpl_parse commands
from mysqltest, the corresponding funtctions have been removed from
MySQL C API
parent 16218fe5
...@@ -257,8 +257,7 @@ enum enum_commands { ...@@ -257,8 +257,7 @@ enum enum_commands {
Q_SEND, Q_REAP, Q_SEND, Q_REAP,
Q_DIRTY_CLOSE, Q_REPLACE, Q_REPLACE_COLUMN, Q_DIRTY_CLOSE, Q_REPLACE, Q_REPLACE_COLUMN,
Q_PING, Q_EVAL, Q_PING, Q_EVAL,
Q_RPL_PROBE, Q_ENABLE_RPL_PARSE, Q_EVAL_RESULT,
Q_DISABLE_RPL_PARSE, Q_EVAL_RESULT,
Q_ENABLE_QUERY_LOG, Q_DISABLE_QUERY_LOG, Q_ENABLE_QUERY_LOG, Q_DISABLE_QUERY_LOG,
Q_ENABLE_RESULT_LOG, Q_DISABLE_RESULT_LOG, Q_ENABLE_RESULT_LOG, Q_DISABLE_RESULT_LOG,
Q_WAIT_FOR_SLAVE_TO_STOP, Q_WAIT_FOR_SLAVE_TO_STOP,
...@@ -317,9 +316,6 @@ const char *command_names[]= ...@@ -317,9 +316,6 @@ const char *command_names[]=
"replace_column", "replace_column",
"ping", "ping",
"eval", "eval",
"rpl_probe",
"enable_rpl_parse",
"disable_rpl_parse",
"eval_result", "eval_result",
/* Enable/disable that the _query_ is logged to result file */ /* Enable/disable that the _query_ is logged to result file */
"enable_query_log", "enable_query_log",
...@@ -659,14 +655,6 @@ public: ...@@ -659,14 +655,6 @@ public:
LogFile log_file; LogFile log_file;
LogFile progress_file; LogFile progress_file;
/* Disable functions that only exist in MySQL 4.0 */
#if MYSQL_VERSION_ID < 40000
void mysql_enable_rpl_parse(MYSQL* mysql __attribute__((unused))) {}
void mysql_disable_rpl_parse(MYSQL* mysql __attribute__((unused))) {}
int mysql_rpl_parse_enabled(MYSQL* mysql __attribute__((unused))) { return 1; }
my_bool mysql_rpl_probe(MYSQL *mysql __attribute__((unused))) { return 1; }
#endif
void replace_dynstr_append_mem(DYNAMIC_STRING *ds, const char *val, void replace_dynstr_append_mem(DYNAMIC_STRING *ds, const char *val,
int len); int len);
void replace_dynstr_append(DYNAMIC_STRING *ds, const char *val); void replace_dynstr_append(DYNAMIC_STRING *ds, const char *val);
...@@ -3848,12 +3836,8 @@ int do_save_master_pos() ...@@ -3848,12 +3836,8 @@ int do_save_master_pos()
MYSQL_ROW row; MYSQL_ROW row;
MYSQL *mysql = &cur_con->mysql; MYSQL *mysql = &cur_con->mysql;
const char *query; const char *query;
int rpl_parse;
DBUG_ENTER("do_save_master_pos"); DBUG_ENTER("do_save_master_pos");
rpl_parse = mysql_rpl_parse_enabled(mysql);
mysql_disable_rpl_parse(mysql);
#ifdef HAVE_NDB_BINLOG #ifdef HAVE_NDB_BINLOG
/* /*
Wait for ndb binlog to be up-to-date with all changes Wait for ndb binlog to be up-to-date with all changes
...@@ -4003,10 +3987,6 @@ int do_save_master_pos() ...@@ -4003,10 +3987,6 @@ int do_save_master_pos()
strnmov(master_pos.file, row[0], sizeof(master_pos.file)-1); strnmov(master_pos.file, row[0], sizeof(master_pos.file)-1);
master_pos.pos = strtoul(row[1], (char**) 0, 10); master_pos.pos = strtoul(row[1], (char**) 0, 10);
mysql_free_result(res); mysql_free_result(res);
if (rpl_parse)
mysql_enable_rpl_parse(mysql);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -4069,29 +4049,6 @@ void do_let(struct st_command *command) ...@@ -4069,29 +4049,6 @@ void do_let(struct st_command *command)
} }
int do_rpl_probe(struct st_command *command __attribute__((unused)))
{
DBUG_ENTER("do_rpl_probe");
if (mysql_rpl_probe(&cur_con->mysql))
die("Failed in mysql_rpl_probe(): '%s'", mysql_error(&cur_con->mysql));
DBUG_RETURN(0);
}
int do_enable_rpl_parse(struct st_command *command __attribute__((unused)))
{
mysql_enable_rpl_parse(&cur_con->mysql);
return 0;
}
int do_disable_rpl_parse(struct st_command *command __attribute__((unused)))
{
mysql_disable_rpl_parse(&cur_con->mysql);
return 0;
}
/* /*
Sleep the number of specified seconds Sleep the number of specified seconds
...@@ -7742,9 +7699,6 @@ int main(int argc, char **argv) ...@@ -7742,9 +7699,6 @@ int main(int argc, char **argv)
case Q_DISCONNECT: case Q_DISCONNECT:
case Q_DIRTY_CLOSE: case Q_DIRTY_CLOSE:
do_close_connection(command); break; do_close_connection(command); break;
case Q_RPL_PROBE: do_rpl_probe(command); break;
case Q_ENABLE_RPL_PARSE: do_enable_rpl_parse(command); break;
case Q_DISABLE_RPL_PARSE: do_disable_rpl_parse(command); break;
case Q_ENABLE_QUERY_LOG: disable_query_log=0; break; case Q_ENABLE_QUERY_LOG: disable_query_log=0; break;
case Q_DISABLE_QUERY_LOG: disable_query_log=1; break; case Q_DISABLE_QUERY_LOG: disable_query_log=1; break;
case Q_ENABLE_ABORT_ON_ERROR: abort_on_error=1; break; case Q_ENABLE_ABORT_ON_ERROR: abort_on_error=1; break;
......
...@@ -408,10 +408,6 @@ void my_net_set_write_timeout(NET *net, uint timeout); ...@@ -408,10 +408,6 @@ void my_net_set_write_timeout(NET *net, uint timeout);
void my_net_set_read_timeout(NET *net, uint timeout); void my_net_set_read_timeout(NET *net, uint timeout);
#endif #endif
/*
The following function is not meant for normal usage
Currently it's used internally by manager.c
*/
struct sockaddr; struct sockaddr;
int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen, int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen,
unsigned int timeout); unsigned int timeout);
......
...@@ -73,7 +73,7 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c ...@@ -73,7 +73,7 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
../mysys/hash.c ../mysys/my_sleep.c ../mysys/default_modify.c ../mysys/hash.c ../mysys/my_sleep.c ../mysys/default_modify.c
get_password.c ../strings/int2str.c ../strings/is_prefix.c get_password.c ../strings/int2str.c ../strings/is_prefix.c
libmysql.c ../mysys/list.c ../strings/llstr.c libmysql.c ../mysys/list.c ../strings/llstr.c
../strings/longlong2str.c manager.c ../mysys/mf_arr_appstr.c ../mysys/mf_cache.c ../strings/longlong2str.c ../mysys/mf_arr_appstr.c ../mysys/mf_cache.c
../mysys/mf_dirname.c ../mysys/mf_fn_ext.c ../mysys/mf_format.c ../mysys/mf_dirname.c ../mysys/mf_fn_ext.c ../mysys/mf_format.c
../mysys/mf_iocache.c ../mysys/mf_iocache2.c ../mysys/mf_loadpath.c ../mysys/mf_iocache.c ../mysys/mf_iocache2.c ../mysys/mf_loadpath.c
../mysys/mf_pack.c ../mysys/mf_path.c ../mysys/mf_tempfile.c ../mysys/mf_unixpath.c ../mysys/mf_pack.c ../mysys/mf_path.c ../mysys/mf_tempfile.c ../mysys/mf_unixpath.c
......
...@@ -1181,7 +1181,7 @@ void mysql_read_default_options(struct st_mysql_options *options, ...@@ -1181,7 +1181,7 @@ void mysql_read_default_options(struct st_mysql_options *options,
my_free(options->ssl_capath, MYF(MY_ALLOW_ZERO_PTR)); my_free(options->ssl_capath, MYF(MY_ALLOW_ZERO_PTR));
options->ssl_capath = my_strdup(opt_arg, MYF(MY_WME)); options->ssl_capath = my_strdup(opt_arg, MYF(MY_WME));
break; break;
case 26: /* ssl_cipher */ case 23: /* ssl_cipher */
my_free(options->ssl_cipher, MYF(MY_ALLOW_ZERO_PTR)); my_free(options->ssl_cipher, MYF(MY_ALLOW_ZERO_PTR));
options->ssl_cipher= my_strdup(opt_arg, MYF(MY_WME)); options->ssl_cipher= my_strdup(opt_arg, MYF(MY_WME));
break; break;
...@@ -1190,7 +1190,7 @@ void mysql_read_default_options(struct st_mysql_options *options, ...@@ -1190,7 +1190,7 @@ void mysql_read_default_options(struct st_mysql_options *options,
case 14: case 14:
case 15: case 15:
case 16: case 16:
case 26: case 23:
break; break;
#endif /* HAVE_OPENSSL */ #endif /* HAVE_OPENSSL */
case 17: /* charset-lib */ case 17: /* charset-lib */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment