List:Internals« Previous MessageNext Message »
From:Martin Skold Date:April 15 2005 3:52pm
Subject:bk commit into 4.1 tree (mskold:1.2186) BUG#9839
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of marty. When marty 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
  1.2186 05/04/15 15:52:07 mskold@stripped +1 -0
  Bug #9839  Column with AUTOINC contains -1 Value on node stop

  sql/ha_ndbcluster.cc
    1.140 05/04/15 15:48:40 mskold@stripped +5 -0
    Bug #9839  Column with AUTOINC contains -1 Value on node stop

# 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:	mskold
# Host:	blowfish.ndb.mysql.com
# Root:	/usr/local/home/marty/MySQL/mysql-4.1

--- 1.139/sql/ha_ndbcluster.cc	Wed Apr 13 14:08:50 2005
+++ 1.140/sql/ha_ndbcluster.cc	Fri Apr 15 15:48:40 2005
@@ -47,6 +47,7 @@
 
 #define NDB_HIDDEN_PRIMARY_KEY_LENGTH 8
 
+#define NDB_FAILED_AUTO_INCREMENT ~(Uint64)0
 
 #define ERR_PRINT(err) \
   DBUG_PRINT("error", ("%d  message: %s", err.code, err.message))
@@ -1839,6 +1840,8 @@
     // Table has hidden primary key
     Ndb *ndb= get_ndb();
     Uint64 auto_value= ndb->getAutoIncrementValue((const NDBTAB *) m_table);
+    if (auto_value == NDB_FAILED_AUTO_INCREMENT)
+      ERR_RETURN(ndb->getNdbError());
     if (set_hidden_key(op, table->fields, (const byte*)&auto_value))
       ERR_RETURN(op->getNdbError());
   } 
@@ -3975,6 +3978,8 @@
     (m_skip_auto_increment) ? 
     ndb->readAutoIncrementValue((const NDBTAB *) m_table)
     : ndb->getAutoIncrementValue((const NDBTAB *) m_table, cache_size);
+  if (auto_value == NDB_FAILED_AUTO_INCREMENT)
+    ERR_RETURN(ndb->getNdbError());
   DBUG_RETURN((longlong)auto_value);
 }
 
Thread
bk commit into 4.1 tree (mskold:1.2186) BUG#9839Martin Skold15 Apr