diff options
author | unknown <guilhem@mysql.com> | 2004-09-23 14:43:31 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2004-09-23 14:43:31 +0200 |
commit | 906ec0801b5a200d539176e6ccef34b4df484487 (patch) | |
tree | 62df969ec1a63072e15f18014cc564be11ece531 /sql | |
parent | 79632793cab6f3653785a6d895da869cdc1949e8 (diff) | |
download | mariadb-git-906ec0801b5a200d539176e6ccef34b4df484487.tar.gz |
Fix for BUG#5711 "replication SQL thread does not abort on SQL syntax error":
in net_printf(), we fill net->last_* variables for the slave SQL thread to know the error.
sql/net_pkg.cc:
in net_printf(), store the error in net->last_*, so that slave SQL thread can be aware there was an error reported by net_printf()
(which is what yacc uses for "you have an error in your syntax").
Diffstat (limited to 'sql')
-rw-r--r-- | sql/net_pkg.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/net_pkg.cc b/sql/net_pkg.cc index cc9147fe90a..df77d0347f2 100644 --- a/sql/net_pkg.cc +++ b/sql/net_pkg.cc @@ -132,6 +132,10 @@ net_printf(NET *net, uint errcode, ...) length=sizeof(net->last_error)-1; /* purecov: inspected */ va_end(args); + /* Replication slave relies on net->last_* to see if there was error */ + net->last_errno= errcode; + strmake(net->last_error, text_pos, sizeof(net->last_error)-1); + if (net->vio == 0) { if (thd && thd->bootstrap) |