mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for BUG#26050 "LOAD DATA INFILE breaks ACID"; the ok must be sent
to the client only after the binlog write and engine commit. No testcase for this bug, as to reproduce it, we need to "kill -9" mysqld, which we cannot do in the testsuite. But, I tested by hand.
This commit is contained in:
@ -353,7 +353,6 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
|||||||
}
|
}
|
||||||
sprintf(name, ER(ER_LOAD_INFO), (ulong) info.records, (ulong) info.deleted,
|
sprintf(name, ER(ER_LOAD_INFO), (ulong) info.records, (ulong) info.deleted,
|
||||||
(ulong) (info.records - info.copied), (ulong) thd->cuted_fields);
|
(ulong) (info.records - info.copied), (ulong) thd->cuted_fields);
|
||||||
send_ok(thd,info.copied+info.deleted,0L,name);
|
|
||||||
// on the slave thd->query is never initialized
|
// on the slave thd->query is never initialized
|
||||||
if (!thd->slave_thread)
|
if (!thd->slave_thread)
|
||||||
mysql_update_log.write(thd,thd->query,thd->query_length);
|
mysql_update_log.write(thd,thd->query,thd->query_length);
|
||||||
@ -378,6 +377,9 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
|||||||
#endif /*!EMBEDDED_LIBRARY*/
|
#endif /*!EMBEDDED_LIBRARY*/
|
||||||
if (transactional_table)
|
if (transactional_table)
|
||||||
error=ha_autocommit_or_rollback(thd,error);
|
error=ha_autocommit_or_rollback(thd,error);
|
||||||
|
|
||||||
|
/* ok to client sent only after binlog write and engine commit */
|
||||||
|
send_ok(thd, info.copied + info.deleted, 0L, name);
|
||||||
err:
|
err:
|
||||||
if (thd->lock)
|
if (thd->lock)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user