mirror of
https://github.com/MariaDB/server.git
synced 2025-11-13 21:42:58 +03:00
Merge bk-internal:/home/bk/mysql-5.1-new-ndb
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-ndb
This commit is contained in:
445
mysql-test/suite/ndb/r/ndb_auto_increment.result
Normal file
445
mysql-test/suite/ndb/r/ndb_auto_increment.result
Normal file
@@ -0,0 +1,445 @@
|
|||||||
|
DROP TABLE IF EXISTS t1,t2;
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
set @old_auto_increment_offset = @@session.auto_increment_offset;
|
||||||
|
set @old_auto_increment_increment = @@session.auto_increment_increment;
|
||||||
|
set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz;
|
||||||
|
flush status;
|
||||||
|
create table t1 (a int not null auto_increment primary key) engine ndb;
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
update t1 set a = 5 where a = 1;
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
5
|
||||||
|
6
|
||||||
|
insert into t1 values (7);
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
insert into t1 values (2);
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
2
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
update t1 set a = 4 where a = 2;
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
10
|
||||||
|
delete from t1 where a = 10;
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
11
|
||||||
|
replace t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
11
|
||||||
|
12
|
||||||
|
replace t1 values (15);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
11
|
||||||
|
12
|
||||||
|
15
|
||||||
|
replace into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
11
|
||||||
|
12
|
||||||
|
15
|
||||||
|
16
|
||||||
|
replace t1 values (15);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
11
|
||||||
|
12
|
||||||
|
15
|
||||||
|
16
|
||||||
|
insert ignore into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
11
|
||||||
|
12
|
||||||
|
15
|
||||||
|
16
|
||||||
|
17
|
||||||
|
insert ignore into t1 values (15), (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
11
|
||||||
|
12
|
||||||
|
15
|
||||||
|
16
|
||||||
|
17
|
||||||
|
18
|
||||||
|
insert into t1 values (15)
|
||||||
|
on duplicate key update a = 20;
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
11
|
||||||
|
12
|
||||||
|
16
|
||||||
|
17
|
||||||
|
18
|
||||||
|
20
|
||||||
|
21
|
||||||
|
insert into t1 values (NULL) on duplicate key update a = 30;
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
11
|
||||||
|
12
|
||||||
|
16
|
||||||
|
17
|
||||||
|
18
|
||||||
|
20
|
||||||
|
21
|
||||||
|
22
|
||||||
|
insert into t1 values (30) on duplicate key update a = 40;
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
11
|
||||||
|
12
|
||||||
|
16
|
||||||
|
17
|
||||||
|
18
|
||||||
|
20
|
||||||
|
21
|
||||||
|
22
|
||||||
|
30
|
||||||
|
insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
11
|
||||||
|
12
|
||||||
|
16
|
||||||
|
17
|
||||||
|
18
|
||||||
|
20
|
||||||
|
21
|
||||||
|
22
|
||||||
|
30
|
||||||
|
600
|
||||||
|
601
|
||||||
|
602
|
||||||
|
610
|
||||||
|
611
|
||||||
|
drop table t1;
|
||||||
|
create table t1 (a int not null primary key,
|
||||||
|
b int not null unique auto_increment) engine ndb;
|
||||||
|
insert into t1 values (1, NULL);
|
||||||
|
insert into t1 values (3, NULL);
|
||||||
|
update t1 set b = 3 where a = 3;
|
||||||
|
insert into t1 values (4, NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a b
|
||||||
|
1 1
|
||||||
|
3 3
|
||||||
|
4 4
|
||||||
|
drop table t1;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=NDBCLUSTER;
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=MYISAM;
|
||||||
|
SET @@session.auto_increment_increment=10;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
pk b c
|
||||||
|
1 1 0
|
||||||
|
11 2 1
|
||||||
|
21 3 2
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
COUNT(t1.pk)
|
||||||
|
3
|
||||||
|
TRUNCATE t1;
|
||||||
|
TRUNCATE t2;
|
||||||
|
SET @@session.auto_increment_offset=5;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
pk b c
|
||||||
|
5 1 0
|
||||||
|
15 2 1
|
||||||
|
25 3 2
|
||||||
|
27 4 3
|
||||||
|
35 5 4
|
||||||
|
99 6 5
|
||||||
|
105 7 6
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
COUNT(t1.pk)
|
||||||
|
7
|
||||||
|
TRUNCATE t1;
|
||||||
|
TRUNCATE t2;
|
||||||
|
SET @@session.auto_increment_increment=2;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
pk b c
|
||||||
|
1 1 0
|
||||||
|
3 2 1
|
||||||
|
5 3 2
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
COUNT(t1.pk)
|
||||||
|
3
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=MYISAM AUTO_INCREMENT = 7;
|
||||||
|
SET @@session.auto_increment_offset=1;
|
||||||
|
SET @@session.auto_increment_increment=1;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
pk b c
|
||||||
|
7 1 0
|
||||||
|
8 2 1
|
||||||
|
9 3 2
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
COUNT(t1.pk)
|
||||||
|
3
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3;
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=MYISAM AUTO_INCREMENT = 3;
|
||||||
|
SET @@session.auto_increment_offset=5;
|
||||||
|
SET @@session.auto_increment_increment=10;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
pk b c
|
||||||
|
5 1 0
|
||||||
|
15 2 1
|
||||||
|
25 3 2
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
COUNT(t1.pk)
|
||||||
|
3
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=MYISAM AUTO_INCREMENT = 7;
|
||||||
|
SET @@session.auto_increment_offset=5;
|
||||||
|
SET @@session.auto_increment_increment=10;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
pk b c
|
||||||
|
15 1 0
|
||||||
|
25 2 1
|
||||||
|
35 3 2
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
COUNT(t1.pk)
|
||||||
|
3
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5;
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=MYISAM AUTO_INCREMENT = 5;
|
||||||
|
SET @@session.auto_increment_offset=5;
|
||||||
|
SET @@session.auto_increment_increment=10;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
pk b c
|
||||||
|
5 1 0
|
||||||
|
15 2 1
|
||||||
|
25 3 2
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
COUNT(t1.pk)
|
||||||
|
3
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100;
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=MYISAM AUTO_INCREMENT = 100;
|
||||||
|
SET @@session.auto_increment_offset=5;
|
||||||
|
SET @@session.auto_increment_increment=10;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
pk b c
|
||||||
|
105 1 0
|
||||||
|
115 2 1
|
||||||
|
125 3 2
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
COUNT(t1.pk)
|
||||||
|
3
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
SET @@session.auto_increment_offset=1;
|
||||||
|
SET @@session.auto_increment_increment=1;
|
||||||
|
set ndb_autoincrement_prefetch_sz = 32;
|
||||||
|
drop table if exists t1;
|
||||||
|
SET @@session.auto_increment_offset=1;
|
||||||
|
SET @@session.auto_increment_increment=1;
|
||||||
|
set ndb_autoincrement_prefetch_sz = 32;
|
||||||
|
create table t1 (a int not null auto_increment primary key) engine ndb;
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
33
|
||||||
|
insert into t1 values (20);
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
20
|
||||||
|
33
|
||||||
|
34
|
||||||
|
insert into t1 values (35);
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
ERROR 23000: Duplicate entry '35' for key 'PRIMARY'
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
20
|
||||||
|
21
|
||||||
|
33
|
||||||
|
34
|
||||||
|
35
|
||||||
|
insert into t1 values (100);
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
20
|
||||||
|
21
|
||||||
|
22
|
||||||
|
33
|
||||||
|
34
|
||||||
|
35
|
||||||
|
100
|
||||||
|
101
|
||||||
|
set auto_increment_offset = @old_auto_increment_offset;
|
||||||
|
set auto_increment_increment = @old_auto_increment_increment;
|
||||||
|
set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz;
|
||||||
|
drop table t1;
|
||||||
@@ -657,172 +657,3 @@ a b
|
|||||||
2 NULL
|
2 NULL
|
||||||
3 NULL
|
3 NULL
|
||||||
drop table t1;
|
drop table t1;
|
||||||
CREATE TABLE t1 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=NDBCLUSTER;
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=MYISAM;
|
|
||||||
SET @@session.auto_increment_increment=10;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
pk b c
|
|
||||||
1 1 0
|
|
||||||
11 2 1
|
|
||||||
21 3 2
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
COUNT(t1.pk)
|
|
||||||
3
|
|
||||||
TRUNCATE t1;
|
|
||||||
TRUNCATE t2;
|
|
||||||
SET @@session.auto_increment_offset=5;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
pk b c
|
|
||||||
5 1 0
|
|
||||||
15 2 1
|
|
||||||
25 3 2
|
|
||||||
27 4 3
|
|
||||||
35 5 4
|
|
||||||
99 6 5
|
|
||||||
105 7 6
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
COUNT(t1.pk)
|
|
||||||
7
|
|
||||||
TRUNCATE t1;
|
|
||||||
TRUNCATE t2;
|
|
||||||
SET @@session.auto_increment_increment=2;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
pk b c
|
|
||||||
1 1 0
|
|
||||||
3 2 1
|
|
||||||
5 3 2
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
COUNT(t1.pk)
|
|
||||||
3
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
CREATE TABLE t1 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=MYISAM AUTO_INCREMENT = 7;
|
|
||||||
SET @@session.auto_increment_offset=1;
|
|
||||||
SET @@session.auto_increment_increment=1;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
pk b c
|
|
||||||
7 1 0
|
|
||||||
8 2 1
|
|
||||||
9 3 2
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
COUNT(t1.pk)
|
|
||||||
3
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
CREATE TABLE t1 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3;
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=MYISAM AUTO_INCREMENT = 3;
|
|
||||||
SET @@session.auto_increment_offset=5;
|
|
||||||
SET @@session.auto_increment_increment=10;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
pk b c
|
|
||||||
5 1 0
|
|
||||||
15 2 1
|
|
||||||
25 3 2
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
COUNT(t1.pk)
|
|
||||||
3
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
CREATE TABLE t1 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=MYISAM AUTO_INCREMENT = 7;
|
|
||||||
SET @@session.auto_increment_offset=5;
|
|
||||||
SET @@session.auto_increment_increment=10;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
pk b c
|
|
||||||
15 1 0
|
|
||||||
25 2 1
|
|
||||||
35 3 2
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
COUNT(t1.pk)
|
|
||||||
3
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
CREATE TABLE t1 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5;
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=MYISAM AUTO_INCREMENT = 5;
|
|
||||||
SET @@session.auto_increment_offset=5;
|
|
||||||
SET @@session.auto_increment_increment=10;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
pk b c
|
|
||||||
5 1 0
|
|
||||||
15 2 1
|
|
||||||
25 3 2
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
COUNT(t1.pk)
|
|
||||||
3
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
CREATE TABLE t1 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100;
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=MYISAM AUTO_INCREMENT = 100;
|
|
||||||
SET @@session.auto_increment_offset=5;
|
|
||||||
SET @@session.auto_increment_increment=10;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
pk b c
|
|
||||||
105 1 0
|
|
||||||
115 2 1
|
|
||||||
125 3 2
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
COUNT(t1.pk)
|
|
||||||
3
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
|
|||||||
293
mysql-test/suite/ndb/t/ndb_auto_increment.test
Normal file
293
mysql-test/suite/ndb/t/ndb_auto_increment.test
Normal file
@@ -0,0 +1,293 @@
|
|||||||
|
-- source include/have_multi_ndb.inc
|
||||||
|
-- source include/not_embedded.inc
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
connection server1;
|
||||||
|
DROP TABLE IF EXISTS t1,t2;
|
||||||
|
connection server2;
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
connection server1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
set @old_auto_increment_offset = @@session.auto_increment_offset;
|
||||||
|
set @old_auto_increment_increment = @@session.auto_increment_increment;
|
||||||
|
set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz;
|
||||||
|
|
||||||
|
flush status;
|
||||||
|
|
||||||
|
create table t1 (a int not null auto_increment primary key) engine ndb;
|
||||||
|
|
||||||
|
# Step 1: Verify simple insert
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
# Step 2: Verify simple update with higher than highest value causes
|
||||||
|
# next insert to use updated_value + 1
|
||||||
|
update t1 set a = 5 where a = 1;
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
# Step 3: Verify insert that inserts higher than highest value causes
|
||||||
|
# next insert to use inserted_value + 1
|
||||||
|
insert into t1 values (7);
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
# Step 4: Verify that insert into hole, lower than highest value doesn't
|
||||||
|
# affect next insert
|
||||||
|
insert into t1 values (2);
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
# Step 5: Verify that update into hole, lower than highest value doesn't
|
||||||
|
# affect next insert
|
||||||
|
update t1 set a = 4 where a = 2;
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
# Step 6: Verify that delete of highest value doesn't cause the next
|
||||||
|
# insert to reuse this value
|
||||||
|
delete from t1 where a = 10;
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
# Step 7: Verify that REPLACE has the same effect as INSERT
|
||||||
|
replace t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
replace t1 values (15);
|
||||||
|
select * from t1 order by a;
|
||||||
|
replace into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
# Step 8: Verify that REPLACE has the same effect as UPDATE
|
||||||
|
replace t1 values (15);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
# Step 9: Verify that IGNORE doesn't affect auto_increment
|
||||||
|
insert ignore into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
insert ignore into t1 values (15), (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
# Step 10: Verify that on duplicate key as UPDATE behaves as an
|
||||||
|
# UPDATE
|
||||||
|
insert into t1 values (15)
|
||||||
|
on duplicate key update a = 20;
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
# Step 11: Verify that on duplicate key as INSERT behaves as INSERT
|
||||||
|
insert into t1 values (NULL) on duplicate key update a = 30;
|
||||||
|
select * from t1 order by a;
|
||||||
|
insert into t1 values (30) on duplicate key update a = 40;
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
#Step 12: Vefify INSERT IGNORE (bug#32055)
|
||||||
|
insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
#Step 13: Verify auto_increment of unique key
|
||||||
|
create table t1 (a int not null primary key,
|
||||||
|
b int not null unique auto_increment) engine ndb;
|
||||||
|
insert into t1 values (1, NULL);
|
||||||
|
insert into t1 values (3, NULL);
|
||||||
|
update t1 set b = 3 where a = 3;
|
||||||
|
insert into t1 values (4, NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
#Step 14: Verify that auto_increment_increment and auto_increment_offset
|
||||||
|
# work as expected
|
||||||
|
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=NDBCLUSTER;
|
||||||
|
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=MYISAM;
|
||||||
|
|
||||||
|
SET @@session.auto_increment_increment=10;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
TRUNCATE t1;
|
||||||
|
TRUNCATE t2;
|
||||||
|
SET @@session.auto_increment_offset=5;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
TRUNCATE t1;
|
||||||
|
TRUNCATE t2;
|
||||||
|
SET @@session.auto_increment_increment=2;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
|
||||||
|
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=MYISAM AUTO_INCREMENT = 7;
|
||||||
|
|
||||||
|
SET @@session.auto_increment_offset=1;
|
||||||
|
SET @@session.auto_increment_increment=1;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3;
|
||||||
|
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=MYISAM AUTO_INCREMENT = 3;
|
||||||
|
|
||||||
|
SET @@session.auto_increment_offset=5;
|
||||||
|
SET @@session.auto_increment_increment=10;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
|
||||||
|
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=MYISAM AUTO_INCREMENT = 7;
|
||||||
|
|
||||||
|
SET @@session.auto_increment_offset=5;
|
||||||
|
SET @@session.auto_increment_increment=10;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5;
|
||||||
|
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=MYISAM AUTO_INCREMENT = 5;
|
||||||
|
|
||||||
|
SET @@session.auto_increment_offset=5;
|
||||||
|
SET @@session.auto_increment_increment=10;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100;
|
||||||
|
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL UNIQUE
|
||||||
|
) ENGINE=MYISAM AUTO_INCREMENT = 100;
|
||||||
|
|
||||||
|
SET @@session.auto_increment_offset=5;
|
||||||
|
SET @@session.auto_increment_increment=10;
|
||||||
|
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
||||||
|
SELECT * FROM t1 ORDER BY pk;
|
||||||
|
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
#Step 15: Now verify that behaviour on multiple MySQL Servers behave
|
||||||
|
# properly. Start by dropping table and recreating it to start
|
||||||
|
# counters and id caches from zero again.
|
||||||
|
--disable_warnings
|
||||||
|
connection server2;
|
||||||
|
SET @@session.auto_increment_offset=1;
|
||||||
|
SET @@session.auto_increment_increment=1;
|
||||||
|
set ndb_autoincrement_prefetch_sz = 32;
|
||||||
|
drop table if exists t1;
|
||||||
|
connection server1;
|
||||||
|
SET @@session.auto_increment_offset=1;
|
||||||
|
SET @@session.auto_increment_increment=1;
|
||||||
|
set ndb_autoincrement_prefetch_sz = 32;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
|
||||||
|
create table t1 (a int not null auto_increment primary key) engine ndb;
|
||||||
|
# Basic test, ensure that the second server gets a new range.
|
||||||
|
#Generate record with key = 1
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
connection server2;
|
||||||
|
#Generate record with key = 33
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
connection server1;
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
#This insert should not affect the range of the second server
|
||||||
|
insert into t1 values (20);
|
||||||
|
connection server2;
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
connection server1;
|
||||||
|
#This insert should remove cached values but also skip values already
|
||||||
|
#taken by server2, given that there is no method of communicating with
|
||||||
|
#the other server it should also cause a conflict
|
||||||
|
connection server1;
|
||||||
|
|
||||||
|
insert into t1 values (35);
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
connection server2;
|
||||||
|
--error ER_DUP_ENTRY
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
insert into t1 values (100);
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
connection server1;
|
||||||
|
insert into t1 values (NULL);
|
||||||
|
select * from t1 order by a;
|
||||||
|
|
||||||
|
set auto_increment_offset = @old_auto_increment_offset;
|
||||||
|
set auto_increment_increment = @old_auto_increment_increment;
|
||||||
|
set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz;
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
@@ -638,142 +638,4 @@ create table t1(a int primary key, b int, unique key(b)) engine=ndb;
|
|||||||
insert ignore into t1 values (1,0), (2,0), (2,null), (3,null);
|
insert ignore into t1 values (1,0), (2,0), (2,null), (3,null);
|
||||||
select * from t1 order by a;
|
select * from t1 order by a;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
# Bug#26342 auto_increment_increment AND auto_increment_offset REALLY REALLY anger NDB cluster
|
|
||||||
|
|
||||||
CREATE TABLE t1 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=NDBCLUSTER;
|
|
||||||
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=MYISAM;
|
|
||||||
|
|
||||||
SET @@session.auto_increment_increment=10;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
TRUNCATE t1;
|
|
||||||
TRUNCATE t2;
|
|
||||||
SET @@session.auto_increment_offset=5;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
TRUNCATE t1;
|
|
||||||
TRUNCATE t2;
|
|
||||||
SET @@session.auto_increment_increment=2;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
|
|
||||||
CREATE TABLE t1 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
|
|
||||||
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=MYISAM AUTO_INCREMENT = 7;
|
|
||||||
|
|
||||||
SET @@session.auto_increment_offset=1;
|
|
||||||
SET @@session.auto_increment_increment=1;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
|
|
||||||
CREATE TABLE t1 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3;
|
|
||||||
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=MYISAM AUTO_INCREMENT = 3;
|
|
||||||
|
|
||||||
SET @@session.auto_increment_offset=5;
|
|
||||||
SET @@session.auto_increment_increment=10;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
|
|
||||||
CREATE TABLE t1 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
|
|
||||||
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=MYISAM AUTO_INCREMENT = 7;
|
|
||||||
|
|
||||||
SET @@session.auto_increment_offset=5;
|
|
||||||
SET @@session.auto_increment_increment=10;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
|
|
||||||
CREATE TABLE t1 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5;
|
|
||||||
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=MYISAM AUTO_INCREMENT = 5;
|
|
||||||
|
|
||||||
SET @@session.auto_increment_offset=5;
|
|
||||||
SET @@session.auto_increment_increment=10;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
|
|
||||||
CREATE TABLE t1 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100;
|
|
||||||
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
||||||
b INT NOT NULL,
|
|
||||||
c INT NOT NULL UNIQUE
|
|
||||||
) ENGINE=MYISAM AUTO_INCREMENT = 100;
|
|
||||||
|
|
||||||
SET @@session.auto_increment_offset=5;
|
|
||||||
SET @@session.auto_increment_increment=10;
|
|
||||||
INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
|
|
||||||
SELECT * FROM t1 ORDER BY pk;
|
|
||||||
SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
|||||||
@@ -2704,6 +2704,29 @@ int ha_ndbcluster::full_table_scan(uchar *buf)
|
|||||||
DBUG_RETURN(next_result(buf));
|
DBUG_RETURN(next_result(buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
ha_ndbcluster::set_auto_inc(Field *field)
|
||||||
|
{
|
||||||
|
DBUG_ENTER("ha_ndbcluster::set_auto_inc");
|
||||||
|
Ndb *ndb= get_ndb();
|
||||||
|
bool read_bit= bitmap_is_set(table->read_set, field->field_index);
|
||||||
|
bitmap_set_bit(table->read_set, field->field_index);
|
||||||
|
Uint64 next_val= (Uint64) field->val_int() + 1;
|
||||||
|
if (!read_bit)
|
||||||
|
bitmap_clear_bit(table->read_set, field->field_index);
|
||||||
|
#ifndef DBUG_OFF
|
||||||
|
char buff[22];
|
||||||
|
DBUG_PRINT("info",
|
||||||
|
("Trying to set next auto increment value to %s",
|
||||||
|
llstr(next_val, buff)));
|
||||||
|
#endif
|
||||||
|
Ndb_tuple_id_range_guard g(m_share);
|
||||||
|
if (ndb->setAutoIncrementValue(m_table, g.range, next_val, TRUE)
|
||||||
|
== -1)
|
||||||
|
ERR_RETURN(ndb->getNdbError());
|
||||||
|
DBUG_RETURN(0);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Insert one record into NDB
|
Insert one record into NDB
|
||||||
*/
|
*/
|
||||||
@@ -2910,18 +2933,11 @@ int ha_ndbcluster::write_row(uchar *record)
|
|||||||
}
|
}
|
||||||
if ((has_auto_increment) && (m_skip_auto_increment))
|
if ((has_auto_increment) && (m_skip_auto_increment))
|
||||||
{
|
{
|
||||||
Ndb *ndb= get_ndb();
|
int ret_val;
|
||||||
Uint64 next_val= (Uint64) table->next_number_field->val_int() + 1;
|
if ((ret_val= set_auto_inc(table->next_number_field)))
|
||||||
#ifndef DBUG_OFF
|
{
|
||||||
char buff[22];
|
DBUG_RETURN(ret_val);
|
||||||
DBUG_PRINT("info",
|
}
|
||||||
("Trying to set next auto increment value to %s",
|
|
||||||
llstr(next_val, buff)));
|
|
||||||
#endif
|
|
||||||
Ndb_tuple_id_range_guard g(m_share);
|
|
||||||
if (ndb->setAutoIncrementValue(m_table, g.range, next_val, TRUE)
|
|
||||||
== -1)
|
|
||||||
ERR_RETURN(ndb->getNdbError());
|
|
||||||
}
|
}
|
||||||
m_skip_auto_increment= TRUE;
|
m_skip_auto_increment= TRUE;
|
||||||
|
|
||||||
@@ -3046,6 +3062,17 @@ int ha_ndbcluster::update_row(const uchar *old_data, uchar *new_data)
|
|||||||
// Insert new row
|
// Insert new row
|
||||||
DBUG_PRINT("info", ("delete succeded"));
|
DBUG_PRINT("info", ("delete succeded"));
|
||||||
m_primary_key_update= TRUE;
|
m_primary_key_update= TRUE;
|
||||||
|
/*
|
||||||
|
If we are updating a primary key with auto_increment
|
||||||
|
then we need to update the auto_increment counter
|
||||||
|
*/
|
||||||
|
if (table->found_next_number_field &&
|
||||||
|
bitmap_is_set(table->write_set,
|
||||||
|
table->found_next_number_field->field_index) &&
|
||||||
|
(error= set_auto_inc(table->found_next_number_field)))
|
||||||
|
{
|
||||||
|
DBUG_RETURN(error);
|
||||||
|
}
|
||||||
insert_res= write_row(new_data);
|
insert_res= write_row(new_data);
|
||||||
m_primary_key_update= FALSE;
|
m_primary_key_update= FALSE;
|
||||||
if (insert_res)
|
if (insert_res)
|
||||||
@@ -3068,7 +3095,17 @@ int ha_ndbcluster::update_row(const uchar *old_data, uchar *new_data)
|
|||||||
DBUG_PRINT("info", ("delete+insert succeeded"));
|
DBUG_PRINT("info", ("delete+insert succeeded"));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
If we are updating a unique key with auto_increment
|
||||||
|
then we need to update the auto_increment counter
|
||||||
|
*/
|
||||||
|
if (table->found_next_number_field &&
|
||||||
|
bitmap_is_set(table->write_set,
|
||||||
|
table->found_next_number_field->field_index) &&
|
||||||
|
(error= set_auto_inc(table->found_next_number_field)))
|
||||||
|
{
|
||||||
|
DBUG_RETURN(error);
|
||||||
|
}
|
||||||
if (cursor)
|
if (cursor)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -4479,8 +4516,10 @@ int ha_ndbcluster::init_handler_for_statement(THD *thd, Thd_ndb *thd_ndb)
|
|||||||
m_force_send= thd->variables.ndb_force_send;
|
m_force_send= thd->variables.ndb_force_send;
|
||||||
m_ha_not_exact_count= !thd->variables.ndb_use_exact_count;
|
m_ha_not_exact_count= !thd->variables.ndb_use_exact_count;
|
||||||
m_autoincrement_prefetch=
|
m_autoincrement_prefetch=
|
||||||
(ha_rows) thd->variables.ndb_autoincrement_prefetch_sz;
|
(thd->variables.ndb_autoincrement_prefetch_sz >
|
||||||
|
NDB_DEFAULT_AUTO_PREFETCH) ?
|
||||||
|
(ha_rows) thd->variables.ndb_autoincrement_prefetch_sz
|
||||||
|
: (ha_rows) NDB_DEFAULT_AUTO_PREFETCH;
|
||||||
m_active_trans= thd_ndb->trans;
|
m_active_trans= thd_ndb->trans;
|
||||||
DBUG_ASSERT(m_active_trans);
|
DBUG_ASSERT(m_active_trans);
|
||||||
// Start of transaction
|
// Start of transaction
|
||||||
@@ -6163,8 +6202,9 @@ void ha_ndbcluster::get_auto_increment(ulonglong offset, ulonglong increment,
|
|||||||
ulonglong *first_value,
|
ulonglong *first_value,
|
||||||
ulonglong *nb_reserved_values)
|
ulonglong *nb_reserved_values)
|
||||||
{
|
{
|
||||||
int cache_size;
|
uint cache_size;
|
||||||
Uint64 auto_value;
|
Uint64 auto_value;
|
||||||
|
THD *thd= current_thd;
|
||||||
DBUG_ENTER("get_auto_increment");
|
DBUG_ENTER("get_auto_increment");
|
||||||
DBUG_PRINT("enter", ("m_tabname: %s", m_tabname));
|
DBUG_PRINT("enter", ("m_tabname: %s", m_tabname));
|
||||||
Ndb *ndb= get_ndb();
|
Ndb *ndb= get_ndb();
|
||||||
@@ -6174,11 +6214,14 @@ void ha_ndbcluster::get_auto_increment(ulonglong offset, ulonglong increment,
|
|||||||
/* We guessed too low */
|
/* We guessed too low */
|
||||||
m_rows_to_insert+= m_autoincrement_prefetch;
|
m_rows_to_insert+= m_autoincrement_prefetch;
|
||||||
}
|
}
|
||||||
cache_size=
|
uint remaining= m_rows_to_insert - m_rows_inserted;
|
||||||
(int) ((m_rows_to_insert - m_rows_inserted < m_autoincrement_prefetch) ?
|
uint min_prefetch=
|
||||||
m_rows_to_insert - m_rows_inserted :
|
(remaining < thd->variables.ndb_autoincrement_prefetch_sz) ?
|
||||||
((m_rows_to_insert > m_autoincrement_prefetch) ?
|
thd->variables.ndb_autoincrement_prefetch_sz
|
||||||
m_rows_to_insert : m_autoincrement_prefetch));
|
: remaining;
|
||||||
|
cache_size= ((remaining < m_autoincrement_prefetch) ?
|
||||||
|
min_prefetch
|
||||||
|
: remaining);
|
||||||
uint retries= NDB_AUTO_INCREMENT_RETRIES;
|
uint retries= NDB_AUTO_INCREMENT_RETRIES;
|
||||||
int retry_sleep= 30; /* 30 milliseconds, transaction */
|
int retry_sleep= 30; /* 30 milliseconds, transaction */
|
||||||
for (;;)
|
for (;;)
|
||||||
@@ -6265,7 +6308,7 @@ ha_ndbcluster::ha_ndbcluster(handlerton *hton, TABLE_SHARE *table_arg):
|
|||||||
m_dupkey((uint) -1),
|
m_dupkey((uint) -1),
|
||||||
m_ha_not_exact_count(FALSE),
|
m_ha_not_exact_count(FALSE),
|
||||||
m_force_send(TRUE),
|
m_force_send(TRUE),
|
||||||
m_autoincrement_prefetch((ha_rows) 32),
|
m_autoincrement_prefetch((ha_rows) NDB_DEFAULT_AUTO_PREFETCH),
|
||||||
m_transaction_on(TRUE),
|
m_transaction_on(TRUE),
|
||||||
m_cond(NULL),
|
m_cond(NULL),
|
||||||
m_multi_cursor(NULL)
|
m_multi_cursor(NULL)
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
#include <ndbapi_limits.h>
|
#include <ndbapi_limits.h>
|
||||||
|
|
||||||
#define NDB_HIDDEN_PRIMARY_KEY_LENGTH 8
|
#define NDB_HIDDEN_PRIMARY_KEY_LENGTH 8
|
||||||
|
#define NDB_DEFAULT_AUTO_PREFETCH 32
|
||||||
|
|
||||||
|
|
||||||
class Ndb; // Forward declaration
|
class Ndb; // Forward declaration
|
||||||
class NdbOperation; // Forward declaration
|
class NdbOperation; // Forward declaration
|
||||||
@@ -446,6 +448,7 @@ private:
|
|||||||
uint errcode);
|
uint errcode);
|
||||||
int peek_indexed_rows(const uchar *record, NDB_WRITE_OP write_op);
|
int peek_indexed_rows(const uchar *record, NDB_WRITE_OP write_op);
|
||||||
int fetch_next(NdbScanOperation* op);
|
int fetch_next(NdbScanOperation* op);
|
||||||
|
int set_auto_inc(Field *field);
|
||||||
int next_result(uchar *buf);
|
int next_result(uchar *buf);
|
||||||
int define_read_attrs(uchar* buf, NdbOperation* op);
|
int define_read_attrs(uchar* buf, NdbOperation* op);
|
||||||
int filtered_scan(const uchar *key, uint key_len,
|
int filtered_scan(const uchar *key, uint key_len,
|
||||||
|
|||||||
@@ -5506,13 +5506,8 @@ master-ssl",
|
|||||||
{"ndb-autoincrement-prefetch-sz", OPT_NDB_AUTOINCREMENT_PREFETCH_SZ,
|
{"ndb-autoincrement-prefetch-sz", OPT_NDB_AUTOINCREMENT_PREFETCH_SZ,
|
||||||
"Specify number of autoincrement values that are prefetched.",
|
"Specify number of autoincrement values that are prefetched.",
|
||||||
(uchar**) &global_system_variables.ndb_autoincrement_prefetch_sz,
|
(uchar**) &global_system_variables.ndb_autoincrement_prefetch_sz,
|
||||||
(uchar**) &global_system_variables.ndb_autoincrement_prefetch_sz,
|
(uchar**) &max_system_variables.ndb_autoincrement_prefetch_sz,
|
||||||
0, GET_ULONG, REQUIRED_ARG, 32, 1, 256, 0, 0, 0},
|
0, GET_ULONG, REQUIRED_ARG, 1, 1, 256, 0, 0, 0},
|
||||||
{"ndb-distribution", OPT_NDB_DISTRIBUTION,
|
|
||||||
"Default distribution for new tables in ndb",
|
|
||||||
(uchar**) &opt_ndb_distribution,
|
|
||||||
(uchar**) &opt_ndb_distribution,
|
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
|
||||||
{"ndb-force-send", OPT_NDB_FORCE_SEND,
|
{"ndb-force-send", OPT_NDB_FORCE_SEND,
|
||||||
"Force send of buffers to ndb immediately without waiting for "
|
"Force send of buffers to ndb immediately without waiting for "
|
||||||
"other threads.",
|
"other threads.",
|
||||||
|
|||||||
@@ -421,9 +421,10 @@ void Cmvmi::execCLOSE_COMREQ(Signal* signal)
|
|||||||
// Uint32 noOfNodes = closeCom->noOfNodes;
|
// Uint32 noOfNodes = closeCom->noOfNodes;
|
||||||
|
|
||||||
jamEntry();
|
jamEntry();
|
||||||
for (unsigned i = 0; i < MAX_NODES; i++){
|
for (unsigned i = 0; i < MAX_NODES; i++)
|
||||||
if(NodeBitmask::get(closeCom->theNodes, i)){
|
{
|
||||||
|
if(NodeBitmask::get(closeCom->theNodes, i))
|
||||||
|
{
|
||||||
jam();
|
jam();
|
||||||
|
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
@@ -437,7 +438,9 @@ void Cmvmi::execCLOSE_COMREQ(Signal* signal)
|
|||||||
globalTransporterRegistry.do_disconnect(i);
|
globalTransporterRegistry.do_disconnect(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (failNo != 0) {
|
|
||||||
|
if (failNo != 0)
|
||||||
|
{
|
||||||
jam();
|
jam();
|
||||||
signal->theData[0] = userRef;
|
signal->theData[0] = userRef;
|
||||||
signal->theData[1] = failNo;
|
signal->theData[1] = failNo;
|
||||||
@@ -456,13 +459,21 @@ void Cmvmi::execOPEN_COMREQ(Signal* signal)
|
|||||||
jamEntry();
|
jamEntry();
|
||||||
|
|
||||||
const Uint32 len = signal->getLength();
|
const Uint32 len = signal->getLength();
|
||||||
if(len == 2){
|
if(len == 2)
|
||||||
|
{
|
||||||
#ifdef ERROR_INSERT
|
#ifdef ERROR_INSERT
|
||||||
if (! ((ERROR_INSERTED(9000) || ERROR_INSERTED(9002))
|
if (! ((ERROR_INSERTED(9000) || ERROR_INSERTED(9002))
|
||||||
&& c_error_9000_nodes_mask.get(tStartingNode)))
|
&& c_error_9000_nodes_mask.get(tStartingNode)))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
if (globalData.theStartLevel != NodeState::SL_STARTED &&
|
||||||
|
(getNodeInfo(tStartingNode).m_type != NodeInfo::DB &&
|
||||||
|
getNodeInfo(tStartingNode).m_type != NodeInfo::MGM))
|
||||||
|
{
|
||||||
|
jam();
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
globalTransporterRegistry.do_connect(tStartingNode);
|
globalTransporterRegistry.do_connect(tStartingNode);
|
||||||
globalTransporterRegistry.setIOState(tStartingNode, HaltIO);
|
globalTransporterRegistry.setIOState(tStartingNode, HaltIO);
|
||||||
|
|
||||||
@@ -475,9 +486,11 @@ void Cmvmi::execOPEN_COMREQ(Signal* signal)
|
|||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for(unsigned int i = 1; i < MAX_NODES; i++ ) {
|
for(unsigned int i = 1; i < MAX_NODES; i++ )
|
||||||
|
{
|
||||||
jam();
|
jam();
|
||||||
if (i != getOwnNodeId() && getNodeInfo(i).m_type == tData2){
|
if (i != getOwnNodeId() && getNodeInfo(i).m_type == tData2)
|
||||||
|
{
|
||||||
jam();
|
jam();
|
||||||
|
|
||||||
#ifdef ERROR_INSERT
|
#ifdef ERROR_INSERT
|
||||||
@@ -496,6 +509,7 @@ void Cmvmi::execOPEN_COMREQ(Signal* signal)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done:
|
||||||
if (userRef != 0) {
|
if (userRef != 0) {
|
||||||
jam();
|
jam();
|
||||||
signal->theData[0] = tStartingNode;
|
signal->theData[0] = tStartingNode;
|
||||||
@@ -537,22 +551,8 @@ void Cmvmi::execDISCONNECT_REP(Signal *signal)
|
|||||||
const NodeInfo::NodeType type = getNodeInfo(hostId).getType();
|
const NodeInfo::NodeType type = getNodeInfo(hostId).getType();
|
||||||
ndbrequire(type != NodeInfo::INVALID);
|
ndbrequire(type != NodeInfo::INVALID);
|
||||||
|
|
||||||
if(type == NodeInfo::DB || globalData.theStartLevel == NodeState::SL_STARTED){
|
|
||||||
jam();
|
|
||||||
DisconnectRep * const rep = (DisconnectRep *)&signal->theData[0];
|
|
||||||
rep->nodeId = hostId;
|
|
||||||
rep->err = errNo;
|
|
||||||
sendSignal(QMGR_REF, GSN_DISCONNECT_REP, signal,
|
sendSignal(QMGR_REF, GSN_DISCONNECT_REP, signal,
|
||||||
DisconnectRep::SignalLength, JBA);
|
DisconnectRep::SignalLength, JBA);
|
||||||
} else if((globalData.theStartLevel == NodeState::SL_CMVMI ||
|
|
||||||
globalData.theStartLevel == NodeState::SL_STARTING)
|
|
||||||
&& type == NodeInfo::MGM) {
|
|
||||||
/**
|
|
||||||
* Someone disconnected during cmvmi period
|
|
||||||
*/
|
|
||||||
jam();
|
|
||||||
globalTransporterRegistry.do_connect(hostId);
|
|
||||||
}
|
|
||||||
|
|
||||||
cancelSubscription(hostId);
|
cancelSubscription(hostId);
|
||||||
|
|
||||||
@@ -587,6 +587,8 @@ void Cmvmi::execCONNECT_REP(Signal *signal){
|
|||||||
*/
|
*/
|
||||||
if(type == NodeInfo::MGM){
|
if(type == NodeInfo::MGM){
|
||||||
jam();
|
jam();
|
||||||
|
signal->theData[0] = hostId;
|
||||||
|
sendSignal(QMGR_REF, GSN_CONNECT_REP, signal, 1, JBA);
|
||||||
} else {
|
} else {
|
||||||
/**
|
/**
|
||||||
* Dont allow api nodes to connect
|
* Dont allow api nodes to connect
|
||||||
@@ -802,6 +804,8 @@ Cmvmi::execSTART_ORD(Signal* signal) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EXECUTE_DIRECT(QMGR, GSN_START_ORD, signal, 1);
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -830,9 +834,6 @@ Cmvmi::execSTART_ORD(Signal* signal) {
|
|||||||
* Do Restart
|
* Do Restart
|
||||||
*/
|
*/
|
||||||
|
|
||||||
globalScheduler.clear();
|
|
||||||
globalTimeQueue.clear();
|
|
||||||
|
|
||||||
// Disconnect all nodes as part of the system restart.
|
// Disconnect all nodes as part of the system restart.
|
||||||
// We need to ensure that we are starting up
|
// We need to ensure that we are starting up
|
||||||
// without any connected nodes.
|
// without any connected nodes.
|
||||||
|
|||||||
@@ -10678,6 +10678,12 @@ void Dbdih::execLCP_FRAG_REP(Signal* signal)
|
|||||||
Uint32 started = lcpReport->maxGciStarted;
|
Uint32 started = lcpReport->maxGciStarted;
|
||||||
Uint32 completed = lcpReport->maxGciCompleted;
|
Uint32 completed = lcpReport->maxGciCompleted;
|
||||||
|
|
||||||
|
if (started > c_lcpState.lcpStopGcp)
|
||||||
|
{
|
||||||
|
jam();
|
||||||
|
c_lcpState.lcpStopGcp = started;
|
||||||
|
}
|
||||||
|
|
||||||
if(tableDone){
|
if(tableDone){
|
||||||
jam();
|
jam();
|
||||||
|
|
||||||
@@ -11218,7 +11224,12 @@ void Dbdih::allNodesLcpCompletedLab(Signal* signal)
|
|||||||
signal->theData[0] = NDB_LE_LocalCheckpointCompleted; //Event type
|
signal->theData[0] = NDB_LE_LocalCheckpointCompleted; //Event type
|
||||||
signal->theData[1] = SYSFILE->latestLCP_ID;
|
signal->theData[1] = SYSFILE->latestLCP_ID;
|
||||||
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
|
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
|
||||||
|
|
||||||
|
if (c_newest_restorable_gci > c_lcpState.lcpStopGcp)
|
||||||
|
{
|
||||||
|
jam();
|
||||||
c_lcpState.lcpStopGcp = c_newest_restorable_gci;
|
c_lcpState.lcpStopGcp = c_newest_restorable_gci;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start checking for next LCP
|
* Start checking for next LCP
|
||||||
@@ -12088,13 +12099,12 @@ void Dbdih::findMinGci(ReplicaRecordPtr fmgReplicaPtr,
|
|||||||
lcpNo = fmgReplicaPtr.p->nextLcp;
|
lcpNo = fmgReplicaPtr.p->nextLcp;
|
||||||
do {
|
do {
|
||||||
ndbrequire(lcpNo < MAX_LCP_STORED);
|
ndbrequire(lcpNo < MAX_LCP_STORED);
|
||||||
if (fmgReplicaPtr.p->lcpStatus[lcpNo] == ZVALID &&
|
if (fmgReplicaPtr.p->lcpStatus[lcpNo] == ZVALID)
|
||||||
fmgReplicaPtr.p->maxGciStarted[lcpNo] < c_newest_restorable_gci)
|
|
||||||
{
|
{
|
||||||
jam();
|
jam();
|
||||||
keepGci = fmgReplicaPtr.p->maxGciCompleted[lcpNo];
|
keepGci = fmgReplicaPtr.p->maxGciCompleted[lcpNo];
|
||||||
oldestRestorableGci = fmgReplicaPtr.p->maxGciStarted[lcpNo];
|
oldestRestorableGci = fmgReplicaPtr.p->maxGciStarted[lcpNo];
|
||||||
ndbrequire(((int)oldestRestorableGci) >= 0);
|
ndbassert(fmgReplicaPtr.p->maxGciStarted[lcpNo] <c_newest_restorable_gci);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
jam();
|
jam();
|
||||||
|
|||||||
@@ -266,6 +266,8 @@ private:
|
|||||||
void execALLOC_NODEID_REF(Signal *);
|
void execALLOC_NODEID_REF(Signal *);
|
||||||
void completeAllocNodeIdReq(Signal *);
|
void completeAllocNodeIdReq(Signal *);
|
||||||
|
|
||||||
|
void execSTART_ORD(Signal*);
|
||||||
|
|
||||||
// Arbitration signals
|
// Arbitration signals
|
||||||
void execARBIT_CFG(Signal* signal);
|
void execARBIT_CFG(Signal* signal);
|
||||||
void execARBIT_PREPREQ(Signal* signal);
|
void execARBIT_PREPREQ(Signal* signal);
|
||||||
@@ -281,6 +283,7 @@ private:
|
|||||||
void check_readnodes_reply(Signal* signal, Uint32 nodeId, Uint32 gsn);
|
void check_readnodes_reply(Signal* signal, Uint32 nodeId, Uint32 gsn);
|
||||||
Uint32 check_startup(Signal* signal);
|
Uint32 check_startup(Signal* signal);
|
||||||
|
|
||||||
|
void api_failed(Signal* signal, Uint32 aFailedNode);
|
||||||
void node_failed(Signal* signal, Uint16 aFailedNode);
|
void node_failed(Signal* signal, Uint16 aFailedNode);
|
||||||
void checkStartInterface(Signal* signal);
|
void checkStartInterface(Signal* signal);
|
||||||
void failReport(Signal* signal,
|
void failReport(Signal* signal,
|
||||||
|
|||||||
@@ -31,10 +31,6 @@ void Qmgr::initData()
|
|||||||
cnoCommitFailedNodes = 0;
|
cnoCommitFailedNodes = 0;
|
||||||
c_maxDynamicId = 0;
|
c_maxDynamicId = 0;
|
||||||
c_clusterNodes.clear();
|
c_clusterNodes.clear();
|
||||||
|
|
||||||
Uint32 hbDBAPI = 500;
|
|
||||||
setHbApiDelay(hbDBAPI);
|
|
||||||
c_connectedNodes.set(getOwnNodeId());
|
|
||||||
c_stopReq.senderRef = 0;
|
c_stopReq.senderRef = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,6 +39,27 @@ void Qmgr::initData()
|
|||||||
ndbrequire((Uint32)NodeInfo::DB == 0);
|
ndbrequire((Uint32)NodeInfo::DB == 0);
|
||||||
ndbrequire((Uint32)NodeInfo::API == 1);
|
ndbrequire((Uint32)NodeInfo::API == 1);
|
||||||
ndbrequire((Uint32)NodeInfo::MGM == 2);
|
ndbrequire((Uint32)NodeInfo::MGM == 2);
|
||||||
|
|
||||||
|
NodeRecPtr nodePtr;
|
||||||
|
nodePtr.i = getOwnNodeId();
|
||||||
|
ptrAss(nodePtr, nodeRec);
|
||||||
|
nodePtr.p->blockRef = reference();
|
||||||
|
|
||||||
|
c_connectedNodes.set(getOwnNodeId());
|
||||||
|
setNodeInfo(getOwnNodeId()).m_version = NDB_VERSION;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Timeouts
|
||||||
|
*/
|
||||||
|
const ndb_mgm_configuration_iterator * p =
|
||||||
|
m_ctx.m_config.getOwnConfigIterator();
|
||||||
|
ndbrequire(p != 0);
|
||||||
|
|
||||||
|
Uint32 hbDBAPI = 1500;
|
||||||
|
ndb_mgm_get_int_parameter(p, CFG_DB_API_HEARTBEAT_INTERVAL, &hbDBAPI);
|
||||||
|
|
||||||
|
setHbApiDelay(hbDBAPI);
|
||||||
}//Qmgr::initData()
|
}//Qmgr::initData()
|
||||||
|
|
||||||
void Qmgr::initRecords()
|
void Qmgr::initRecords()
|
||||||
@@ -113,6 +130,7 @@ Qmgr::Qmgr(Block_context& ctx)
|
|||||||
addRecSignal(GSN_DIH_RESTARTREF, &Qmgr::execDIH_RESTARTREF);
|
addRecSignal(GSN_DIH_RESTARTREF, &Qmgr::execDIH_RESTARTREF);
|
||||||
addRecSignal(GSN_DIH_RESTARTCONF, &Qmgr::execDIH_RESTARTCONF);
|
addRecSignal(GSN_DIH_RESTARTCONF, &Qmgr::execDIH_RESTARTCONF);
|
||||||
addRecSignal(GSN_NODE_VERSION_REP, &Qmgr::execNODE_VERSION_REP);
|
addRecSignal(GSN_NODE_VERSION_REP, &Qmgr::execNODE_VERSION_REP);
|
||||||
|
addRecSignal(GSN_START_ORD, &Qmgr::execSTART_ORD);
|
||||||
|
|
||||||
initData();
|
initData();
|
||||||
}//Qmgr::Qmgr()
|
}//Qmgr::Qmgr()
|
||||||
|
|||||||
@@ -238,6 +238,38 @@ Qmgr::execREAD_CONFIG_REQ(Signal* signal)
|
|||||||
ReadConfigConf::SignalLength, JBB);
|
ReadConfigConf::SignalLength, JBB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Qmgr::execSTART_ORD(Signal* signal)
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Start timer handling
|
||||||
|
*/
|
||||||
|
signal->theData[0] = ZTIMER_HANDLING;
|
||||||
|
sendSignal(QMGR_REF, GSN_CONTINUEB, signal, 1, JBB);
|
||||||
|
|
||||||
|
NodeRecPtr nodePtr;
|
||||||
|
for (nodePtr.i = 1; nodePtr.i < MAX_NODES; nodePtr.i++)
|
||||||
|
{
|
||||||
|
ptrAss(nodePtr, nodeRec);
|
||||||
|
nodePtr.p->ndynamicId = 0;
|
||||||
|
if(getNodeInfo(nodePtr.i).m_type == NodeInfo::DB)
|
||||||
|
{
|
||||||
|
nodePtr.p->phase = ZINIT;
|
||||||
|
c_definedNodes.set(nodePtr.i);
|
||||||
|
} else {
|
||||||
|
nodePtr.p->phase = ZAPI_INACTIVE;
|
||||||
|
}
|
||||||
|
|
||||||
|
setNodeInfo(nodePtr.i).m_heartbeat_cnt= 0;
|
||||||
|
nodePtr.p->sendPrepFailReqStatus = Q_NOT_ACTIVE;
|
||||||
|
nodePtr.p->sendCommitFailReqStatus = Q_NOT_ACTIVE;
|
||||||
|
nodePtr.p->sendPresToStatus = Q_NOT_ACTIVE;
|
||||||
|
nodePtr.p->failState = NORMAL;
|
||||||
|
nodePtr.p->rcv[0] = 0;
|
||||||
|
nodePtr.p->rcv[1] = 0;
|
||||||
|
}//for
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
4.2 ADD NODE MODULE*/
|
4.2 ADD NODE MODULE*/
|
||||||
/*##########################################################################*/
|
/*##########################################################################*/
|
||||||
@@ -298,8 +330,6 @@ void Qmgr::startphase1(Signal* signal)
|
|||||||
nodePtr.i = getOwnNodeId();
|
nodePtr.i = getOwnNodeId();
|
||||||
ptrAss(nodePtr, nodeRec);
|
ptrAss(nodePtr, nodeRec);
|
||||||
nodePtr.p->phase = ZSTARTING;
|
nodePtr.p->phase = ZSTARTING;
|
||||||
nodePtr.p->blockRef = reference();
|
|
||||||
c_connectedNodes.set(nodePtr.i);
|
|
||||||
|
|
||||||
signal->theData[0] = reference();
|
signal->theData[0] = reference();
|
||||||
sendSignal(DBDIH_REF, GSN_DIH_RESTARTREQ, signal, 1, JBB);
|
sendSignal(DBDIH_REF, GSN_DIH_RESTARTREQ, signal, 1, JBB);
|
||||||
@@ -371,11 +401,14 @@ void Qmgr::execCONNECT_REP(Signal* signal)
|
|||||||
case ZFAIL_CLOSING:
|
case ZFAIL_CLOSING:
|
||||||
jam();
|
jam();
|
||||||
return;
|
return;
|
||||||
case ZINIT:
|
|
||||||
ndbrequire(false);
|
|
||||||
case ZAPI_ACTIVE:
|
case ZAPI_ACTIVE:
|
||||||
case ZAPI_INACTIVE:
|
case ZAPI_INACTIVE:
|
||||||
return;
|
return;
|
||||||
|
case ZINIT:
|
||||||
|
ndbrequire(getNodeInfo(nodeId).m_type == NodeInfo::MGM);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ndbrequire(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getNodeInfo(nodeId).getType() != NodeInfo::DB)
|
if (getNodeInfo(nodeId).getType() != NodeInfo::DB)
|
||||||
@@ -1212,12 +1245,6 @@ void Qmgr::execCM_REGREF(Signal* signal)
|
|||||||
{
|
{
|
||||||
jam();
|
jam();
|
||||||
electionWon(signal);
|
electionWon(signal);
|
||||||
|
|
||||||
/**
|
|
||||||
* Start timer handling
|
|
||||||
*/
|
|
||||||
signal->theData[0] = ZTIMER_HANDLING;
|
|
||||||
sendSignal(QMGR_REF, GSN_CONTINUEB, signal, 10, JBB);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -1855,12 +1882,6 @@ Qmgr::joinedCluster(Signal* signal, NodeRecPtr nodePtr){
|
|||||||
|
|
||||||
sendSttorryLab(signal);
|
sendSttorryLab(signal);
|
||||||
|
|
||||||
/**
|
|
||||||
* Start timer handling
|
|
||||||
*/
|
|
||||||
signal->theData[0] = ZTIMER_HANDLING;
|
|
||||||
sendSignal(QMGR_REF, GSN_CONTINUEB, signal, 10, JBB);
|
|
||||||
|
|
||||||
sendCmAckAdd(signal, getOwnNodeId(), CmAdd::CommitNew);
|
sendCmAckAdd(signal, getOwnNodeId(), CmAdd::CommitNew);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2094,25 +2115,6 @@ void Qmgr::findNeighbours(Signal* signal)
|
|||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void Qmgr::initData(Signal* signal)
|
void Qmgr::initData(Signal* signal)
|
||||||
{
|
{
|
||||||
NodeRecPtr nodePtr;
|
|
||||||
for (nodePtr.i = 1; nodePtr.i < MAX_NODES; nodePtr.i++) {
|
|
||||||
ptrAss(nodePtr, nodeRec);
|
|
||||||
nodePtr.p->ndynamicId = 0;
|
|
||||||
if(getNodeInfo(nodePtr.i).m_type == NodeInfo::DB){
|
|
||||||
nodePtr.p->phase = ZINIT;
|
|
||||||
c_definedNodes.set(nodePtr.i);
|
|
||||||
} else {
|
|
||||||
nodePtr.p->phase = ZAPI_INACTIVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
setNodeInfo(nodePtr.i).m_heartbeat_cnt= 0;
|
|
||||||
nodePtr.p->sendPrepFailReqStatus = Q_NOT_ACTIVE;
|
|
||||||
nodePtr.p->sendCommitFailReqStatus = Q_NOT_ACTIVE;
|
|
||||||
nodePtr.p->sendPresToStatus = Q_NOT_ACTIVE;
|
|
||||||
nodePtr.p->failState = NORMAL;
|
|
||||||
nodePtr.p->rcv[0] = 0;
|
|
||||||
nodePtr.p->rcv[1] = 0;
|
|
||||||
}//for
|
|
||||||
cfailureNr = 1;
|
cfailureNr = 1;
|
||||||
ccommitFailureNr = 1;
|
ccommitFailureNr = 1;
|
||||||
cprepareFailureNr = 1;
|
cprepareFailureNr = 1;
|
||||||
@@ -2146,13 +2148,11 @@ void Qmgr::initData(Signal* signal)
|
|||||||
ndbrequire(p != 0);
|
ndbrequire(p != 0);
|
||||||
|
|
||||||
Uint32 hbDBDB = 1500;
|
Uint32 hbDBDB = 1500;
|
||||||
Uint32 hbDBAPI = 1500;
|
|
||||||
Uint32 arbitTimeout = 1000;
|
Uint32 arbitTimeout = 1000;
|
||||||
c_restartPartialTimeout = 30000;
|
c_restartPartialTimeout = 30000;
|
||||||
c_restartPartionedTimeout = 60000;
|
c_restartPartionedTimeout = 60000;
|
||||||
c_restartFailureTimeout = ~0;
|
c_restartFailureTimeout = ~0;
|
||||||
ndb_mgm_get_int_parameter(p, CFG_DB_HEARTBEAT_INTERVAL, &hbDBDB);
|
ndb_mgm_get_int_parameter(p, CFG_DB_HEARTBEAT_INTERVAL, &hbDBDB);
|
||||||
ndb_mgm_get_int_parameter(p, CFG_DB_API_HEARTBEAT_INTERVAL, &hbDBAPI);
|
|
||||||
ndb_mgm_get_int_parameter(p, CFG_DB_ARBIT_TIMEOUT, &arbitTimeout);
|
ndb_mgm_get_int_parameter(p, CFG_DB_ARBIT_TIMEOUT, &arbitTimeout);
|
||||||
ndb_mgm_get_int_parameter(p, CFG_DB_START_PARTIAL_TIMEOUT,
|
ndb_mgm_get_int_parameter(p, CFG_DB_START_PARTIAL_TIMEOUT,
|
||||||
&c_restartPartialTimeout);
|
&c_restartPartialTimeout);
|
||||||
@@ -2177,7 +2177,6 @@ void Qmgr::initData(Signal* signal)
|
|||||||
}
|
}
|
||||||
|
|
||||||
setHbDelay(hbDBDB);
|
setHbDelay(hbDBDB);
|
||||||
setHbApiDelay(hbDBAPI);
|
|
||||||
setArbitTimeout(arbitTimeout);
|
setArbitTimeout(arbitTimeout);
|
||||||
|
|
||||||
arbitRec.state = ARBIT_NULL; // start state for all nodes
|
arbitRec.state = ARBIT_NULL; // start state for all nodes
|
||||||
@@ -2204,7 +2203,6 @@ void Qmgr::initData(Signal* signal)
|
|||||||
|
|
||||||
execARBIT_CFG(signal);
|
execARBIT_CFG(signal);
|
||||||
}
|
}
|
||||||
setNodeInfo(getOwnNodeId()).m_version = NDB_VERSION;
|
|
||||||
}//Qmgr::initData()
|
}//Qmgr::initData()
|
||||||
|
|
||||||
|
|
||||||
@@ -2244,13 +2242,15 @@ void Qmgr::timerHandlingLab(Signal* signal)
|
|||||||
checkStartInterface(signal);
|
checkStartInterface(signal);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cactivateApiCheck != 0) {
|
if (hb_api_timer.check(TcurrentTime))
|
||||||
jam();
|
{
|
||||||
if (hb_api_timer.check(TcurrentTime)) {
|
|
||||||
jam();
|
jam();
|
||||||
hb_api_timer.reset();
|
hb_api_timer.reset();
|
||||||
apiHbHandlingLab(signal);
|
apiHbHandlingLab(signal);
|
||||||
}//if
|
}
|
||||||
|
|
||||||
|
if (cactivateApiCheck != 0) {
|
||||||
|
jam();
|
||||||
if (clatestTransactionCheck == 0) {
|
if (clatestTransactionCheck == 0) {
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
// Initialise the Transaction check timer.
|
// Initialise the Transaction check timer.
|
||||||
@@ -2367,18 +2367,21 @@ void Qmgr::apiHbHandlingLab(Signal* signal)
|
|||||||
if(type == NodeInfo::INVALID)
|
if(type == NodeInfo::INVALID)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (TnodePtr.p->phase == ZAPI_ACTIVE){
|
if (c_connectedNodes.get(nodeId))
|
||||||
|
{
|
||||||
jam();
|
jam();
|
||||||
setNodeInfo(TnodePtr.i).m_heartbeat_cnt++;
|
setNodeInfo(TnodePtr.i).m_heartbeat_cnt++;
|
||||||
|
|
||||||
if(getNodeInfo(TnodePtr.i).m_heartbeat_cnt > 2){
|
if(getNodeInfo(TnodePtr.i).m_heartbeat_cnt > 2)
|
||||||
|
{
|
||||||
signal->theData[0] = NDB_LE_MissedHeartbeat;
|
signal->theData[0] = NDB_LE_MissedHeartbeat;
|
||||||
signal->theData[1] = nodeId;
|
signal->theData[1] = nodeId;
|
||||||
signal->theData[2] = getNodeInfo(TnodePtr.i).m_heartbeat_cnt - 1;
|
signal->theData[2] = getNodeInfo(TnodePtr.i).m_heartbeat_cnt - 1;
|
||||||
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB);
|
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getNodeInfo(TnodePtr.i).m_heartbeat_cnt > 4) {
|
if (getNodeInfo(TnodePtr.i).m_heartbeat_cnt > 4)
|
||||||
|
{
|
||||||
jam();
|
jam();
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
/* THE API NODE HAS NOT SENT ANY HEARTBEAT FOR THREE SECONDS.
|
/* THE API NODE HAS NOT SENT ANY HEARTBEAT FOR THREE SECONDS.
|
||||||
@@ -2391,7 +2394,7 @@ void Qmgr::apiHbHandlingLab(Signal* signal)
|
|||||||
signal->theData[1] = nodeId;
|
signal->theData[1] = nodeId;
|
||||||
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
|
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
|
||||||
|
|
||||||
node_failed(signal, nodeId);
|
api_failed(signal, nodeId);
|
||||||
}//if
|
}//if
|
||||||
}//if
|
}//if
|
||||||
}//for
|
}//for
|
||||||
@@ -2480,26 +2483,6 @@ void Qmgr::sendApiFailReq(Signal* signal, Uint16 failedNodeNo)
|
|||||||
sendSignal(DBTC_REF, GSN_API_FAILREQ, signal, 2, JBA);
|
sendSignal(DBTC_REF, GSN_API_FAILREQ, signal, 2, JBA);
|
||||||
sendSignal(DBDICT_REF, GSN_API_FAILREQ, signal, 2, JBA);
|
sendSignal(DBDICT_REF, GSN_API_FAILREQ, signal, 2, JBA);
|
||||||
sendSignal(SUMA_REF, GSN_API_FAILREQ, signal, 2, JBA);
|
sendSignal(SUMA_REF, GSN_API_FAILREQ, signal, 2, JBA);
|
||||||
|
|
||||||
/**-------------------------------------------------------------------------
|
|
||||||
* THE OTHER NODE WAS AN API NODE. THE COMMUNICATION LINK IS ALREADY
|
|
||||||
* BROKEN AND THUS NO ACTION IS NEEDED TO BREAK THE CONNECTION.
|
|
||||||
* WE ONLY NEED TO SET PARAMETERS TO ENABLE A NEW CONNECTION IN A FEW
|
|
||||||
* SECONDS.
|
|
||||||
*-------------------------------------------------------------------------*/
|
|
||||||
setNodeInfo(failedNodePtr.i).m_heartbeat_cnt= 0;
|
|
||||||
setNodeInfo(failedNodePtr.i).m_version = 0;
|
|
||||||
recompute_version_info(getNodeInfo(failedNodePtr.i).m_type);
|
|
||||||
|
|
||||||
CloseComReqConf * const closeCom = (CloseComReqConf *)&signal->theData[0];
|
|
||||||
|
|
||||||
closeCom->xxxBlockRef = reference();
|
|
||||||
closeCom->failNo = 0;
|
|
||||||
closeCom->noOfNodes = 1;
|
|
||||||
NodeBitmask::clear(closeCom->theNodes);
|
|
||||||
NodeBitmask::set(closeCom->theNodes, failedNodePtr.i);
|
|
||||||
sendSignal(CMVMI_REF, GSN_CLOSE_COMREQ, signal,
|
|
||||||
CloseComReqConf::SignalLength, JBA);
|
|
||||||
}//Qmgr::sendApiFailReq()
|
}//Qmgr::sendApiFailReq()
|
||||||
|
|
||||||
void Qmgr::execAPI_FAILREQ(Signal* signal)
|
void Qmgr::execAPI_FAILREQ(Signal* signal)
|
||||||
@@ -2512,20 +2495,7 @@ void Qmgr::execAPI_FAILREQ(Signal* signal)
|
|||||||
|
|
||||||
ndbrequire(getNodeInfo(failedNodePtr.i).getType() != NodeInfo::DB);
|
ndbrequire(getNodeInfo(failedNodePtr.i).getType() != NodeInfo::DB);
|
||||||
|
|
||||||
// ignore if api not active
|
api_failed(signal, signal->theData[0]);
|
||||||
if (failedNodePtr.p->phase != ZAPI_ACTIVE)
|
|
||||||
{
|
|
||||||
jam();
|
|
||||||
// But send to SUMA anyway...
|
|
||||||
sendSignal(SUMA_REF, GSN_API_FAILREQ, signal, 2, JBA);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
signal->theData[0] = NDB_LE_Disconnected;
|
|
||||||
signal->theData[1] = failedNodePtr.i;
|
|
||||||
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
|
|
||||||
|
|
||||||
node_failed(signal, failedNodePtr.i);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Qmgr::execAPI_FAILCONF(Signal* signal)
|
void Qmgr::execAPI_FAILCONF(Signal* signal)
|
||||||
@@ -2649,6 +2619,13 @@ void Qmgr::execDISCONNECT_REP(Signal* signal)
|
|||||||
ndbrequire(false);
|
ndbrequire(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getNodeInfo(nodeId).getType() != NodeInfo::DB)
|
||||||
|
{
|
||||||
|
jam();
|
||||||
|
api_failed(signal, nodeId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch(nodePtr.p->phase){
|
switch(nodePtr.p->phase){
|
||||||
case ZRUNNING:
|
case ZRUNNING:
|
||||||
jam();
|
jam();
|
||||||
@@ -2685,8 +2662,8 @@ void Qmgr::node_failed(Signal* signal, Uint16 aFailedNode)
|
|||||||
failedNodePtr.i = aFailedNode;
|
failedNodePtr.i = aFailedNode;
|
||||||
ptrCheckGuard(failedNodePtr, MAX_NODES, nodeRec);
|
ptrCheckGuard(failedNodePtr, MAX_NODES, nodeRec);
|
||||||
|
|
||||||
if (getNodeInfo(failedNodePtr.i).getType() == NodeInfo::DB){
|
ndbrequire(getNodeInfo(failedNodePtr.i).getType() == NodeInfo::DB);
|
||||||
jam();
|
|
||||||
/**---------------------------------------------------------------------
|
/**---------------------------------------------------------------------
|
||||||
* THE OTHER NODE IS AN NDB NODE, WE HANDLE IT AS IF A HEARTBEAT
|
* THE OTHER NODE IS AN NDB NODE, WE HANDLE IT AS IF A HEARTBEAT
|
||||||
* FAILURE WAS DISCOVERED.
|
* FAILURE WAS DISCOVERED.
|
||||||
@@ -2724,27 +2701,70 @@ void Qmgr::node_failed(Signal* signal, Uint16 aFailedNode)
|
|||||||
CloseComReqConf::SignalLength, JBA);
|
CloseComReqConf::SignalLength, JBA);
|
||||||
}//if
|
}//if
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Qmgr::api_failed(Signal* signal, Uint32 nodeId)
|
||||||
|
{
|
||||||
|
NodeRecPtr failedNodePtr;
|
||||||
|
/**------------------------------------------------------------------------
|
||||||
|
* A COMMUNICATION LINK HAS BEEN DISCONNECTED. WE MUST TAKE SOME ACTION
|
||||||
|
* DUE TO THIS.
|
||||||
|
*-----------------------------------------------------------------------*/
|
||||||
|
failedNodePtr.i = nodeId;
|
||||||
|
ptrCheckGuard(failedNodePtr, MAX_NODES, nodeRec);
|
||||||
|
|
||||||
|
if (failedNodePtr.p->phase == ZFAIL_CLOSING)
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* API code
|
* Failure handling already in progress
|
||||||
*/
|
*/
|
||||||
jam();
|
jam();
|
||||||
if (failedNodePtr.p->phase != ZFAIL_CLOSING){
|
|
||||||
jam();
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
// The API was active and has now failed. We need to initiate API failure
|
|
||||||
// handling. If the API had already failed then we can ignore this
|
|
||||||
// discovery.
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
failedNodePtr.p->phase = ZFAIL_CLOSING;
|
|
||||||
|
|
||||||
sendApiFailReq(signal, aFailedNode);
|
|
||||||
arbitRec.code = ArbitCode::ApiFail;
|
|
||||||
handleArbitApiFail(signal, aFailedNode);
|
|
||||||
}//if
|
|
||||||
return;
|
return;
|
||||||
}//Qmgr::node_failed()
|
}
|
||||||
|
|
||||||
|
if (failedNodePtr.p->phase == ZAPI_ACTIVE)
|
||||||
|
{
|
||||||
|
jam();
|
||||||
|
sendApiFailReq(signal, nodeId);
|
||||||
|
arbitRec.code = ArbitCode::ApiFail;
|
||||||
|
handleArbitApiFail(signal, nodeId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Always inform SUMA
|
||||||
|
*/
|
||||||
|
jam();
|
||||||
|
signal->theData[0] = nodeId;
|
||||||
|
signal->theData[1] = QMGR_REF;
|
||||||
|
sendSignal(SUMA_REF, GSN_API_FAILREQ, signal, 2, JBA);
|
||||||
|
failedNodePtr.p->failState = NORMAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
failedNodePtr.p->phase = ZFAIL_CLOSING;
|
||||||
|
setNodeInfo(failedNodePtr.i).m_heartbeat_cnt= 0;
|
||||||
|
setNodeInfo(failedNodePtr.i).m_version = 0;
|
||||||
|
recompute_version_info(getNodeInfo(failedNodePtr.i).m_type);
|
||||||
|
|
||||||
|
CloseComReqConf * const closeCom = (CloseComReqConf *)&signal->theData[0];
|
||||||
|
closeCom->xxxBlockRef = reference();
|
||||||
|
closeCom->failNo = 0;
|
||||||
|
closeCom->noOfNodes = 1;
|
||||||
|
NodeBitmask::clear(closeCom->theNodes);
|
||||||
|
NodeBitmask::set(closeCom->theNodes, failedNodePtr.i);
|
||||||
|
sendSignal(CMVMI_REF, GSN_CLOSE_COMREQ, signal,
|
||||||
|
CloseComReqConf::SignalLength, JBA);
|
||||||
|
|
||||||
|
if (getNodeInfo(failedNodePtr.i).getType() == NodeInfo::MGM)
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Allow MGM do reconnect "directly"
|
||||||
|
*/
|
||||||
|
jam();
|
||||||
|
setNodeInfo(failedNodePtr.i).m_heartbeat_cnt = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**--------------------------------------------------------------------------
|
/**--------------------------------------------------------------------------
|
||||||
* AN API NODE IS REGISTERING. IF FOR THE FIRST TIME WE WILL ENABLE
|
* AN API NODE IS REGISTERING. IF FOR THE FIRST TIME WE WILL ENABLE
|
||||||
@@ -4963,7 +4983,6 @@ Qmgr::execDUMP_STATE_ORD(Signal* signal)
|
|||||||
c_start.m_president_candidate_gci);
|
c_start.m_president_candidate_gci);
|
||||||
infoEvent("ctoStatus = %d\n", ctoStatus);
|
infoEvent("ctoStatus = %d\n", ctoStatus);
|
||||||
for(Uint32 i = 1; i<MAX_NDB_NODES; i++){
|
for(Uint32 i = 1; i<MAX_NDB_NODES; i++){
|
||||||
if(getNodeInfo(i).getType() == NodeInfo::DB){
|
|
||||||
NodeRecPtr nodePtr;
|
NodeRecPtr nodePtr;
|
||||||
nodePtr.i = i;
|
nodePtr.i = i;
|
||||||
ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRec);
|
ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRec);
|
||||||
@@ -4997,9 +5016,6 @@ Qmgr::execDUMP_STATE_ORD(Signal* signal)
|
|||||||
infoEvent(buf);
|
infoEvent(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
|
||||||
;
|
|
||||||
}//switch
|
|
||||||
|
|
||||||
#ifdef ERROR_INSERT
|
#ifdef ERROR_INSERT
|
||||||
if (signal->theData[0] == 935 && signal->getLength() == 2)
|
if (signal->theData[0] == 935 && signal->getLength() == 2)
|
||||||
|
|||||||
@@ -119,7 +119,11 @@ operator<<(NdbOut& out, const LogLevel & ll)
|
|||||||
void
|
void
|
||||||
MgmtSrvr::logLevelThreadRun()
|
MgmtSrvr::logLevelThreadRun()
|
||||||
{
|
{
|
||||||
while (!_isStopThread) {
|
while (!_isStopThread)
|
||||||
|
{
|
||||||
|
Vector<NodeId> failed_started_nodes;
|
||||||
|
Vector<EventSubscribeReq> failed_log_level_requests;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle started nodes
|
* Handle started nodes
|
||||||
*/
|
*/
|
||||||
@@ -145,13 +149,14 @@ MgmtSrvr::logLevelThreadRun()
|
|||||||
|
|
||||||
if (setEventReportingLevelImpl(node, req))
|
if (setEventReportingLevelImpl(node, req))
|
||||||
{
|
{
|
||||||
ndbout_c("setEventReportingLevelImpl(%d): failed", node);
|
failed_started_nodes.push_back(node);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
SetLogLevelOrd ord;
|
SetLogLevelOrd ord;
|
||||||
ord = m_nodeLogLevel[node];
|
ord = m_nodeLogLevel[node];
|
||||||
setNodeLogLevelImpl(node, ord);
|
setNodeLogLevelImpl(node, ord);
|
||||||
|
}
|
||||||
m_started_nodes.lock();
|
m_started_nodes.lock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -169,14 +174,17 @@ MgmtSrvr::logLevelThreadRun()
|
|||||||
req.blockRef = _ownReference;
|
req.blockRef = _ownReference;
|
||||||
if (setEventReportingLevelImpl(0, req))
|
if (setEventReportingLevelImpl(0, req))
|
||||||
{
|
{
|
||||||
ndbout_c("setEventReportingLevelImpl: failed 2!");
|
failed_log_level_requests.push_back(req);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetLogLevelOrd ord;
|
SetLogLevelOrd ord;
|
||||||
ord = req;
|
ord = req;
|
||||||
setNodeLogLevelImpl(req.blockRef, ord);
|
if (setNodeLogLevelImpl(req.blockRef, ord))
|
||||||
|
{
|
||||||
|
failed_log_level_requests.push_back(req);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
m_log_level_requests.lock();
|
m_log_level_requests.lock();
|
||||||
}
|
}
|
||||||
@@ -185,7 +193,28 @@ MgmtSrvr::logLevelThreadRun()
|
|||||||
if(!ERROR_INSERTED(10000))
|
if(!ERROR_INSERTED(10000))
|
||||||
m_event_listner.check_listeners();
|
m_event_listner.check_listeners();
|
||||||
|
|
||||||
NdbSleep_MilliSleep(_logLevelThreadSleep);
|
Uint32 sleeptime = _logLevelThreadSleep;
|
||||||
|
if (failed_started_nodes.size())
|
||||||
|
{
|
||||||
|
m_started_nodes.lock();
|
||||||
|
for (Uint32 i = 0; i<failed_started_nodes.size(); i++)
|
||||||
|
m_started_nodes.push_back(failed_started_nodes[i], false);
|
||||||
|
m_started_nodes.unlock();
|
||||||
|
failed_started_nodes.clear();
|
||||||
|
sleeptime = 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (failed_log_level_requests.size())
|
||||||
|
{
|
||||||
|
m_log_level_requests.lock();
|
||||||
|
for (Uint32 i = 0; i<failed_log_level_requests.size(); i++)
|
||||||
|
m_log_level_requests.push_back(failed_log_level_requests[i], false);
|
||||||
|
m_log_level_requests.unlock();
|
||||||
|
failed_log_level_requests.clear();
|
||||||
|
sleeptime = 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
NdbSleep_MilliSleep(sleeptime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1535,7 +1564,6 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId_arg,
|
|||||||
{
|
{
|
||||||
SignalSender ss(theFacade);
|
SignalSender ss(theFacade);
|
||||||
NdbNodeBitmask nodes;
|
NdbNodeBitmask nodes;
|
||||||
int retries = 30;
|
|
||||||
nodes.clear();
|
nodes.clear();
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
@@ -1572,19 +1600,9 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId_arg,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// api_reg_conf not recevied yet, need to retry
|
// api_reg_conf not recevied yet, need to retry
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (nodeId <= max)
|
|
||||||
{
|
|
||||||
if (--retries)
|
|
||||||
{
|
|
||||||
ss.unlock();
|
|
||||||
NdbSleep_MilliSleep(100);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
return SEND_OR_RECEIVE_FAILED;
|
return SEND_OR_RECEIVE_FAILED;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (nodeId_arg == 0)
|
if (nodeId_arg == 0)
|
||||||
{
|
{
|
||||||
@@ -1607,6 +1625,10 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId_arg,
|
|||||||
continue; // node is not connected, skip
|
continue; // node is not connected, skip
|
||||||
if (ss.sendSignal(nodeId, &ssig) == SEND_OK)
|
if (ss.sendSignal(nodeId, &ssig) == SEND_OK)
|
||||||
nodes.set(nodeId);
|
nodes.set(nodeId);
|
||||||
|
else if (max == nodeId)
|
||||||
|
{
|
||||||
|
return SEND_OR_RECEIVE_FAILED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2988,8 +3010,8 @@ int MgmtSrvr::connect_to_self(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template class Vector<unsigned short>;
|
||||||
|
|
||||||
template class MutexVector<unsigned short>;
|
template class MutexVector<unsigned short>;
|
||||||
template class MutexVector<Ndb_mgmd_event_service::Event_listener>;
|
template class MutexVector<Ndb_mgmd_event_service::Event_listener>;
|
||||||
|
template class Vector<EventSubscribeReq>;
|
||||||
template class MutexVector<EventSubscribeReq>;
|
template class MutexVector<EventSubscribeReq>;
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ ErrorBundle ErrorCodes[] = {
|
|||||||
{ 219, DMEC, TR, "219" },
|
{ 219, DMEC, TR, "219" },
|
||||||
{ 233, DMEC, TR,
|
{ 233, DMEC, TR,
|
||||||
"Out of operation records in transaction coordinator (increase MaxNoOfConcurrentOperations)" },
|
"Out of operation records in transaction coordinator (increase MaxNoOfConcurrentOperations)" },
|
||||||
{ 275, DMEC, TR, "275" },
|
{ 275, DMEC, TR, "Out of transaction records for complete phase (increase MaxNoOfConcurrentTransactions)" },
|
||||||
{ 279, DMEC, TR, "Out of transaction markers in transaction coordinator" },
|
{ 279, DMEC, TR, "Out of transaction markers in transaction coordinator" },
|
||||||
{ 414, DMEC, TR, "414" },
|
{ 414, DMEC, TR, "414" },
|
||||||
{ 418, DMEC, TR, "Out of transaction buffers in LQH" },
|
{ 418, DMEC, TR, "Out of transaction buffers in LQH" },
|
||||||
|
|||||||
Reference in New Issue
Block a user