summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-07-02 14:59:06 +0300
committerMonty <monty@mariadb.org>2017-07-02 14:59:06 +0300
commit46d6f74c4892e0e2952d129888c34b61b66ba350 (patch)
treee00671f70cadb111b36de8c369b91fb2052ce569
parent21689d125282f85123b6807b814683c74e9ea23c (diff)
downloadmariadb-git-46d6f74c4892e0e2952d129888c34b61b66ba350.tar.gz
Fix for MDEV-13191. Assert for !is_set() when doing LOAD DATA
This could happen when the client connection dies while sending a progress report packet. Fixed by not raising any errors when sending progress packets.
-rw-r--r--sql/sql_class.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index e397dd88a88..0b016f7d816 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -4084,6 +4084,10 @@ extern "C" enum thd_kill_levels thd_kill_level(const MYSQL_THD thd)
however not more often than global.progress_report_time.
If global.progress_report_time is 0, then don't send progress reports, but
check every second if the value has changed
+
+ We clear any errors that we get from sending the progress packet to
+ the client as we don't want to set an error without the caller knowing
+ about it.
*/
static void thd_send_progress(THD *thd)
@@ -4100,8 +4104,12 @@ static void thd_send_progress(THD *thd)
thd->progress.next_report_time= (report_time +
seconds_to_next * 1000000000ULL);
if (global_system_variables.progress_report_time &&
- thd->variables.progress_report_time)
+ thd->variables.progress_report_time && !thd->is_error())
+ {
net_send_progress_packet(thd);
+ if (thd->is_error())
+ thd->clear_error();
+ }
}
}