#At file:///home/jonas/src/telco-7.0/ based on revid:ole.john.aske@stripped
4254 Jonas Oreland 2011-03-24
ndb - bug#11885852 - ndb_restore -e inserts a too low gci value
modified:
mysql-test/suite/ndb/r/ndb_restore_compat_downward.result
mysql-test/suite/ndb/r/ndb_restore_misc.result
storage/ndb/tools/restore/consumer_restore.cpp
=== modified file 'mysql-test/suite/ndb/r/ndb_restore_compat_downward.result'
--- a/mysql-test/suite/ndb/r/ndb_restore_compat_downward.result 2011-02-22 01:15:42 +0000
+++ b/mysql-test/suite/ndb/r/ndb_restore_compat_downward.result 2011-03-24 09:58:55 +0000
@@ -46,7 +46,7 @@ SYSTEM_VALUES_ID VALUE
1 3
SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;
server_id epoch log_name start_pos end_pos
-0 151 0 0
+0 152 0 0
ForceVarPart: 1
ForceVarPart: 1
ForceVarPart: 1
@@ -110,7 +110,7 @@ SYSTEM_VALUES_ID VALUE
1 5
SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;
server_id epoch log_name start_pos end_pos
-0 331 0 0
+0 332 0 0
SELECT * FROM DESCRIPTION ORDER BY USERNAME;
USERNAME ADDRESS
Guangbao Ni Suite 503, 5F NCI Tower, A12 Jianguomenwai Avenue Chaoyang District, Beijing, 100022 PRC
=== modified file 'mysql-test/suite/ndb/r/ndb_restore_misc.result'
--- a/mysql-test/suite/ndb/r/ndb_restore_misc.result 2011-02-22 03:29:24 +0000
+++ b/mysql-test/suite/ndb/r/ndb_restore_misc.result 2011-03-24 09:58:55 +0000
@@ -575,10 +575,10 @@ c1 c2 c3
drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t11_c;
select epoch from mysql.ndb_apply_status where server_id=0;
epoch
-331
+332
select epoch from mysql.ndb_apply_status where server_id=0;
epoch
-151
+152
select epoch > (1 << 32) from mysql.ndb_apply_status where server_id=0;
epoch > (1 << 32)
1
=== modified file 'storage/ndb/tools/restore/consumer_restore.cpp'
--- a/storage/ndb/tools/restore/consumer_restore.cpp 2011-02-19 03:13:04 +0000
+++ b/storage/ndb/tools/restore/consumer_restore.cpp 2011-03-24 09:58:55 +0000
@@ -1233,12 +1233,24 @@ BackupRestore::update_apply_status(const
Uint32 server_id= 0;
Uint64 epoch= Uint64(metaData.getStopGCP());
Uint32 version= metaData.getNdbVersion();
- if (version >= NDBD_MICRO_GCP_63)
- epoch<<= 32; // Only gci_hi is saved...
- else if (version >= NDBD_MICRO_GCP_62 &&
- getMinor(version) == 2)
+
+ /**
+ * Bug#XXX, stopGCP is not really stop GCP, but stopGCP - 1
+ */
+ epoch += 1;
+
+ if (version >= NDBD_MICRO_GCP_63 ||
+ (version >= NDBD_MICRO_GCP_62 && getMinor(version) == 2))
+ {
epoch<<= 32; // Only gci_hi is saved...
+ /**
+ * Backup contains all epochs with those top bits,
+ * so we indicate that with max setting
+ */
+ epoch += (Uint64(1) << 32) - 1;
+ }
+
Uint64 zero= 0;
char empty_string[1];
empty_string[0]= 0;
Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20110324095855-42282os6n7mweunb.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0 branch (jonas:4254) Bug#11885852 | Jonas Oreland | 24 Mar |