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
b6a4e25c
Commit
b6a4e25c
authored
Jun 03, 2010
by
Horst.Hunger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch for trunk after merge from 5.1-bugteam of bug52913.
parent
f7283295
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
446 additions
and
0 deletions
+446
-0
mysql-test/collections/default.experimental
mysql-test/collections/default.experimental
+2
-0
mysql-test/include/mysqlhotcopy.inc
mysql-test/include/mysqlhotcopy.inc
+116
-0
mysql-test/lib/mtr_misc.pl
mysql-test/lib/mtr_misc.pl
+22
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+9
-0
mysql-test/r/mysqlhotcopy_archive.result
mysql-test/r/mysqlhotcopy_archive.result
+118
-0
mysql-test/r/mysqlhotcopy_myisam.result
mysql-test/r/mysqlhotcopy_myisam.result
+164
-0
mysql-test/t/mysqlhotcopy_archive.test
mysql-test/t/mysqlhotcopy_archive.test
+8
-0
mysql-test/t/mysqlhotcopy_myisam.test
mysql-test/t/mysqlhotcopy_myisam.test
+7
-0
No files found.
mysql-test/collections/default.experimental
View file @
b6a4e25c
...
...
@@ -91,3 +91,5 @@ parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experiment
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
main.mysqlhotcopy_myisam # horst: due to bug#54129
main.mysqlhotcopy_archive # horst: due to bug#54129
mysql-test/include/mysqlhotcopy.inc
0 → 100644
View file @
b6a4e25c
# Test of mysqlhotcopy (perl script)
# Author: Horst Hunger
# Created: 2010-05-10
--
source
include
/
not_windows
.
inc
--
source
include
/
not_embedded
.
inc
let
$MYSQLD_DATADIR
=
`SELECT @@datadir`
;
--
disable_warnings
DROP
DATABASE
IF
EXISTS
hotcopy_test
;
--
enable_warnings
CREATE
DATABASE
hotcopy_test
;
USE
hotcopy_test
;
eval
CREATE
TABLE
t1
(
c1
int
,
c2
varchar
(
20
))
ENGINE
=
$engine
;
eval
CREATE
TABLE
t2
(
c1
int
,
c2
varchar
(
20
))
ENGINE
=
$engine
;
eval
CREATE
TABLE
t3
(
c1
int
,
c2
varchar
(
20
))
ENGINE
=
$engine
;
INSERT
INTO
t1
VALUES
(
1
,
'aaaaaaaaaaaaaaaaaaaa'
),(
2
,
'bbbbbbbbbbbbbbbbbbbbbbb'
);
INSERT
INTO
t2
VALUES
(
1
,
'aaaaaaaaaaaaaaaaaaaa'
),(
2
,
'bbbbbbbbbbbbbbbbbbbbbbb'
);
INSERT
INTO
t3
VALUES
(
1
,
'aaaaaaaaaaaaaaaaaaaa'
),(
2
,
'bbbbbbbbbbbbbbbbbbbbbbb'
);
--
replace_result
$MYSQLD_DATADIR
MYSQLD_DATADIR
--
list_files
$MYSQLD_DATADIR
/
hotcopy_test
# backup into another database in the same directory
--
replace_result
$MASTER_MYSOCK
MASTER_MYSOCK
--
exec
$MYSQLHOTCOPY
--
quiet
-
S
$MASTER_MYSOCK
-
u
root
hotcopy_test
hotcopy_save
--
replace_result
$MYSQLD_DATADIR
MYSQLD_DATADIR
--
list_files
$MYSQLD_DATADIR
/
hotcopy_save
USE
hotcopy_save
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
SELECT
*
FROM
t3
;
# restore data into the original database with mysqlhotcopy
if
(
`SELECT engine= 'MyISAM' FROM information_schema.tables WHERE table_name='t1'`
)
{
USE
hotcopy_test
;
DELETE
FROM
t1
;
SELECT
*
FROM
t1
;
--
replace_result
$MASTER_MYSOCK
MASTER_MYSOCK
--
exec
$MYSQLHOTCOPY
--
quiet
--
addtodest
-
S
$MASTER_MYSOCK
-
u
root
hotcopy_save
hotcopy_test
USE
hotcopy_save
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
SELECT
*
FROM
t3
;
}
USE
hotcopy_test
;
DROP
TABLE
t2
;
--
replace_result
$MYSQLD_DATADIR
MYSQLD_DATADIR
--
list_files
$MYSQLD_DATADIR
/
hotcopy_test
--
replace_result
$MASTER_MYSOCK
MASTER_MYSOCK
--
exec
$MYSQLHOTCOPY
--
quiet
--
addtodest
-
S
$MASTER_MYSOCK
-
u
root
hotcopy_save
hotcopy_test
FLUSH
TABLES
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
SELECT
*
FROM
t3
;
# backup of db into a directory
USE
hotcopy_test
;
--
replace_result
$MASTER_MYSOCK
MASTER_MYSOCK
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
$MYSQLHOTCOPY
--
quiet
-
S
$MASTER_MYSOCK
-
u
root
hotcopy_test
$MYSQLTEST_VARDIR
/
tmp
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
list_files
$MYSQLTEST_VARDIR
/
tmp
/
hotcopy_test
#--exec rm -rf $MYSQLTEST_VARDIR/tmp/hotcopy_test
--
remove_files_wildcard
$MYSQLTEST_VARDIR
/
tmp
/
hotcopy_test
*
--
rmdir
$MYSQLTEST_VARDIR
/
tmp
/
hotcopy_test
# backup without full index files
# reproduction of bug#53556, "--list_files" shows MYI files, which is wrong.
DROP
DATABASE
hotcopy_save
;
--
replace_result
$MASTER_MYSOCK
MASTER_MYSOCK
--
exec
$MYSQLHOTCOPY
--
quiet
--
noindices
-
S
$MASTER_MYSOCK
-
u
root
hotcopy_test
hotcopy_save
--
replace_result
$MYSQLD_DATADIR
MYSQLD_DATADIR
--
list_files
$MYSQLD_DATADIR
/
hotcopy_save
# test of option "allowold"
DROP
DATABASE
hotcopy_save
;
--
replace_result
$MASTER_MYSOCK
MASTER_MYSOCK
--
exec
$MYSQLHOTCOPY
--
quiet
-
S
$MASTER_MYSOCK
-
u
root
hotcopy_test
hotcopy_save
--
replace_result
$MYSQLD_DATADIR
MYSQLD_DATADIR
--
list_files
$MYSQLD_DATADIR
/
hotcopy_save
--
replace_result
$MASTER_MYSOCK
MASTER_MYSOCK
--
error
9
,
2304
--
exec
$MYSQLHOTCOPY
--
quiet
-
S
$MASTER_MYSOCK
-
u
root
hotcopy_test
hotcopy_save
--
replace_result
$MASTER_MYSOCK
MASTER_MYSOCK
--
exec
$MYSQLHOTCOPY
--
quiet
--
allowold
-
S
$MASTER_MYSOCK
-
u
root
hotcopy_test
hotcopy_save
--
replace_result
$MYSQLD_DATADIR
MYSQLD_DATADIR
--
list_files
$MYSQLD_DATADIR
/
hotcopy_save
# test of option "keepold"
--
replace_result
$MASTER_MYSOCK
MASTER_MYSOCK
--
exec
$MYSQLHOTCOPY
--
quiet
--
keepold
-
S
$MASTER_MYSOCK
-
u
root
hotcopy_test
hotcopy_save
--
replace_result
$MYSQLD_DATADIR
MYSQLD_DATADIR
--
list_files
$MYSQLD_DATADIR
/
hotcopy_save_old
--
replace_result
$MYSQLD_DATADIR
MYSQLD_DATADIR
--
list_files
$MYSQLD_DATADIR
/
hotcopy_save
# test of option "suffix"
--
replace_result
$MASTER_MYSOCK
MASTER_MYSOCK
--
exec
$MYSQLHOTCOPY
--
quiet
--
suffix
=
_cpy
-
S
$MASTER_MYSOCK
-
u
root
hotcopy_test
--
replace_result
$MYSQLD_DATADIR
MYSQLD_DATADIR
--
list_files
$MYSQLD_DATADIR
/
hotcopy_test_cpy
DROP
DATABASE
hotcopy_test_cpy
;
DROP
DATABASE
hotcopy_test
;
DROP
DATABASE
hotcopy_save
;
DROP
DATABASE
hotcopy_save_old
;
mysql-test/lib/mtr_misc.pl
View file @
b6a4e25c
...
...
@@ -147,6 +147,28 @@ sub mtr_exe_maybe_exists (@) {
}
#
# NOTE! More specific paths should be given before less specific.
#
sub
mtr_pl_maybe_exists
(@)
{
my
@path
=
@_
;
map
{
$_
.=
"
.pl
"}
@path
if
IS_WINDOWS
;
foreach
my
$path
(
@path
)
{
if
(
IS_WINDOWS
)
{
return
$path
if
-
f
$path
;
}
else
{
return
$path
if
-
x
$path
;
}
}
return
"";
}
#
# NOTE! More specific paths should be given before less specific.
# For example /client/debug should be listed before /client
...
...
mysql-test/mysql-test-run.pl
View file @
b6a4e25c
...
...
@@ -2110,6 +2110,15 @@ sub environment_setup {
"
$basedir
/storage/myisam/myisampack
",
"
$basedir
/myisam/myisampack
"));
# ----------------------------------------------------
# mysqlhotcopy
# ----------------------------------------------------
my
$mysqlhotcopy
=
mtr_pl_maybe_exists
("
$basedir
/scripts/mysqlhotcopy
");
# Since mysqltest interprets the real path as "false" in an if,
# use 1 ("true") to indicate "not exists" so it can be tested for
$ENV
{'
MYSQLHOTCOPY
'}
=
$mysqlhotcopy
||
1
;
# ----------------------------------------------------
# perror
# ----------------------------------------------------
...
...
mysql-test/r/mysqlhotcopy_archive.result
0 → 100644
View file @
b6a4e25c
DROP DATABASE IF EXISTS hotcopy_test;
CREATE DATABASE hotcopy_test;
USE hotcopy_test;
CREATE TABLE t1 (c1 int, c2 varchar(20)) ENGINE=archive;
CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=archive;
CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=archive;
INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
Warnings:
Warning 1265 Data truncated for column 'c2' at row 2
INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
Warnings:
Warning 1265 Data truncated for column 'c2' at row 2
INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
Warnings:
Warning 1265 Data truncated for column 'c2' at row 2
db.opt
t1.ARZ
t1.frm
t2.ARZ
t2.frm
t3.ARZ
t3.frm
db.opt
t1.ARZ
t1.frm
t2.ARZ
t2.frm
t3.ARZ
t3.frm
USE hotcopy_save;
SELECT * FROM t1;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
SELECT * FROM t2;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
SELECT * FROM t3;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
USE hotcopy_test;
DROP TABLE t2;
db.opt
t1.ARZ
t1.frm
t3.ARZ
t3.frm
FLUSH TABLES;
SELECT * FROM t1;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
SELECT * FROM t2;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
SELECT * FROM t3;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
USE hotcopy_test;
db.opt
t1.ARZ
t1.frm
t2.ARZ
t2.frm
t3.ARZ
t3.frm
DROP DATABASE hotcopy_save;
db.opt
t1.ARZ
t1.frm
t2.ARZ
t2.frm
t3.ARZ
t3.frm
DROP DATABASE hotcopy_save;
db.opt
t1.ARZ
t1.frm
t2.ARZ
t2.frm
t3.ARZ
t3.frm
db.opt
t1.ARZ
t1.frm
t2.ARZ
t2.frm
t3.ARZ
t3.frm
db.opt
t1.ARZ
t1.frm
t2.ARZ
t2.frm
t3.ARZ
t3.frm
db.opt
t1.ARZ
t1.frm
t2.ARZ
t2.frm
t3.ARZ
t3.frm
db.opt
t1.ARZ
t1.frm
t2.ARZ
t2.frm
t3.ARZ
t3.frm
DROP DATABASE hotcopy_test_cpy;
DROP DATABASE hotcopy_test;
DROP DATABASE hotcopy_save;
DROP DATABASE hotcopy_save_old;
mysql-test/r/mysqlhotcopy_myisam.result
0 → 100644
View file @
b6a4e25c
DROP DATABASE IF EXISTS hotcopy_test;
CREATE DATABASE hotcopy_test;
USE hotcopy_test;
CREATE TABLE t1 (c1 int, c2 varchar(20)) ENGINE=MyISAM;
CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=MyISAM;
CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
Warnings:
Warning 1265 Data truncated for column 'c2' at row 2
INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
Warnings:
Warning 1265 Data truncated for column 'c2' at row 2
INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
Warnings:
Warning 1265 Data truncated for column 'c2' at row 2
db.opt
t1.MYD
t1.MYI
t1.frm
t2.MYD
t2.MYI
t2.frm
t3.MYD
t3.MYI
t3.frm
db.opt
t1.MYD
t1.MYI
t1.frm
t2.MYD
t2.MYI
t2.frm
t3.MYD
t3.MYI
t3.frm
USE hotcopy_save;
SELECT * FROM t1;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
SELECT * FROM t2;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
SELECT * FROM t3;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
USE hotcopy_test;
DELETE FROM t1;
SELECT * FROM t1;
c1 c2
USE hotcopy_save;
SELECT * FROM t1;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
SELECT * FROM t2;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
SELECT * FROM t3;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
USE hotcopy_test;
DROP TABLE t2;
db.opt
t1.MYD
t1.MYI
t1.frm
t3.MYD
t3.MYI
t3.frm
FLUSH TABLES;
SELECT * FROM t1;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
SELECT * FROM t2;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
SELECT * FROM t3;
c1 c2
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
USE hotcopy_test;
db.opt
t1.MYD
t1.MYI
t1.frm
t2.MYD
t2.MYI
t2.frm
t3.MYD
t3.MYI
t3.frm
DROP DATABASE hotcopy_save;
db.opt
t1.MYD
t1.MYI
t1.frm
t2.MYD
t2.MYI
t2.frm
t3.MYD
t3.MYI
t3.frm
DROP DATABASE hotcopy_save;
db.opt
t1.MYD
t1.MYI
t1.frm
t2.MYD
t2.MYI
t2.frm
t3.MYD
t3.MYI
t3.frm
db.opt
t1.MYD
t1.MYI
t1.frm
t2.MYD
t2.MYI
t2.frm
t3.MYD
t3.MYI
t3.frm
db.opt
t1.MYD
t1.MYI
t1.frm
t2.MYD
t2.MYI
t2.frm
t3.MYD
t3.MYI
t3.frm
db.opt
t1.MYD
t1.MYI
t1.frm
t2.MYD
t2.MYI
t2.frm
t3.MYD
t3.MYI
t3.frm
db.opt
t1.MYD
t1.MYI
t1.frm
t2.MYD
t2.MYI
t2.frm
t3.MYD
t3.MYI
t3.frm
DROP DATABASE hotcopy_test_cpy;
DROP DATABASE hotcopy_test;
DROP DATABASE hotcopy_save;
DROP DATABASE hotcopy_save_old;
mysql-test/t/mysqlhotcopy_archive.test
0 → 100644
View file @
b6a4e25c
# Test of mysqlhotcopy (perl script)
# Author: Horst Hunger
# Created: 2010-05-10
--
source
include
/
have_archive
.
inc
let
$engine
=
archive
;
--
source
include
/
mysqlhotcopy
.
inc
--
exit
mysql-test/t/mysqlhotcopy_myisam.test
0 → 100644
View file @
b6a4e25c
# Test of mysqlhotcopy (perl script)
# Author: Horst Hunger
# Created: 2010-05-10
let
$engine
=
MyISAM
;
--
source
include
/
mysqlhotcopy
.
inc
--
exit
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