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
d8af27ef
Commit
d8af27ef
authored
Jan 10, 2012
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Plain Diff
Merge of fix for bug#11760384 from mysql-5.1.
parents
51be2c2c
63f8c1e1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
886 additions
and
131 deletions
+886
-131
client/mysqldump.c
client/mysqldump.c
+335
-131
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+439
-0
mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test
+112
-0
No files found.
client/mysqldump.c
View file @
d8af27ef
This diff is collapsed.
Click to expand it.
mysql-test/r/mysqldump.result
View file @
d8af27ef
This diff is collapsed.
Click to expand it.
mysql-test/t/mysqldump.test
View file @
d8af27ef
...
...
@@ -2201,6 +2201,118 @@ DROP DATABASE `test-database`;
# Switching back to test database.
USE
test
;
--
echo
#
--
echo
# BUG#11760384 : 52792: mysqldump in XML mode does not dump routines.
--
echo
#
CREATE
DATABASE
BUG52792
;
USE
BUG52792
;
CREATE
TABLE
t1
(
c1
INT
,
c2
VARCHAR
(
20
));
CREATE
TABLE
t2
(
c1
INT
);
INSERT
INTO
t1
VALUES
(
1
,
'aaa'
),
(
2
,
'bbb'
),
(
3
,
'ccc'
);
INSERT
INTO
t2
VALUES
(
1
),(
2
),(
3
);
--
echo
# Stored Procedures.
DELIMITER
//;
CREATE
PROCEDURE
simpleproc1
(
OUT
param1
INT
)
BEGIN
SELECT
COUNT
(
*
)
INTO
param1
FROM
t1
;
END
//
DELIMITER
;
//
DELIMITER
//;
CREATE
PROCEDURE
simpleproc2
(
OUT
param1
INT
)
BEGIN
SELECT
COUNT
(
*
)
INTO
param1
FROM
t2
;
END
//
DELIMITER
;
//
--
echo
# Events.
CREATE
EVENT
e1
ON
SCHEDULE
EVERY
1
SECOND
DO
DROP
DATABASE
BUG52792
;
CREATE
EVENT
e2
ON
SCHEDULE
EVERY
1
SECOND
DO
DROP
DATABASE
BUG52792
;
--
echo
# Functions.
CREATE
FUNCTION
`
hello1
` (s CHAR(20))
RETURNS CHAR(50) DETERMINISTIC
RETURN CONCAT('Hello, ' ,s ,'!');
CREATE FUNCTION `
hello2
` (s CHAR(20))
RETURNS CHAR(50) DETERMINISTIC
RETURN CONCAT(']]>, ' , s ,'!');
--echo # Triggers.
DELIMITER |;
CREATE TRIGGER trig1 BEFORE INSERT ON t2
FOR EACH ROW BEGIN
INSERT INTO t2 VALUES(1);
END;
|
DELIMITER ;|
DELIMITER |;
CREATE TRIGGER trig2 AFTER INSERT ON t2
FOR EACH ROW BEGIN
INSERT INTO t2 VALUES(1, ']]>');
INSERT INTO t2 VALUES(2, '<![CDATA]]>');
INSERT INTO t2 VALUES(3, '<![CDATA[');
INSERT INTO t2 VALUES(4, '< > & \ " _');
END;
|
DELIMITER ;|
--echo # Views
CREATE VIEW v1 AS SELECT * FROM t1;
CREATE VIEW v2 AS SELECT * FROM t2;
--echo
--echo # Dumping BUG52792 database in xml format.
--echo
--echo # Running 'replace_regex on timestamp'
--replace_regex /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/--TIME--/
--exec $MYSQL_DUMP --user=root --compact -R -E --triggers -X BUG52792
--echo
--echo # Dumping BUG52792 database in xml format with comments.
--echo
--echo # Running 'replace_regex on timestamp'
--replace_regex /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/--TIME--/
--exec $MYSQL_DUMP --comments --user=root -R -E --triggers -X BUG52792
--echo
--echo # Test to check 'Insufficient privileges' error.
--echo
GRANT ALL PRIVILEGES ON BUG52792.* TO user1;
connect (conn_1, localhost, user1, , BUG52792, $MASTER_MYPORT, $MASTER_MYSOCK);
connection conn_1;
--echo # Running 'replace_regex on timestamp'
--replace_regex /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/--TIME--/
--error 2
--exec $MYSQL_DUMP --user=user1 -R -E --triggers -X BUG52792
connection default;
disconnect conn_1;
DROP USER user1;
DROP DATABASE BUG52792;
--echo # UTF-8
CREATE DATABASE BUG52792;
USE BUG52792;
SET NAMES utf8;
CREATE FUNCTION `
straße
`
(
c1
CHAR
(
20
))
RETURNS
CHAR
(
50
)
DETERMINISTIC
RETURN
CONCAT
(
']]>, '
,
s
,
'!'
);
--
exec
$MYSQL_DUMP
--
character
-
sets
-
dir
=
$CHARSETSDIR
--
skip
-
comments
--
default
-
character
-
set
=
utf8
--
compatible
=
mysql323
-
R
-
X
BUG52792
DROP
DATABASE
BUG52792
;
USE
test
;
--
echo
#
--
echo
# End of 5.1 tests
--
echo
#
...
...
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