diff options
author | unknown <mskold/marty@mysql.com/quadfish.(none)> | 2008-01-25 10:43:30 +0100 |
---|---|---|
committer | unknown <mskold/marty@mysql.com/quadfish.(none)> | 2008-01-25 10:43:30 +0100 |
commit | 77b2e8f314f1df93df6661b2bd89ab806c41d359 (patch) | |
tree | af11c0024db67e4ee8ac22c9c8df5a1615e62125 /storage | |
parent | 398fcf9748885009b502b59cd7af22fa3aa061cd (diff) | |
download | mariadb-git-77b2e8f314f1df93df6661b2bd89ab806c41d359.tar.gz |
ndb_restore.result, ndb_restore.test:
Changed to use information_schema to check auto_increment
Ndb.cpp:
Bug #33534 Bad performance of INSERT's in auto_incremented tables: Saving highest seen value when setting auto_increment fields
ndb_auto_increment.result:
Regenerated result
mysql-test/suite/ndb/r/ndb_auto_increment.result:
Regenerated result
mysql-test/suite/ndb/r/ndb_restore.result:
Changed to use information_schema to check auto_increment
mysql-test/suite/ndb/t/ndb_restore.test:
Changed to use information_schema to check auto_increment
storage/ndb/src/ndbapi/Ndb.cpp:
Bug #33534 Bad performance of INSERT's in auto_incremented tables: Saving highest seen value when setting auto_increment fields
Diffstat (limited to 'storage')
-rw-r--r-- | storage/ndb/src/ndbapi/Ndb.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/storage/ndb/src/ndbapi/Ndb.cpp b/storage/ndb/src/ndbapi/Ndb.cpp index 23b0e0915ae..769773c166a 100644 --- a/storage/ndb/src/ndbapi/Ndb.cpp +++ b/storage/ndb/src/ndbapi/Ndb.cpp @@ -1399,15 +1399,15 @@ Ndb::opTupleIdOnNdb(const NdbTableImpl* table, tOperation->write_attr("NEXTID", 1); tOperation->interpret_exit_ok(); tOperation->def_label(0); - tOperation->interpret_exit_nok(9999); - + tOperation->interpret_exit_ok(); + tRecAttrResult = tOperation->getValue("NEXTID"); if (tConnection->execute( NdbTransaction::Commit ) == -1) { - if (tConnection->theError.code != 9999) - goto error_handler; + goto error_handler; } else { + range.m_highest_seen = tRecAttrResult->u_64_value(); DBUG_PRINT("info", ("Setting next auto increment value (db) to %lu", (ulong) opValue)); @@ -1420,7 +1420,7 @@ Ndb::opTupleIdOnNdb(const NdbTableImpl* table, tRecAttrResult = tOperation->getValue("NEXTID"); if (tConnection->execute( NdbTransaction::Commit ) == -1 ) goto error_handler; - opValue = tRecAttrResult->u_64_value(); // out + range.m_highest_seen = opValue = tRecAttrResult->u_64_value(); // out break; default: goto error_handler; |