diff options
author | sasha@mysql.sashanet.com <> | 2001-05-31 17:25:41 -0600 |
---|---|---|
committer | sasha@mysql.sashanet.com <> | 2001-05-31 17:25:41 -0600 |
commit | caf5b25de2e69f443a7b014f5a6dc864c27a9ae3 (patch) | |
tree | 114652f73642b86bdd11c291b0254bdc27fae742 /sql | |
parent | f515a3ae4a6daef71569f289e480141aba665ddc (diff) | |
parent | bd109ae97cc911276cd7be65e59062237474eef4 (diff) | |
download | mariadb-git-caf5b25de2e69f443a7b014f5a6dc864c27a9ae3.tar.gz |
Merge mysql.sashanet.com:/home/sasha/src/bk/mysql
into mysql.sashanet.com:/home/sasha/src/bk/mysql-4.0
Diffstat (limited to 'sql')
-rw-r--r-- | sql/slave.cc | 7 | ||||
-rw-r--r-- | sql/sql_repl.cc | 6 | ||||
-rw-r--r-- | sql/unireg.h | 3 |
3 files changed, 11 insertions, 5 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 5b5439353c7..28e083480a1 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -970,9 +970,10 @@ static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len) (actual_error = thd->net.last_errno) && expected_error) { const char* errmsg = "Slave: did not get the expected error\ - running query from master - expected: '%s', got '%s'"; - sql_print_error(errmsg, ER(expected_error), - actual_error ? thd->net.last_error:"no error" + running query from master - expected: '%s'(%d), got '%s'(%d)"; + sql_print_error(errmsg, ER(expected_error), expected_error, + actual_error ? thd->net.last_error:"no error", + actual_error ); thd->query_error = 1; } diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 74a3549149b..fe0417057b6 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -764,14 +764,18 @@ int change_master(THD* thd) // if we change host or port, we must reset the postion glob_mi.log_file_name[0] = 0; glob_mi.pos = 4; // skip magic number + glob_mi.pending = 0; } if(lex_mi->log_file_name) strmake(glob_mi.log_file_name, lex_mi->log_file_name, sizeof(glob_mi.log_file_name)); if(lex_mi->pos) + { glob_mi.pos = lex_mi->pos; - + glob_mi.pending = 0; + } + if(lex_mi->host) { strmake(glob_mi.host, lex_mi->host, sizeof(glob_mi.host)); diff --git a/sql/unireg.h b/sql/unireg.h index 7ad3bac2eab..87529dd1f69 100644 --- a/sql/unireg.h +++ b/sql/unireg.h @@ -37,7 +37,8 @@ #define SHAREDIR "share/" #endif -#define ER(X) errmesg[(X)-1000] +#define ER(X) ((X) >= 1000 && (X) < ER_ERROR_MESSAGES + 1000) ? \ + errmesg[(X)-1000] : "Invalid error code" #define ERRMAPP 1 /* Errormap f|r my_error */ #define LIBLEN FN_REFLEN-FN_LEN /* Max l{ngd p} dev */ |