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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
e8b14c4d
Commit
e8b14c4d
authored
Nov 21, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/alexi/dev/mysql-5.0-14554
parents
76611e3b
3ecbc8e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
1 deletion
+82
-1
client/mysqldump.c
client/mysqldump.c
+2
-1
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+56
-0
mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test
+24
-0
No files found.
client/mysqldump.c
View file @
e8b14c4d
...
@@ -1841,12 +1841,13 @@ DELIMITER ;;\n");
...
@@ -1841,12 +1841,13 @@ DELIMITER ;;\n");
while
((
row
=
mysql_fetch_row
(
result
)))
while
((
row
=
mysql_fetch_row
(
result
)))
{
{
fprintf
(
sql_file
,
"/*!50003 SET SESSION SQL_MODE=
\"
%s
\"
*/;;
\n
\
fprintf
(
sql_file
,
"/*!50003 SET SESSION SQL_MODE=
\"
%s
\"
*/;;
\n
\
/*!50003 CREATE TRIGGER %s %s %s ON %s FOR EACH ROW%s */;;
\n\n
"
,
/*!50003 CREATE TRIGGER %s %s %s ON %s FOR EACH ROW%s
%s
*/;;
\n\n
"
,
row
[
6
],
/* sql_mode */
row
[
6
],
/* sql_mode */
quote_name
(
row
[
0
],
name_buff
,
0
),
/* Trigger */
quote_name
(
row
[
0
],
name_buff
,
0
),
/* Trigger */
row
[
4
],
/* Timing */
row
[
4
],
/* Timing */
row
[
1
],
/* Event */
row
[
1
],
/* Event */
result_table
,
result_table
,
(
strchr
(
"
\t\n\r
"
,
*
(
row
[
3
])))
?
""
:
" "
,
row
[
3
]
/* Statement */
);
row
[
3
]
/* Statement */
);
}
}
if
(
mysql_num_rows
(
result
))
if
(
mysql_num_rows
(
result
))
...
...
mysql-test/r/mysqldump.result
View file @
e8b14c4d
...
@@ -2494,3 +2494,59 @@ drop view v2;
...
@@ -2494,3 +2494,59 @@ drop view v2;
drop view v0;
drop view v0;
drop view v1;
drop view v1;
drop table t1;
drop table t1;
SET @old_sql_mode = @@SQL_MODE;
SET SQL_MODE = IGNORE_SPACE;
CREATE TABLE t1 (a INT);
CREATE TRIGGER tr1 BEFORE INSERT ON t1
FOR EACH ROW
BEGIN
SET new.a = 0;
END|
SET SQL_MODE = @old_sql_mode;
/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!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 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `test`;
DROP TABLE IF EXISTS `t1`;
CREATE TABLE `t1` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
LOCK TABLES `t1` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;
DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="IGNORE_SPACE" */;;
/*!50003 CREATE TRIGGER `tr1` BEFORE INSERT ON `t1` FOR EACH ROW BEGIN
SET new.a = 0;
END */;;
DELIMITER ;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!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 TRIGGER tr1;
DROP TABLE t1;
mysql-test/t/mysqldump.test
View file @
e8b14c4d
...
@@ -999,3 +999,27 @@ drop view v2;
...
@@ -999,3 +999,27 @@ drop view v2;
drop
view
v0
;
drop
view
v0
;
drop
view
v1
;
drop
view
v1
;
drop
table
t1
;
drop
table
t1
;
#
# BUG#14554 - mysqldump does not separate words "ROW" and "BEGIN"
# for tables with trigger created in the IGNORE_SPACE sql mode.
#
SET
@
old_sql_mode
=
@@
SQL_MODE
;
SET
SQL_MODE
=
IGNORE_SPACE
;
CREATE
TABLE
t1
(
a
INT
);
DELIMITER
|
;
CREATE
TRIGGER
tr1
BEFORE
INSERT
ON
t1
FOR
EACH
ROW
BEGIN
SET
new
.
a
=
0
;
END
|
DELIMITER
;
|
SET
SQL_MODE
=
@
old_sql_mode
;
--
exec
$MYSQL_DUMP
--
skip
-
comments
--
databases
test
DROP
TRIGGER
tr1
;
DROP
TABLE
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