diff options
author | unknown <davi@mysql.com/endora.local> | 2008-02-28 14:55:46 -0300 |
---|---|---|
committer | unknown <davi@mysql.com/endora.local> | 2008-02-28 14:55:46 -0300 |
commit | 33a4e7609095388099bb3048778a5b5d164d26fa (patch) | |
tree | 403f098823cf42179ec9f51f5bd0ccab5fc77112 /sql | |
parent | 944f2599fedfaa7c9a4348a2fd505419eb59a5b6 (diff) | |
download | mariadb-git-33a4e7609095388099bb3048778a5b5d164d26fa.tar.gz |
Bug#34655 Compile error
Rename client_last_error to last_error and client_last_errno to last_errno
to not break connectors which use the internal net structure for error handling.
include/mysql_com.h:
Rename client_last_error to last_error, client_last_errno to last_errno.
include/mysql_h.ic:
Rename client_last_error to last_error, client_last_errno to last_errno.
libmysql/libmysql.c:
Rename client_last_error to last_error, client_last_errno to last_errno.
libmysql/manager.c:
Rename client_last_error to last_error, client_last_errno to last_errno.
libmysqld/lib_sql.cc:
Rename client_last_error to last_error, client_last_errno to last_errno.
libmysqld/libmysqld.c:
Rename client_last_error to last_error, client_last_errno to last_errno.
server-tools/instance-manager/mysql_connection.cc:
Rename client_last_error to last_error, client_last_errno to last_errno.
sql/log_event.cc:
Rename client_last_error to last_error, client_last_errno to last_errno.
sql-common/client.c:
Rename client_last_error to last_error, client_last_errno to last_errno.
sql/log_event_old.cc:
Rename client_last_error to last_error, client_last_errno to last_errno.
sql/net_serv.cc:
Rename client_last_error to last_error, client_last_errno to last_errno.
sql/repl_failsafe.cc:
Rename client_last_error to last_error, client_last_errno to last_errno.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/log_event.cc | 2 | ||||
-rw-r--r-- | sql/log_event_old.cc | 22 | ||||
-rw-r--r-- | sql/net_serv.cc | 24 | ||||
-rw-r--r-- | sql/repl_failsafe.cc | 2 |
4 files changed, 25 insertions, 25 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 7c98ccaff28..cc6ae14f160 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -137,7 +137,7 @@ static void inline slave_rows_error_report(enum loglevel level, int ha_error, " %s, Error_code: %d;", err->msg, err->code); } - rli->report(level, thd->net.client_last_errno, + rli->report(level, thd->net.last_errno, "Could not execute %s event on table %s.%s;" "%s handler error %s; " "the event's master log %s, end_log_pos %lu", diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc index 13f9763debe..808356a05c7 100644 --- a/sql/log_event_old.cc +++ b/sql/log_event_old.cc @@ -1529,10 +1529,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) Error reporting borrowed from Query_log_event with many excessive simplifications (we don't honour --slave-skip-errors) */ - uint actual_error= thd->net.client_last_errno; + uint actual_error= thd->net.last_errno; rli->report(ERROR_LEVEL, actual_error, "Error '%s' in %s event: when locking tables", - (actual_error ? thd->net.client_last_error : + (actual_error ? thd->net.last_error : "unexpected success or fatal error"), get_type_str()); thd->is_fatal_error= 1; @@ -1573,10 +1573,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) Error reporting borrowed from Query_log_event with many excessive simplifications (we don't honour --slave-skip-errors) */ - uint actual_error= thd->net.client_last_errno; + uint actual_error= thd->net.last_errno; rli->report(ERROR_LEVEL, actual_error, "Error '%s' on reopening tables", - (actual_error ? thd->net.client_last_error : + (actual_error ? thd->net.last_error : "unexpected success or fatal error")); thd->is_slave_error= 1; } @@ -1729,10 +1729,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) break; default: - rli->report(ERROR_LEVEL, thd->net.client_last_errno, + rli->report(ERROR_LEVEL, thd->net.last_errno, "Error in %s event: row application failed. %s", get_type_str(), - thd->net.client_last_error ? thd->net.client_last_error : ""); + thd->net.last_error ? thd->net.last_error : ""); thd->is_slave_error= 1; break; } @@ -1779,12 +1779,12 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) if (error) { /* error has occured during the transaction */ - rli->report(ERROR_LEVEL, thd->net.client_last_errno, + rli->report(ERROR_LEVEL, thd->net.last_errno, "Error in %s event: error during transaction execution " "on table %s.%s. %s", get_type_str(), table->s->db.str, table->s->table_name.str, - thd->net.client_last_error ? thd->net.client_last_error : ""); + thd->net.last_error ? thd->net.last_error : ""); /* If one day we honour --skip-slave-errors in row-based replication, and @@ -1913,7 +1913,7 @@ Old_rows_log_event::do_update_pos(Relay_log_info *rli) example "no key found" (as this is allowed). This is a safety measure; apparently those errors (e.g. when executing a Delete_rows_log_event_old of a non-existing row, like in - rpl_row_mystery22.test, thd->net.client_last_error = "Can't + rpl_row_mystery22.test, thd->net.last_error = "Can't find record in 't1'" and last_errno=1032) do not become visible. We still prefer to wipe them out. */ @@ -2647,8 +2647,8 @@ Write_rows_log_event_old::do_exec_row(const Relay_log_info *const rli) DBUG_ASSERT(m_table != NULL); int error= write_row(rli, TRUE /* overwrite */); - if (error && !thd->net.client_last_errno) - thd->net.client_last_errno= error; + if (error && !thd->net.last_errno) + thd->net.last_errno= error; return error; } diff --git a/sql/net_serv.cc b/sql/net_serv.cc index ad653a2267d..1098e8e6832 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -127,10 +127,10 @@ my_bool my_net_init(NET *net, Vio* vio) net->error=0; net->return_errno=0; net->return_status=0; net->pkt_nr=net->compress_pkt_nr=0; net->write_pos=net->read_pos = net->buff; - net->client_last_error[0]=0; + net->last_error[0]=0; net->compress=0; net->reading_or_writing=0; net->where_b = net->remain_in_buf=0; - net->client_last_errno=0; + net->last_errno=0; #ifdef USE_QUERY_CACHE query_cache_init_query(net); #else @@ -177,7 +177,7 @@ my_bool net_realloc(NET *net, size_t length) net->max_packet_size)); /* @todo: 1 and 2 codes are identical. */ net->error= 1; - net->client_last_errno= ER_NET_PACKET_TOO_LARGE; + net->last_errno= ER_NET_PACKET_TOO_LARGE; #ifdef MYSQL_SERVER my_error(ER_NET_PACKET_TOO_LARGE, MYF(0)); #endif @@ -194,7 +194,7 @@ my_bool net_realloc(NET *net, size_t length) { /* @todo: 1 and 2 codes are identical. */ net->error= 1; - net->client_last_errno= ER_OUT_OF_RESOURCES; + net->last_errno= ER_OUT_OF_RESOURCES; /* In the server the error is reported by MY_WME flag. */ DBUG_RETURN(1); } @@ -579,7 +579,7 @@ net_real_write(NET *net,const uchar *packet, size_t len) COMP_HEADER_SIZE, MYF(MY_WME)))) { net->error= 2; - net->client_last_errno= ER_OUT_OF_RESOURCES; + net->last_errno= ER_OUT_OF_RESOURCES; /* In the server, the error is reported by MY_WME flag. */ net->reading_or_writing= 0; DBUG_RETURN(1); @@ -632,7 +632,7 @@ net_real_write(NET *net,const uchar *packet, size_t len) my_progname,vio_errno(net->vio)); #endif /* EXTRA_DEBUG */ net->error= 2; /* Close socket */ - net->client_last_errno= ER_NET_PACKET_TOO_LARGE; + net->last_errno= ER_NET_PACKET_TOO_LARGE; #ifdef MYSQL_SERVER my_error(ER_NET_PACKET_TOO_LARGE, MYF(0)); #endif @@ -662,10 +662,10 @@ net_real_write(NET *net,const uchar *packet, size_t len) } #endif /* defined(THREAD_SAFE_CLIENT) && !defined(MYSQL_SERVER) */ net->error= 2; /* Close socket */ - net->client_last_errno= (interrupted ? ER_NET_WRITE_INTERRUPTED : + net->last_errno= (interrupted ? ER_NET_WRITE_INTERRUPTED : ER_NET_ERROR_ON_WRITE); #ifdef MYSQL_SERVER - my_error(net->client_last_errno, MYF(0)); + my_error(net->last_errno, MYF(0)); #endif /* MYSQL_SERVER */ break; } @@ -844,7 +844,7 @@ my_real_read(NET *net, size_t *complen) #endif /* EXTRA_DEBUG */ len= packet_error; net->error= 2; /* Close socket */ - net->client_last_errno= ER_NET_FCNTL_ERROR; + net->last_errno= ER_NET_FCNTL_ERROR; #ifdef MYSQL_SERVER my_error(ER_NET_FCNTL_ERROR, MYF(0)); #endif @@ -876,11 +876,11 @@ my_real_read(NET *net, size_t *complen) remain, vio_errno(net->vio), (long) length)); len= packet_error; net->error= 2; /* Close socket */ - net->client_last_errno= (vio_was_interrupted(net->vio) ? + net->last_errno= (vio_was_interrupted(net->vio) ? ER_NET_READ_INTERRUPTED : ER_NET_READ_ERROR); #ifdef MYSQL_SERVER - my_error(net->client_last_errno, MYF(0)); + my_error(net->last_errno, MYF(0)); #endif goto end; } @@ -1100,7 +1100,7 @@ my_net_read(NET *net) &complen)) { net->error= 2; /* caller will close socket */ - net->client_last_errno= ER_NET_UNCOMPRESS_ERROR; + net->last_errno= ER_NET_UNCOMPRESS_ERROR; #ifdef MYSQL_SERVER my_error(ER_NET_UNCOMPRESS_ERROR, MYF(0)); #endif diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index f8f01d2cad1..a8953217ce1 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -699,7 +699,7 @@ int connect_to_master(THD *thd, MYSQL* mysql, Master_info* mi) if (!mi->host || !*mi->host) /* empty host */ { - strmov(mysql->net.client_last_error, "Master is not configured"); + strmov(mysql->net.last_error, "Master is not configured"); DBUG_RETURN(1); } mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *) &slave_net_timeout); |