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.2187 05/04/15 16:14:08 mskold@stripped +1 -0
Bug #9839 Column with AUTOINC contains -1 Value on node stop, post review fix
sql/ha_ndbcluster.cc
1.141 05/04/15 16:13:57 mskold@stripped +18 -5
Bug #9839 Column with AUTOINC contains -1 Value on node stop, post review fix
# 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.140/sql/ha_ndbcluster.cc Fri Apr 15 15:48:40 2005
+++ 1.141/sql/ha_ndbcluster.cc Fri Apr 15 16:13:57 2005
@@ -48,6 +48,7 @@
#define NDB_HIDDEN_PRIMARY_KEY_LENGTH 8
#define NDB_FAILED_AUTO_INCREMENT ~(Uint64)0
+#define NDB_AUTO_INCREMENT_RETRIES 10
#define ERR_PRINT(err) \
DBUG_PRINT("error", ("%d message: %s", err.code, err.message))
@@ -1839,7 +1840,13 @@
{
// Table has hidden primary key
Ndb *ndb= get_ndb();
- Uint64 auto_value= ndb->getAutoIncrementValue((const NDBTAB *) m_table);
+ Uint64 auto_value= NDB_FAILED_AUTO_INCREMENT;
+ uint retries= NDB_AUTO_INCREMENT_RETRIES;
+ do {
+ auto_value= ndb->getAutoIncrementValue((const NDBTAB *) m_table);
+ } while (auto_value == NDB_FAILED_AUTO_INCREMENT &&
+ --retries &&
+ ndb->getNdbError().status == NdbError::TemporaryError);
if (auto_value == NDB_FAILED_AUTO_INCREMENT)
ERR_RETURN(ndb->getNdbError());
if (set_hidden_key(op, table->fields, (const byte*)&auto_value))
@@ -3974,10 +3981,16 @@
: (m_rows_to_insert > m_autoincrement_prefetch) ?
m_rows_to_insert
: m_autoincrement_prefetch;
- Uint64 auto_value=
- (m_skip_auto_increment) ?
- ndb->readAutoIncrementValue((const NDBTAB *) m_table)
- : ndb->getAutoIncrementValue((const NDBTAB *) m_table, cache_size);
+ Uint64 auto_value= NDB_FAILED_AUTO_INCREMENT;
+ uint retries= NDB_AUTO_INCREMENT_RETRIES;
+ do {
+ auto_value=
+ (m_skip_auto_increment) ?
+ ndb->readAutoIncrementValue((const NDBTAB *) m_table)
+ : ndb->getAutoIncrementValue((const NDBTAB *) m_table, cache_size);
+ } while (auto_value == NDB_FAILED_AUTO_INCREMENT &&
+ --retries &&
+ ndb->getNdbError().status == NdbError::TemporaryError);
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.2187) BUG#9839 | Martin Skold | 15 Apr |