Commit d442b5a5 authored by unknown's avatar unknown

Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb

into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb


sql/handler.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Merge
storage/ndb/src/ndbapi/Ndb.cpp:
  Merge
parents d168b042 16048913
...@@ -886,8 +886,8 @@ Ndb::getTupleIdFromNdb(const NdbTableImpl* table, ...@@ -886,8 +886,8 @@ Ndb::getTupleIdFromNdb(const NdbTableImpl* table,
DBUG_PRINT("info", ("Next value fetched from database %lu", (ulong) opValue)); DBUG_PRINT("info", ("Next value fetched from database %lu", (ulong) opValue));
DBUG_PRINT("info", ("Increasing %lu by offset %lu, increment is %lu", (ulong) (ulong) opValue, (ulong) offset, (ulong) step)); DBUG_PRINT("info", ("Increasing %lu by offset %lu, increment is %lu", (ulong) (ulong) opValue, (ulong) offset, (ulong) step));
Uint64 current, next; Uint64 current, next;
next = ((Uint64) (opValue + step - offset)) / step; Uint64 div = ((Uint64) (opValue + step - offset)) / step;
next = next * step + offset; next = div * step + offset;
current = (next < step) ? next : next - step; current = (next < step) ? next : next - step;
tupleId = (opValue <= current) ? current : next; tupleId = (opValue <= current) ? current : next;
DBUG_PRINT("info", ("Returning %lu", (ulong) tupleId)); DBUG_PRINT("info", ("Returning %lu", (ulong) tupleId));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment