summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-08-14 11:33:35 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-08-14 11:33:35 +0300
commitcf87f3e08c10dd7a944447ddee93fbc3827e6570 (patch)
tree3c81320e2811d99e075f7d03d3bf0d1cdfa48c84 /sql/sql_repl.cc
parent1bf77cde5c62166c0f1652c2a1764e05ce76edb5 (diff)
parent2f7b37b02154748b223e385a7d7787900ab37b5e (diff)
downloadmariadb-git-cf87f3e08c10dd7a944447ddee93fbc3827e6570.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 3ed0e288870..4a1484df2c2 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -374,11 +374,15 @@ static int send_file(THD *thd)
We need net_flush here because the client will not know it needs to send
us the file name until it has processed the load event entry
*/
- if (unlikely(net_flush(net) || (packet_len = my_net_read(net)) == packet_error))
+ if (unlikely(net_flush(net)))
{
+ read_error:
errmsg = "while reading file name";
goto err;
}
+ packet_len= my_net_read(net);
+ if (unlikely(packet_len == packet_error))
+ goto read_error;
// terminate with \0 for fn_format
*((char*)net->read_pos + packet_len) = 0;