List:Commits« Previous MessageNext Message »
From:Martin Skold Date:December 1 2009 8:56am
Subject:bzr commit into mysql-5.1-telco-6.2 branch (Martin.Skold:3039) Bug#48005
View as plain text  
#At file:///home/marty/MySQL/mysql-5.1-telco-6.2/

 3039 Martin Skold	2009-12-01
      Bug#48005 ndb backup / restore does not restore the auto_increment: Post review changes
      modified:
        storage/ndb/tools/restore/Restore.cpp

=== modified file 'storage/ndb/tools/restore/Restore.cpp'
--- a/storage/ndb/tools/restore/Restore.cpp	2009-11-25 12:37:14 +0000
+++ b/storage/ndb/tools/restore/Restore.cpp	2009-12-01 08:56:39 +0000
@@ -1139,17 +1139,17 @@ TableS::get_auto_data(const TupleS & tup
     value in the sequence (note though that sequences of
     values can have been fetched and that are cached in NdbAPI).
     SYSTAB_0 can contain other data so we need to check that
-    the found SYSKEY value is a valid table_id (< 0x1000000).
+    the found SYSKEY value is a valid table_id (< 0x10000000).
    */
   AttributeData * attr_data = tuple.getData(0);
   const AttributeDesc * attr_desc = tuple.getDesc(0);
   const AttributeS attr1 = {attr_desc, *attr_data};
-  *syskey = *(attr1.Data.u_int32_value);
+  memcpy(syskey ,attr1.Data.u_int32_value, sizeof(Uint32));
   attr_data = tuple.getData(1);
   attr_desc = tuple.getDesc(1);
   const AttributeS attr2 = {attr_desc, *attr_data};
-  *nextid = *(attr2.Data.u_int64_value);
-  if (*syskey < 0x1000000)
+  memcpy(nextid, attr2.Data.u_int64_value, sizeof(Uint64));
+  if (*syskey < 0x10000000)
   {
     return true;
   }

Thread
bzr commit into mysql-5.1-telco-6.2 branch (Martin.Skold:3039) Bug#48005Martin Skold1 Dec