MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:guilhem Date:February 26 2007 7:35pm
Subject:bk commit into 4.1 tree (gbichot:1.2609) BUG#26050
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of gbichot. When gbichot does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-02-26 20:35:28+01:00, gbichot@stripped +1 -0
  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.

  sql/sql_load.cc@stripped, 2007-02-26 20:33:55+01:00, gbichot@stripped +3 -1
    D in ACID means that once the client got the ok from the server, the data
    is durable on disk. Implies that the ok must be sent after the binlog write
    and after the engine commit, not before.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	gbichot
# Host:	dl145h.mysql.com
# Root:	/users/gbichot/mysql-4.1-rpl

--- 1.89/sql/sql_load.cc	2007-02-26 20:35:32 +01:00
+++ 1.90/sql/sql_load.cc	2007-02-26 20:35:32 +01:00
@@ -353,7 +353,6 @@ int mysql_load(THD *thd,sql_exchange *ex
   }
   sprintf(name, ER(ER_LOAD_INFO), (ulong) info.records, (ulong) info.deleted,
 	  (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
   if (!thd->slave_thread)
     mysql_update_log.write(thd,thd->query,thd->query_length);
@@ -378,6 +377,9 @@ int mysql_load(THD *thd,sql_exchange *ex
 #endif /*!EMBEDDED_LIBRARY*/
   if (transactional_table)
     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:
   if (thd->lock)
   {
Thread
bk commit into 4.1 tree (gbichot:1.2609) BUG#26050guilhem26 Feb