Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4e23f975
Commit
4e23f975
authored
Jul 07, 2006
by
konstantin@bodhi.netgear
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into bodhi.netgear:/opt/local/work/mysql-5.1-runtime-merge
parents
f22a50a9
5e3861cb
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
71 additions
and
61 deletions
+71
-61
mysql-test/include/ndb_default_cluster.inc
mysql-test/include/ndb_default_cluster.inc
+1
-1
mysql-test/r/ndb_default_cluster.require
mysql-test/r/ndb_default_cluster.require
+1
-1
mysql-test/r/ndb_restore.result
mysql-test/r/ndb_restore.result
+15
-22
mysql-test/t/ndb_dd_backuprestore.test
mysql-test/t/ndb_dd_backuprestore.test
+2
-0
mysql-test/t/ndb_restore.test
mysql-test/t/ndb_restore.test
+19
-27
mysql-test/t/rpl_ndb_dd_advance.test
mysql-test/t/rpl_ndb_dd_advance.test
+2
-0
mysql-test/t/rpl_ndb_sync.test
mysql-test/t/rpl_ndb_sync.test
+2
-0
storage/ndb/tools/restore/consumer_restore.cpp
storage/ndb/tools/restore/consumer_restore.cpp
+29
-10
No files found.
mysql-test/include/ndb_default_cluster.inc
View file @
4e23f975
--
require
r
/
ndb_default_cluster
.
require
--
require
r
/
ndb_default_cluster
.
require
disable_query_log
;
disable_query_log
;
show
status
like
"Ndb_con
nected
_host"
;
show
status
like
"Ndb_con
fig_from
_host"
;
enable_query_log
;
enable_query_log
;
mysql-test/r/ndb_default_cluster.require
View file @
4e23f975
Variable_name Value
Variable_name Value
Ndb_con
nected
_host localhost
Ndb_con
fig_from
_host localhost
mysql-test/r/ndb_restore.result
View file @
4e23f975
use test;
use test;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9
,t10
;
drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c
,t10_c
;
CREATE TABLE `t1_c` (
CREATE TABLE `t1_c` (
`capgoaledatta` smallint(5) unsigned NOT NULL auto_increment,
`capgoaledatta` smallint(5) unsigned NOT NULL auto_increment,
`goaledatta` char(2) NOT NULL default '',
`goaledatta` char(2) NOT NULL default '',
...
@@ -116,6 +116,8 @@ CREATE TABLE `t9_c` (
...
@@ -116,6 +116,8 @@ CREATE TABLE `t9_c` (
PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`)
PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3);
INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3);
CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
INSERT INTO t10_c VALUES (1),(2),(3);
create table t1 engine=myisam as select * from t1_c;
create table t1 engine=myisam as select * from t1_c;
create table t2 engine=myisam as select * from t2_c;
create table t2 engine=myisam as select * from t2_c;
create table t3 engine=myisam as select * from t3_c;
create table t3 engine=myisam as select * from t3_c;
...
@@ -125,6 +127,7 @@ create table t6 engine=myisam as select * from t6_c;
...
@@ -125,6 +127,7 @@ create table t6 engine=myisam as select * from t6_c;
create table t7 engine=myisam as select * from t7_c;
create table t7 engine=myisam as select * from t7_c;
create table t8 engine=myisam as select * from t8_c;
create table t8 engine=myisam as select * from t8_c;
create table t9 engine=myisam as select * from t9_c;
create table t9 engine=myisam as select * from t9_c;
create table t10 engine=myisam as select * from t10_c;
CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP;
CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP;
DELETE FROM test.backup_info;
DELETE FROM test.backup_info;
LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
...
@@ -132,7 +135,7 @@ SELECT @the_backup_id:=backup_id FROM test.backup_info;
...
@@ -132,7 +135,7 @@ SELECT @the_backup_id:=backup_id FROM test.backup_info;
@the_backup_id:=backup_id
@the_backup_id:=backup_id
<the_backup_id>
<the_backup_id>
DROP TABLE test.backup_info;
DROP TABLE test.backup_info;
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c
,t10_c
;
select count(*) from t1;
select count(*) from t1;
count(*)
count(*)
5
5
...
@@ -232,20 +235,11 @@ from (select * from t9 union
...
@@ -232,20 +235,11 @@ from (select * from t9 union
select * from t9_c) a;
select * from t9_c) a;
count(*)
count(*)
3
3
ALTER TABLE t1_c
select * from t10_c order by a;
PARTITION BY RANGE (`capgoaledatta`)
a
(PARTITION p0 VALUES LESS THAN MAXVALUE);
1
ALTER TABLE t2_c
2
PARTITION BY LIST(`capgotod`)
3
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6));
ALTER TABLE t3_c
PARTITION BY HASH (`CapGoaledatta`);
ALTER TABLE t5_c
PARTITION BY HASH (`capfa`)
PARTITIONS 4;
ALTER TABLE t6_c
PARTITION BY LINEAR HASH (`relatta`)
PARTITIONS 4;
ALTER TABLE t7_c
ALTER TABLE t7_c
PARTITION BY LINEAR KEY (`dardtestard`);
PARTITION BY LINEAR KEY (`dardtestard`);
CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP;
CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP;
...
@@ -255,7 +249,7 @@ SELECT @the_backup_id:=backup_id FROM test.backup_info;
...
@@ -255,7 +249,7 @@ SELECT @the_backup_id:=backup_id FROM test.backup_info;
@the_backup_id:=backup_id
@the_backup_id:=backup_id
<the_backup_id>
<the_backup_id>
DROP TABLE test.backup_info;
DROP TABLE test.backup_info;
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c
,t10_c
;
select count(*) from t1;
select count(*) from t1;
count(*)
count(*)
5
5
...
@@ -355,7 +349,7 @@ from (select * from t9 union
...
@@ -355,7 +349,7 @@ from (select * from t9 union
select * from t9_c) a;
select * from t9_c) a;
count(*)
count(*)
3
3
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c
,t10_c
;
select count(*) from t1;
select count(*) from t1;
count(*)
count(*)
5
5
...
@@ -455,7 +449,7 @@ from (select * from t9 union
...
@@ -455,7 +449,7 @@ from (select * from t9 union
select * from t9_c) a;
select * from t9_c) a;
count(*)
count(*)
3
3
drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c
,t10_c
;
CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP;
CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP;
DELETE FROM test.backup_info;
DELETE FROM test.backup_info;
LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
...
@@ -463,7 +457,6 @@ SELECT @the_backup_id:=backup_id FROM test.backup_info;
...
@@ -463,7 +457,6 @@ SELECT @the_backup_id:=backup_id FROM test.backup_info;
@the_backup_id:=backup_id
@the_backup_id:=backup_id
<the_backup_id>
<the_backup_id>
DROP TABLE test.backup_info;
DROP TABLE test.backup_info;
Create table test/def/t2_c failed: Translate frm error
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t2_c;
drop table if exists t2_c;
520093696,<the_backup_id>
520093696,<the_backup_id>
mysql-test/t/ndb_dd_backuprestore.test
View file @
4e23f975
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
########################################
########################################
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
ndb_default_cluster
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_query_log
--
disable_query_log
set
new
=
on
;
set
new
=
on
;
...
...
mysql-test/t/ndb_restore.test
View file @
4e23f975
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
--
disable_warnings
--
disable_warnings
use
test
;
use
test
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
,
t10
;
drop
table
if
exists
t1_c
,
t2_c
,
t3_c
,
t4_c
,
t5_c
,
t6_c
,
t7_c
,
t8_c
,
t9_c
;
drop
table
if
exists
t1_c
,
t2_c
,
t3_c
,
t4_c
,
t5_c
,
t6_c
,
t7_c
,
t8_c
,
t9_c
,
t10_c
;
--
enable_warnings
--
enable_warnings
CREATE
TABLE
`t1_c`
(
CREATE
TABLE
`t1_c`
(
...
@@ -132,6 +132,13 @@ CREATE TABLE `t9_c` (
...
@@ -132,6 +132,13 @@ CREATE TABLE `t9_c` (
)
ENGINE
=
ndbcluster
DEFAULT
CHARSET
=
latin1
;
)
ENGINE
=
ndbcluster
DEFAULT
CHARSET
=
latin1
;
INSERT
INTO
`t9_c`
VALUES
(
'3g4jh8gar2t'
,
'joe'
,
'q3.net'
,
'elredun.com'
,
'q3.net'
,
'436643316120'
,
'436643316939'
,
'91341234568968'
,
'695595699'
,
'1.1.1.1'
,
'2.2.6.2'
,
'3'
,
'86989'
,
'34'
,
'x'
,
'x'
,
'2012-03-12 18:35:04'
,
'2012-12-05 12:35:04'
,
3123123
,
9569
,
6565
,
1
),(
'4tt45345235'
,
'pap'
,
'q3plus.qt'
,
'q3plus.qt'
,
'q3.net'
,
'436643316120'
,
'436643316939'
,
'8956234534568968'
,
'5254595969'
,
'1.1.1.1'
,
'8.6.2.2'
,
'4'
,
'86989'
,
'34'
,
'x'
,
'x'
,
'2012-03-12 12:55:34'
,
'2012-12-05 11:20:04'
,
3223433
,
3369
,
9565
,
2
),(
'4545435545'
,
'john'
,
'q3.net'
,
'q3.net'
,
'acne.li'
,
'436643316120'
,
'436643316939'
,
'45345234568968'
,
'995696699'
,
'1.1.1.1'
,
'2.9.9.2'
,
'2'
,
'86998'
,
'34'
,
'x'
,
'x'
,
'2012-03-12 11:35:03'
,
'2012-12-05 08:50:04'
,
8823123
,
169
,
3565
,
3
);
INSERT
INTO
`t9_c`
VALUES
(
'3g4jh8gar2t'
,
'joe'
,
'q3.net'
,
'elredun.com'
,
'q3.net'
,
'436643316120'
,
'436643316939'
,
'91341234568968'
,
'695595699'
,
'1.1.1.1'
,
'2.2.6.2'
,
'3'
,
'86989'
,
'34'
,
'x'
,
'x'
,
'2012-03-12 18:35:04'
,
'2012-12-05 12:35:04'
,
3123123
,
9569
,
6565
,
1
),(
'4tt45345235'
,
'pap'
,
'q3plus.qt'
,
'q3plus.qt'
,
'q3.net'
,
'436643316120'
,
'436643316939'
,
'8956234534568968'
,
'5254595969'
,
'1.1.1.1'
,
'8.6.2.2'
,
'4'
,
'86989'
,
'34'
,
'x'
,
'x'
,
'2012-03-12 12:55:34'
,
'2012-12-05 11:20:04'
,
3223433
,
3369
,
9565
,
2
),(
'4545435545'
,
'john'
,
'q3.net'
,
'q3.net'
,
'acne.li'
,
'436643316120'
,
'436643316939'
,
'45345234568968'
,
'995696699'
,
'1.1.1.1'
,
'2.9.9.2'
,
'2'
,
'86998'
,
'34'
,
'x'
,
'x'
,
'2012-03-12 11:35:03'
,
'2012-12-05 08:50:04'
,
8823123
,
169
,
3565
,
3
);
# Bug #20820
# auto inc table not handled correctly when restored from cluster backup
# - before fix ndb_restore would not set auto inc value correct,
# seen by select below
CREATE
TABLE
t10_c
(
a
INT
AUTO_INCREMENT
KEY
)
ENGINE
=
ndbcluster
DEFAULT
CHARSET
=
latin1
;
INSERT
INTO
t10_c
VALUES
(
1
),(
2
),(
3
);
create
table
t1
engine
=
myisam
as
select
*
from
t1_c
;
create
table
t1
engine
=
myisam
as
select
*
from
t1_c
;
create
table
t2
engine
=
myisam
as
select
*
from
t2_c
;
create
table
t2
engine
=
myisam
as
select
*
from
t2_c
;
create
table
t3
engine
=
myisam
as
select
*
from
t3_c
;
create
table
t3
engine
=
myisam
as
select
*
from
t3_c
;
...
@@ -141,10 +148,11 @@ create table t6 engine=myisam as select * from t6_c;
...
@@ -141,10 +148,11 @@ create table t6 engine=myisam as select * from t6_c;
create
table
t7
engine
=
myisam
as
select
*
from
t7_c
;
create
table
t7
engine
=
myisam
as
select
*
from
t7_c
;
create
table
t8
engine
=
myisam
as
select
*
from
t8_c
;
create
table
t8
engine
=
myisam
as
select
*
from
t8_c
;
create
table
t9
engine
=
myisam
as
select
*
from
t9_c
;
create
table
t9
engine
=
myisam
as
select
*
from
t9_c
;
create
table
t10
engine
=
myisam
as
select
*
from
t10_c
;
--
source
include
/
ndb_backup
.
inc
--
source
include
/
ndb_backup
.
inc
drop
table
t1_c
,
t2_c
,
t3_c
,
t4_c
,
t5_c
,
t6_c
,
t7_c
,
t8_c
,
t9_c
;
drop
table
t1_c
,
t2_c
,
t3_c
,
t4_c
,
t5_c
,
t6_c
,
t7_c
,
t8_c
,
t9_c
,
t10_c
;
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
-
b
$the_backup_id
-
n
1
-
m
-
r
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
-
b
$the_backup_id
-
n
1
-
m
-
r
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
-
b
$the_backup_id
-
n
2
-
r
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
-
b
$the_backup_id
-
n
2
-
r
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
...
@@ -205,33 +213,17 @@ select count(*)
...
@@ -205,33 +213,17 @@ select count(*)
from
(
select
*
from
t9
union
from
(
select
*
from
t9
union
select
*
from
t9_c
)
a
;
select
*
from
t9_c
)
a
;
# Bug #20820 cont'd
select
*
from
t10_c
order
by
a
;
#
#
# Try Partitioned tables as well
# Try Partitioned tables as well
#
#
ALTER
TABLE
t1_c
PARTITION
BY
RANGE
(
`capgoaledatta`
)
(
PARTITION
p0
VALUES
LESS
THAN
MAXVALUE
);
ALTER
TABLE
t2_c
PARTITION
BY
LIST
(
`capgotod`
)
(
PARTITION
p0
VALUES
IN
(
0
,
1
,
2
,
3
,
4
,
5
,
6
));
ALTER
TABLE
t3_c
PARTITION
BY
HASH
(
`CapGoaledatta`
);
ALTER
TABLE
t5_c
PARTITION
BY
HASH
(
`capfa`
)
PARTITIONS
4
;
ALTER
TABLE
t6_c
PARTITION
BY
LINEAR
HASH
(
`relatta`
)
PARTITIONS
4
;
ALTER
TABLE
t7_c
ALTER
TABLE
t7_c
PARTITION
BY
LINEAR
KEY
(
`dardtestard`
);
PARTITION
BY
LINEAR
KEY
(
`dardtestard`
);
--
source
include
/
ndb_backup
.
inc
--
source
include
/
ndb_backup
.
inc
drop
table
t1_c
,
t2_c
,
t3_c
,
t4_c
,
t5_c
,
t6_c
,
t7_c
,
t8_c
,
t9_c
;
drop
table
t1_c
,
t2_c
,
t3_c
,
t4_c
,
t5_c
,
t6_c
,
t7_c
,
t8_c
,
t9_c
,
t10_c
;
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
-
b
$the_backup_id
-
n
1
-
m
-
r
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
-
b
$the_backup_id
-
n
1
-
m
-
r
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
-
b
$the_backup_id
-
n
2
-
r
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
-
b
$the_backup_id
-
n
2
-
r
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
...
@@ -289,7 +281,7 @@ select count(*)
...
@@ -289,7 +281,7 @@ select count(*)
from
(
select
*
from
t9
union
from
(
select
*
from
t9
union
select
*
from
t9_c
)
a
;
select
*
from
t9_c
)
a
;
drop
table
t1_c
,
t2_c
,
t3_c
,
t4_c
,
t5_c
,
t6_c
,
t7_c
,
t8_c
,
t9_c
;
drop
table
t1_c
,
t2_c
,
t3_c
,
t4_c
,
t5_c
,
t6_c
,
t7_c
,
t8_c
,
t9_c
,
t10_c
;
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
-
b
$the_backup_id
-
n
1
-
m
-
r
--
ndb
-
nodegroup_map
'(0,0)'
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
-
b
$the_backup_id
-
n
1
-
m
-
r
--
ndb
-
nodegroup_map
'(0,0)'
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
-
b
$the_backup_id
-
n
2
-
r
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
-
b
$the_backup_id
-
n
2
-
r
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
...
@@ -353,7 +345,7 @@ select count(*)
...
@@ -353,7 +345,7 @@ select count(*)
# guaranteed to be from t2_c, this since order of tables in backup
# guaranteed to be from t2_c, this since order of tables in backup
# is none deterministic
# is none deterministic
#
#
drop
table
t1_c
,
t3_c
,
t4_c
,
t5_c
,
t6_c
,
t7_c
,
t8_c
,
t9_c
;
drop
table
t1_c
,
t3_c
,
t4_c
,
t5_c
,
t6_c
,
t7_c
,
t8_c
,
t9_c
,
t10_c
;
--
source
include
/
ndb_backup
.
inc
--
source
include
/
ndb_backup
.
inc
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
--
core
=
0
-
b
$the_backup_id
-
n
1
-
m
-
r
--
ndb
-
nodegroup_map
'(0,1)'
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
2
>&
1
|
grep
Translate
||
true
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
--
core
=
0
-
b
$the_backup_id
-
n
1
-
m
-
r
--
ndb
-
nodegroup_map
'(0,1)'
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
2
>&
1
|
grep
Translate
||
true
...
@@ -362,7 +354,7 @@ drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
...
@@ -362,7 +354,7 @@ drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
#
#
--
disable_warnings
--
disable_warnings
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
,
t10
;
drop
table
if
exists
t2_c
;
drop
table
if
exists
t2_c
;
--
enable_warnings
--
enable_warnings
...
@@ -372,4 +364,4 @@ drop table if exists t2_c;
...
@@ -372,4 +364,4 @@ drop table if exists t2_c;
--
exec
$NDB_TOOLS_DIR
/
ndb_select_all
--
no
-
defaults
-
d
sys
-
D
,
SYSTAB_0
|
grep
520093696
,
|
sed
"s/,
$the_backup_id
/,<the_backup_id>/"
--
exec
$NDB_TOOLS_DIR
/
ndb_select_all
--
no
-
defaults
-
d
sys
-
D
,
SYSTAB_0
|
grep
520093696
,
|
sed
"s/,
$the_backup_id
/,<the_backup_id>/"
# End of
4.1 tests
# End of
5.0 tests (4.1 test intermixed to save test time)
mysql-test/t/rpl_ndb_dd_advance.test
View file @
4e23f975
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
#### Include Section ####
#### Include Section ####
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_binlog_format_row
.
inc
--
source
include
/
have_binlog_format_row
.
inc
--
source
include
/
ndb_default_cluster
.
inc
--
source
include
/
not_embedded
.
inc
#--source include/have_ndb_extra.inc
#--source include/have_ndb_extra.inc
--
source
include
/
master
-
slave
.
inc
--
source
include
/
master
-
slave
.
inc
...
...
mysql-test/t/rpl_ndb_sync.test
View file @
4e23f975
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
ndb_default_cluster
.
inc
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_binlog_format_row
.
inc
--
source
include
/
have_binlog_format_row
.
inc
--
source
include
/
master
-
slave
.
inc
--
source
include
/
master
-
slave
.
inc
...
...
storage/ndb/tools/restore/consumer_restore.cpp
View file @
4e23f975
...
@@ -148,17 +148,38 @@ BackupRestore::finalize_table(const TableS & table){
...
@@ -148,17 +148,38 @@ BackupRestore::finalize_table(const TableS & table){
bool
ret
=
true
;
bool
ret
=
true
;
if
(
!
m_restore
&&
!
m_restore_meta
)
if
(
!
m_restore
&&
!
m_restore_meta
)
return
ret
;
return
ret
;
if
(
table
.
have_auto_inc
())
if
(
!
table
.
have_auto_inc
())
{
return
ret
;
Uint64
max_val
=
table
.
get_max_auto_val
();
Uint64
max_val
=
table
.
get_max_auto_val
();
Uint64
auto_val
;
do
{
Uint64
auto_val
=
~
(
Uint64
)
0
;
int
r
=
m_ndb
->
readAutoIncrementValue
(
get_table
(
table
.
m_dictTable
),
auto_val
);
int
r
=
m_ndb
->
readAutoIncrementValue
(
get_table
(
table
.
m_dictTable
),
auto_val
);
if
(
r
==
-
1
&&
m_ndb
->
getNdbError
().
code
!=
626
)
if
(
r
==
-
1
&&
m_ndb
->
getNdbError
().
status
==
NdbError
::
TemporaryError
)
{
NdbSleep_MilliSleep
(
50
);
continue
;
// retry
}
else
if
(
r
==
-
1
&&
m_ndb
->
getNdbError
().
code
!=
626
)
{
ret
=
false
;
ret
=
false
;
else
if
(
r
==
-
1
||
max_val
+
1
>
auto_val
)
ret
=
m_ndb
->
setAutoIncrementValue
(
get_table
(
table
.
m_dictTable
),
max_val
+
1
,
false
)
!=
-
1
;
}
}
return
ret
;
else
if
((
r
==
-
1
&&
m_ndb
->
getNdbError
().
code
==
626
)
||
max_val
+
1
>
auto_val
||
auto_val
==
~
(
Uint64
)
0
)
{
r
=
m_ndb
->
setAutoIncrementValue
(
get_table
(
table
.
m_dictTable
),
max_val
+
1
,
false
);
if
(
r
==
-
1
&&
m_ndb
->
getNdbError
().
status
==
NdbError
::
TemporaryError
)
{
NdbSleep_MilliSleep
(
50
);
continue
;
// retry
}
ret
=
(
r
==
0
);
}
return
(
ret
);
}
while
(
1
);
}
}
...
@@ -792,8 +813,6 @@ BackupRestore::table(const TableS & table){
...
@@ -792,8 +813,6 @@ BackupRestore::table(const TableS & table){
}
}
info
<<
"Successfully restored table event "
<<
event_name
<<
endl
;
info
<<
"Successfully restored table event "
<<
event_name
<<
endl
;
}
}
m_ndb
->
setAutoIncrementValue
(
tab
,
~
(
Uint64
)
0
,
false
);
}
}
const
NdbDictionary
::
Table
*
null
=
0
;
const
NdbDictionary
::
Table
*
null
=
0
;
m_new_tables
.
fill
(
table
.
m_dictTable
->
getTableId
(),
null
);
m_new_tables
.
fill
(
table
.
m_dictTable
->
getTableId
(),
null
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment