You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#34976028 Crashed NDB Cluster Fails in Phase4 due to index version error on Foreign Key
Backport to 7.5+
Schema objects in Ndb have a composite version, comprising major
and minor subversions. When a schema object is created its major
version is set. When an existing schema object is altered inplace,
its minor subversion is incremented.
At restart time each data node checks schema objects as part
of recovery.
For foreign key objects, the versions of referenced 'parent' and
'child' tables [and indexes] are checked for consistency.
For foreign key references from or to a table's primary key, there
are no (secondary) indexes involved and only table versions are
checked.
For foreign key references to or from a secondary index, there
are secondary indexes involved which have their versions checked.
The table version checks only compare major subversions, allowing
tables to evolve.
The index version checks also compare minor subversions, resulting
in failure at restart time if an index has been altered.
Many inplace ALTERs do not affect secondary ordered indexes, and
so do not modify their minor subversions, but online table
reorganisation and alters of a table's READBACKUP property do
affect indexes and their minor subversions.
This bug is fixed so that only major subversions are compared
for indexes, and two tests are extended to give coverage.
ndb_fk_restart
nbk_fk_addnode
Change-Id: Ic250e3100c9bcd114b1beb42132b3887f4ef1713
load data local infile 'suite/ndb/data/table_data10000.dat' into table t1 fields terminated by ' ' lines terminated by '\n' ignore 900 lines;
7
-
load data local infile 'suite/ndb/data/table_data10000.dat' into table t2 fields terminated by ' ' lines terminated by '\n' ignore 900 lines (@id, data) set id1 = @id, id2 = -@id;
load data local infile 'suite/ndb/data/table_data10000.dat' into table t1 fields terminated by ' ' lines terminated by '\n' ignore 900 lines (@id, data) set id1 = @id, id3 = -@id;
8
+
load data local infile 'suite/ndb/data/table_data10000.dat' into table t2 fields terminated by ' ' lines terminated by '\n' ignore 900 lines (@id, data) set id1 = @id, id2 = -@id, id3=-@id;
8
9
PartitionCount 2
9
10
FragmentCount 2
10
11
HashMap DEFAULT-HASHMAP-3840-2
@@ -14,6 +15,7 @@ PartitionCount 2
14
15
FragmentCount 2
15
16
HashMap DEFAULT-HASHMAP-3840-2
16
17
... id1 (id1) REFERENCES test.t1/PRIMARY KEY () on update noaction on delete noaction
18
+
10/14/id3 id3 (id3) REFERENCES test.t1/id3$unique () on update noaction on delete noaction
17
19
18
20
19
21
Nodegroup 1 created
@@ -30,8 +32,13 @@ PartitionCount 4
30
32
FragmentCount 4
31
33
HashMap DEFAULT-HASHMAP-3840-4
32
34
... id1 (id1) REFERENCES test.t1/PRIMARY KEY () on update noaction on delete noaction
35
+
10/14/id3 id3 (id3) REFERENCES test.t1/id3$unique () on update noaction on delete noaction
load data local infile 'suite/ndb/data/table_data10000.dat' into table t1 fields terminated by ' ' lines terminated by '\n' ignore 900 lines;
11
-
load data local infile 'suite/ndb/data/table_data10000.dat' into table t2 fields terminated by ' ' lines terminated by '\n' ignore 900 lines (@id, data) set id1 = @id, id2 = -@id;
11
+
load data local infile 'suite/ndb/data/table_data10000.dat' into table t1 fields terminated by ' ' lines terminated by '\n' ignore 900 lines (@id, data) set id1 = @id, id3 = -@id;
12
+
load data local infile 'suite/ndb/data/table_data10000.dat' into table t2 fields terminated by ' ' lines terminated by '\n' ignore 900 lines (@id, data) set id1 = @id, id2 = -@id, id3=-@id;
0 commit comments