summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2000-12-14 17:43:13 -0700
committerunknown <sasha@mysql.sashanet.com>2000-12-14 17:43:13 -0700
commit93166332704c583cfd4d4898f8c99650dfd6193a (patch)
tree55a697410acedbe124dbbe573bbae54b7afd556b /sql
parentf48d4424b025ed44f4a9726537437a269b26a2f4 (diff)
downloadmariadb-git-93166332704c583cfd4d4898f8c99650dfd6193a.tar.gz
client/mysqltest.c
added system command myisammrg/myrg_open.c fixed coredump when opening an empty union table sql/sql_repl.cc fixed warnings, remove confusing comment, fixed coredump in change master to when master.info was corrupted added new replication test case client/mysqltest.c: added system command myisammrg/myrg_open.c: fixed coredump when opening an empty union table sql/sql_repl.cc: fixed warnings, remove confusing comment, fixed coredump in change master to when master.info was corrupted
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_repl.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 521fe757ce5..e27a77422ad 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -34,7 +34,8 @@ static int send_file(THD *thd)
char fname[FN_REFLEN+1];
char *buf;
const char *errmsg = 0;
- int old_timeout,packet_len;
+ int old_timeout;
+ uint packet_len;
DBUG_ENTER("send_file");
// the client might be slow loading the data, give him wait_timeout to do
@@ -63,7 +64,6 @@ static int send_file(THD *thd)
// this is needed to make replicate-ignore-db
if (!strcmp(fname,"/dev/null"))
goto end;
- // TODO: work on the well-known system that does not have a /dev/null :-)
if ((fd = my_open(fname, O_RDONLY, MYF(MY_WME))) < 0)
{
@@ -553,9 +553,8 @@ int stop_slave(THD* thd, bool net_report )
// do not abort the slave in the middle of a query, so we do not set
// thd->killed for the slave thread
thd->proc_info = "waiting for slave to die";
- while(slave_running) // we may miss slave start broadcast, if it starts
- // very quickly
- pthread_cond_wait(&COND_slave_stopped, &LOCK_slave);
+ while(slave_running)
+ pthread_cond_wait(&COND_slave_stopped, &LOCK_slave);
}
else
err = "Slave is not running";
@@ -643,8 +642,11 @@ int change_master(THD* thd)
thd->proc_info = "changing master";
LEX_MASTER_INFO* lex_mi = &thd->lex.mi;
- if(!glob_mi.inited)
- init_master_info(&glob_mi);
+ if(init_master_info(&glob_mi))
+ {
+ send_error(&thd->net, 0, "Could not initialize master info");
+ return 1;
+ }
pthread_mutex_lock(&glob_mi.lock);
if((lex_mi->host || lex_mi->port) && !lex_mi->log_file_name && !lex_mi->pos)