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
fd82fd86
Commit
fd82fd86
authored
Jun 22, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge to 5.0
parent
e9e048f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
178 additions
and
0 deletions
+178
-0
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+87
-0
mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test
+91
-0
No files found.
mysql-test/r/mysqldump.result
View file @
fd82fd86
...
@@ -1471,3 +1471,90 @@ CREATE ALGORITHM=UNDEFINED VIEW `db1`.`v2` AS select `db1`.`t2`.`a` AS `a` from
...
@@ -1471,3 +1471,90 @@ CREATE ALGORITHM=UNDEFINED VIEW `db1`.`v2` AS select `db1`.`t2`.`a` AS `a` from
drop table t2;
drop table t2;
drop view v2;
drop view v2;
drop database db1;
drop database db1;
CREATE DATABASE mysqldump_test_db;
USE mysqldump_test_db;
CREATE TABLE t1 ( a INT );
CREATE TABLE t2 ( a INT );
INSERT INTO t1 VALUES (1), (2);
INSERT INTO t2 VALUES (1), (2);
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
DROP TABLE IF EXISTS `t1`;
CREATE TABLE `t1` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `t2`;
CREATE TABLE `t2` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
DROP TABLE IF EXISTS `t1`;
CREATE TABLE `t1` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `t2`;
CREATE TABLE `t2` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
DROP TABLE t1, t2;
DROP DATABASE mysqldump_test_db;
create database mysqldump_test_db;
use mysqldump_test_db;
create table t1(a varchar(30) primary key, b int not null);
create table t2(a varchar(30) primary key, b int not null);
create table t3(a varchar(30) primary key, b int not null);
test_sequence
------ Testing with illegal table names ------
MYSQL_DUMP_DIR: Couldn't find table: "\d-2-1.sql"
MYSQL_DUMP_DIR: Couldn't find table: "\t1"
MYSQL_DUMP_DIR: Couldn't find table: "\t1"
MYSQL_DUMP_DIR: Couldn't find table: "\\t1"
MYSQL_DUMP_DIR: Couldn't find table: "t\1"
MYSQL_DUMP_DIR: Couldn't find table: "t\1"
MYSQL_DUMP_DIR: Couldn't find table: "t/1"
test_sequence
------ Testing with illegal database names ------
MYSQL_DUMP_DIR: Got error: 1049: Unknown database 'mysqldump_test_d' when selecting the database
MYSQL_DUMP_DIR: Got error: 1102: Incorrect database name 'mysqld\ump_test_db' when selecting the database
drop table t1, t2, t3;
drop database mysqldump_test_db;
mysql-test/t/mysqldump.test
View file @
fd82fd86
...
@@ -588,3 +588,94 @@ create view v2 as select * from t2 where a like 'a%' with check option;
...
@@ -588,3 +588,94 @@ create view v2 as select * from t2 where a like 'a%' with check option;
drop
table
t2
;
drop
table
t2
;
drop
view
v2
;
drop
view
v2
;
drop
database
db1
;
drop
database
db1
;
#
# Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
#
CREATE
DATABASE
mysqldump_test_db
;
USE
mysqldump_test_db
;
CREATE
TABLE
t1
(
a
INT
);
CREATE
TABLE
t2
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),
(
2
);
INSERT
INTO
t2
VALUES
(
1
),
(
2
);
--
exec
$MYSQL_DUMP
--
skip
-
comments
--
no
-
data
mysqldump_test_db
--
exec
$MYSQL_DUMP
--
skip
-
comments
--
no
-
data
mysqldump_test_db
t1
t2
DROP
TABLE
t1
,
t2
;
DROP
DATABASE
mysqldump_test_db
;
#
# Testing with tables and databases that don't exists
# or contains illegal characters
# (Bug #9358 mysqldump crashes if tablename starts with \)
#
create
database
mysqldump_test_db
;
use
mysqldump_test_db
;
create
table
t1
(
a
varchar
(
30
)
primary
key
,
b
int
not
null
);
create
table
t2
(
a
varchar
(
30
)
primary
key
,
b
int
not
null
);
create
table
t3
(
a
varchar
(
30
)
primary
key
,
b
int
not
null
);
--
disable_query_log
select
'------ Testing with illegal table names ------'
as
test_sequence
;
--
enable_query_log
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
6
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
mysqldump_test_db
"\d-2-1.sql"
2
>&
1
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
6
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
mysqldump_test_db
"
\t
1"
2
>&
1
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
6
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
mysqldump_test_db
"
\\
t1"
2
>&
1
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
6
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
mysqldump_test_db
"
\\\\
t1"
2
>&
1
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
6
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
mysqldump_test_db
"t
\1
"
2
>&
1
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
6
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
mysqldump_test_db
"t
\\
1"
2
>&
1
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
6
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
mysqldump_test_db
"t/1"
2
>&
1
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
6
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
"mysqldump_test_db"
"T_1"
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
6
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
"mysqldump_test_db"
"T%1"
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
6
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
"mysqldump_test_db"
"T'1"
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
6
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
"mysqldump_test_db"
"T_1"
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
6
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
"mysqldump_test_db"
"T_"
--
disable_query_log
select
'------ Testing with illegal database names ------'
as
test_sequence
;
--
enable_query_log
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
2
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
mysqldump_test_d
2
>&
1
--
replace_result
$MYSQL_DUMP_DIR
MYSQL_DUMP_DIR
--
error
2
--
exec
$MYSQL_DUMP
--
compact
--
skip
-
comments
"mysqld\ump_test_db"
2
>&
1
drop
table
t1
,
t2
,
t3
;
drop
database
mysqldump_test_db
;
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