From 257363e6c41d71c0ba3ce870614dfed1ff47676f Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 7 Apr 2010 18:17:56 +0300 Subject: Bug #52512: Assertion `! is_set()' in Diagnostics_area::set_ok_status on LOAD DATA Two problems : 1. LOAD DATA was not checking for SQL errors and was sending an OK packet even when there were errors reported already. Fixed to check for SQL errors in addition to the error conditions already detected. 2. There was an over-ambitious assert() on the server to check if the protocol is always followed by the client. This can cause crashes on debug servers by clients not completing the protocol exchange for some reason (e.g. --send command in mysqltest). Fixed by keeping the assert only on client side, since the server always completes the protocol exchange. --- sql/sql_load.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql/sql_load.cc') diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 3fb1b07cf6c..114651b9efb 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -940,6 +940,10 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, DBUG_RETURN(1); } } + + if (thd->is_error()) + read_info.error= 1; + if (read_info.error) break; if (skip_lines) -- cgit v1.2.1