mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Rename: query_error -> is_slave_error.
Add comments. sql/ha_ndbcluster_binlog.cc: query_error -> slave_error sql/handler.cc: query_error -> slave_error sql/log.cc: query_error -> slave_error sql/log_event.cc: query_error -> slave_error sql/log_event_old.cc: query_error -> slave_error sql/mysqld.cc: query_error -> slave_error sql/protocol.cc: query_error -> slave_error sql/slave.cc: query_error -> slave_error sql/sp_head.cc: query_error -> slave_error sql/sql_class.cc: query_error -> slave_error sql/sql_class.h: Rename: query_error -> is_slave_error, to avoid confusion. Add commenta. sql/sql_connect.cc: Rename: query_error -> is_slave_error, to avoid confusion. Originally it was the same code to handle init-connect and init-slave mysqld options. Then init-connect implementation forked off, but the one who copy-pasted the code didn't change it to not use a replication-specific variable.
This commit is contained in:
@@ -1447,7 +1447,7 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path,
|
||||
(We should in the future either rewrite handler::print_error() or make
|
||||
a nice method of this.
|
||||
*/
|
||||
bool query_error= thd->query_error;
|
||||
bool is_slave_error= thd->is_slave_error;
|
||||
sp_rcontext *spcont= thd->spcont;
|
||||
SELECT_LEX *current_select= thd->lex->current_select;
|
||||
char buff[sizeof(thd->net.last_error)];
|
||||
@@ -1455,7 +1455,7 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path,
|
||||
int last_errno= thd->net.last_errno;
|
||||
|
||||
strmake(buff, thd->net.last_error, sizeof(buff)-1);
|
||||
thd->query_error= 0;
|
||||
thd->is_slave_error= 0;
|
||||
thd->spcont= NULL;
|
||||
thd->lex->current_select= 0;
|
||||
thd->net.last_error[0]= 0;
|
||||
@@ -1475,7 +1475,7 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path,
|
||||
strmake(new_error, thd->net.last_error, sizeof(buff)-1);
|
||||
|
||||
/* restore thd */
|
||||
thd->query_error= query_error;
|
||||
thd->is_slave_error= is_slave_error;
|
||||
thd->spcont= spcont;
|
||||
thd->lex->current_select= current_select;
|
||||
thd->net.last_errno= last_errno;
|
||||
|
||||
Reference in New Issue
Block a user