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
b1a06e28
Commit
b1a06e28
authored
Feb 16, 2006
by
jmiller@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test updates
parent
3cfcecbc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
20 deletions
+16
-20
mysql-test/include/ndb_backup.inc
mysql-test/include/ndb_backup.inc
+9
-8
mysql-test/include/ndb_restore_master.inc
mysql-test/include/ndb_restore_master.inc
+2
-6
mysql-test/t/ndb_dd_backuprestore.test
mysql-test/t/ndb_dd_backuprestore.test
+5
-6
No files found.
mysql-test/include/ndb_backup.inc
View file @
b1a06e28
...
...
@@ -2,22 +2,23 @@
# By JBM 2006-02-16 So that the code is not repeated #
# in test cases and can be reused. #
######################################################
--
exec
$NDB_MGM
--
no
-
defaults
--
ndb
-
connectstring
=
"localhost:
$NDBCLUSTER_PORT
"
-
e
"star
t backup"
>>
$NDB_TOOLS_OUTPUT
--
exec
$NDB_MGM
--
no
-
defaults
--
ndb
-
connectstring
=
"localhost:
$NDBCLUSTER_PORT
"
-
e
"start backup"
>>
$NDB_TOOLS_OUTPUT
# there is no neat way to find the backupid, this is a hack to find it...
--
exec
$NDB_TOOLS_DIR
/
ndb_select_all
--
ndb
-
connectstring
=
"localhost:
$NDBCLUSTER_PORT
"
-
d
sys
--
delimiter
=
','
SYSTAB_0
|
grep
520093696
>
var
/
tmp
.
dat
--
exec
$NDB_TOOLS_DIR
/
ndb_select_all
--
ndb
-
connectstring
=
"localhost:
$NDBCLUSTER_PORT
"
-
d
sys
--
delimiter
=
','
SYSTAB_0
|
grep
520093696
>
var
/
tmp
.
dat
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
;
LOAD
DATA
INFILE
'../../var/tmp.dat'
INTO
TABLE
test
.
backup_info
FIELDS
TERMINATED
BY
'
,'
;
LOAD
DATA
INFILE
'../../var/tmp.dat'
INTO
TABLE
test
.
backup_info
FIELDS
TERMINATED
BY
'
,'
;
--
replace_column
1
<
the_backup_id
>
SELECT
@
the_backup_id
:=
backup_id
FROM
test
.
backup_info
;
let
the_backup_id
=
`select @the_backup_id`
;
DROP
TABLE
test
.
backup_info
;
mysql-test/include/ndb_restore_master.inc
View file @
b1a06e28
...
...
@@ -3,10 +3,6 @@
# in test cases and can be reused. #
######################################################
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
--
ndb
-
connectstring
=
"localhost:
$NDBCLUS
TER_PORT"
-
p
8
-
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
--
ndb
-
connectstring
=
"localhost:
$NDBCLUSTER_PORT
"
-
p
8
-
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
--
ndb
-
connectstring
=
"localhost:
$NDBCLUS
TER_PORT"
-
p
8
-
b
$the_backup_id
-
n
2
-
r
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
B
ACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
--
exec
$NDB_TOOLS_DIR
/
ndb_restore
--
no
-
defaults
--
ndb
-
connectstring
=
"localhost:
$NDBCLUSTER_PORT
"
-
p
8
-
b
$the_backup_id
-
n
2
-
r
--
print
--
print_meta
$NDB_BACKUP_DIR
/
BACKUP
/
BACKUP
-
$the_backup_id
>>
$NDB_TOOLS_OUTPUT
mysql-test/t/ndb_dd_backuprestore.test
View file @
b1a06e28
...
...
@@ -69,7 +69,7 @@ SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5;
--
echo
****
Test
2
Mixed
Cluster
Test
backup
and
restore
****
CREATE
TABLE
test
.
t2
(
pk1
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
PRIMARY
KEY
,
c2
TEXT
NOT
NULL
,
c3
INT
NOT
NULL
,
c4
BIT
NOT
NULL
)
ENGINE
=
NDB
;
(
pk1
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
PRIMARY
KEY
,
c2
VARCHAR
(
200
)
NOT
NULL
,
c3
INT
NOT
NULL
,
c4
BIT
NOT
NULL
)
ENGINE
=
NDB
;
let
$j
=
500
;
--
disable_query_log
...
...
@@ -118,7 +118,6 @@ SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2;
--
source
include
/
ndb_backup
.
inc
DROP
TABLE
test
.
backup_info
;
DROP
TABLE
test
.
t1
;
DROP
TABLE
test
.
t2
;
DROP
TABLE
test
.
t3
;
...
...
@@ -169,17 +168,17 @@ USE LOGFILE GROUP log_group1
INITIAL_SIZE 12M
ENGINE NDB
;
CREATE
TABLE
test
.
t1
(
pk1
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
,
c2
TEXT
NOT
NULL
,
c3
INT
NOT
NULL
,
c4
BIT
NOT
NULL
,
PRIMARY
KEY
(
pk1
,
c3
))
TABLESPACE
table_space1
STORAGE
DISK
ENGINE
=
NDB
PARTITION
BY
HASH
(
c3
)
PARTITIONS
4
;
CREATE
TABLE
test
.
t1
(
pk1
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
,
c2
VARCHAR
(
150
)
NOT
NULL
,
c3
INT
NOT
NULL
,
c4
BIT
NOT
NULL
,
PRIMARY
KEY
(
pk1
,
c3
))
TABLESPACE
table_space1
STORAGE
DISK
ENGINE
=
NDB
PARTITION
BY
HASH
(
c3
)
PARTITIONS
4
;
CREATE
TABLE
test
.
t4
(
pk1
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
,
c2
TEXT
NOT
NULL
,
c3
INT
NOT
NULL
,
c4
BIT
NOT
NULL
,
PRIMARY
KEY
(
pk1
,
c3
))
ENGINE
=
NDB
PARTITION
BY
HASH
(
c3
)
PARTITIONS
2
;
CREATE
TABLE
test
.
t4
(
pk1
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
,
c2
VARCHAR
(
180
)
NOT
NULL
,
c3
INT
NOT
NULL
,
c4
BIT
NOT
NULL
,
PRIMARY
KEY
(
pk1
,
c3
))
ENGINE
=
NDB
PARTITION
BY
HASH
(
c3
)
PARTITIONS
2
;
CREATE
TABLE
test
.
t2
(
pk1
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
,
c2
TEXT
NOT
NULL
,
c3
INT
NOT
NULL
,
c4
BIT
NOT
NULL
,
PRIMARY
KEY
(
pk1
,
c3
))
TABLESPACE
table_space2
STORAGE
DISK
ENGINE
=
NDB
PARTITION
BY
KEY
(
c3
)
(
PARTITION
p0
ENGINE
=
NDB
,
PARTITION
p1
ENGINE
=
NDB
);
CREATE
TABLE
test
.
t5
(
pk1
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
,
c2
TEXT
NOT
NULL
,
c3
INT
NOT
NULL
,
c4
BIT
NOT
NULL
,
PRIMARY
KEY
(
pk1
,
c3
))
ENGINE
=
NDB
PARTITION
BY
KEY
(
pk1
)
(
PARTITION
p0
ENGINE
=
NDB
,
PARTITION
p1
ENGINE
=
NDB
);
CREATE
TABLE
test
.
t3
(
pk1
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
,
c2
TEXT
NOT
NULL
,
c3
INT
NOT
NULL
,
c4
BIT
NOT
NULL
,
PRIMARY
KEY
(
pk1
,
c3
))
TABLESPACE
table_space2
STORAGE
DISK
ENGINE
=
NDB
PARTITION
BY
RANGE
(
c3
)
PARTITIONS
3
(
PARTITION
x1
VALUES
LESS
THAN
(
105
),
PARTITION
x2
VALUES
LESS
THAN
(
333
),
PARTITION
x3
VALUES
LESS
THAN
(
720
));
CREATE
TABLE
test
.
t3
(
pk1
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
,
c2
VARCHAR
(
202
)
NOT
NULL
,
c3
INT
NOT
NULL
,
c4
BIT
NOT
NULL
,
PRIMARY
KEY
(
pk1
,
c3
))
TABLESPACE
table_space2
STORAGE
DISK
ENGINE
=
NDB
PARTITION
BY
RANGE
(
c3
)
PARTITIONS
3
(
PARTITION
x1
VALUES
LESS
THAN
(
105
),
PARTITION
x2
VALUES
LESS
THAN
(
333
),
PARTITION
x3
VALUES
LESS
THAN
(
720
));
CREATE
TABLE
test
.
t6
(
pk1
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
,
c2
TEXT
NOT
NULL
,
c3
INT
NOT
NULL
,
c4
BIT
NOT
NULL
,
PRIMARY
KEY
(
pk1
,
c3
))
ENGINE
=
NDB
PARTITION
BY
RANGE
(
pk1
)
PARTITIONS
2
(
PARTITION
x1
VALUES
LESS
THAN
(
333
),
PARTITION
x2
VALUES
LESS
THAN
(
720
));
CREATE
TABLE
test
.
t6
(
pk1
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
,
c2
VARCHAR
(
220
)
NOT
NULL
,
c3
INT
NOT
NULL
,
c4
BIT
NOT
NULL
,
PRIMARY
KEY
(
pk1
,
c3
))
ENGINE
=
NDB
PARTITION
BY
RANGE
(
pk1
)
PARTITIONS
2
(
PARTITION
x1
VALUES
LESS
THAN
(
333
),
PARTITION
x2
VALUES
LESS
THAN
(
720
));
SHOW
CREATE
TABLE
test
.
t1
;
...
...
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