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
5184ff82
Commit
5184ff82
authored
Oct 03, 2007
by
gshchepa/uchum@gleb.loc
Browse files
Options
Browse Files
Download
Plain Diff
Merge gleb.loc:/home/uchum/work/bk/5.0-opt-31077
into gleb.loc:/home/uchum/work/bk/5.1-opt
parents
96e68cfb
a6b5121b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
5 deletions
+53
-5
client/client_priv.h
client/client_priv.h
+1
-0
client/mysqldump.c
client/mysqldump.c
+13
-5
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+22
-0
mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test
+17
-0
No files found.
client/client_priv.h
View file @
5184ff82
...
...
@@ -80,5 +80,6 @@ enum options_client
OPT_MYSQL_REPLACE_INTO
,
OPT_BASE64_OUTPUT
,
OPT_SERVER_ID
,
OPT_FIX_TABLE_NAMES
,
OPT_FIX_DB_NAMES
,
OPT_SSL_VERIFY_SERVER_CERT
,
OPT_DEBUG_INFO
,
OPT_DEBUG_CHECK
,
OPT_COLUMN_TYPES
,
OPT_ERROR_LOG_FILE
,
OPT_DUMP_DATE
,
OPT_WRITE_BINLOG
,
OPT_MAX_CLIENT_OPTION
};
client/mysqldump.c
View file @
5184ff82
...
...
@@ -90,7 +90,7 @@ static my_bool verbose= 0, opt_no_create_info= 0, opt_no_data= 0,
opt_drop
=
1
,
opt_keywords
=
0
,
opt_lock
=
1
,
opt_compress
=
0
,
opt_delayed
=
0
,
create_options
=
1
,
opt_quoted
=
0
,
opt_databases
=
0
,
opt_alldbs
=
0
,
opt_create_db
=
0
,
opt_lock_all_tables
=
0
,
opt_set_charset
=
0
,
opt_set_charset
=
0
,
opt_dump_date
=
1
,
opt_autocommit
=
0
,
opt_disable_keys
=
1
,
opt_xml
=
0
,
opt_delete_master_logs
=
0
,
tty_password
=
0
,
opt_single_transaction
=
0
,
opt_comments
=
0
,
opt_compact
=
0
,
...
...
@@ -424,6 +424,9 @@ static struct my_option my_long_options[] =
"automatically turns off --lock-tables."
,
(
uchar
**
)
&
opt_single_transaction
,
(
uchar
**
)
&
opt_single_transaction
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"dump-date"
,
OPT_DUMP_DATE
,
"Put a dump date to the end of the output."
,
(
gptr
*
)
&
opt_dump_date
,
(
gptr
*
)
&
opt_dump_date
,
0
,
GET_BOOL
,
NO_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
{
"skip-opt"
,
OPT_SKIP_OPTIMIZATION
,
"Disable --opt. Disables --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
@@ -651,10 +654,15 @@ static void write_footer(FILE *sql_file)
fputs
(
"
\n
"
,
sql_file
);
if
(
opt_comments
)
{
char
time_str
[
20
];
get_date
(
time_str
,
GETDATE_DATE_TIME
,
0
);
fprintf
(
sql_file
,
"-- Dump completed on %s
\n
"
,
time_str
);
if
(
opt_dump_date
)
{
char
time_str
[
20
];
get_date
(
time_str
,
GETDATE_DATE_TIME
,
0
);
fprintf
(
sql_file
,
"-- Dump completed on %s
\n
"
,
time_str
);
}
else
fprintf
(
sql_file
,
"-- Dump completed
\n
"
);
}
check_io
(
sql_file
);
}
...
...
mysql-test/r/mysqldump.result
View file @
5184ff82
...
...
@@ -3805,6 +3805,28 @@ c1
2
DROP TABLE t1,t2;
#
# Bug#29815: new option for suppressing last line of mysqldump:
# "Dump completed on"
#
# --skip-dump-date:
--
-- Dump completed
# --dump-date:
--
-- Dump completed on DATE
# --dump-date (default):
--
-- Dump completed on DATE
#
# End of 5.0 tests
#
drop table if exists t1;
...
...
mysql-test/t/mysqldump.test
View file @
5184ff82
...
...
@@ -1576,6 +1576,23 @@ SELECT * FROM t2;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# Bug#29815: new option for suppressing last line of mysqldump:
--
echo
# "Dump completed on"
--
echo
#
--
echo
# --skip-dump-date:
--
replace_regex
/--
[
^
D
][
^
u
][
^
m
][
^
p
]
.*//
/
\
/
\
*!.*//
--
exec
$MYSQL_DUMP
--
skip
-
dump
-
date
test
--
echo
# --dump-date:
--
replace_regex
/--
[
^
D
][
^
u
][
^
m
][
^
p
]
.*//
/
\
/
\
*!.*//
/
on
[
0
-
9
:-
]
+/
on
DATE
/
--
exec
$MYSQL_DUMP
--
dump
-
date
test
--
echo
# --dump-date (default):
--
replace_regex
/--
[
^
D
][
^
u
][
^
m
][
^
p
]
.*//
/
\
/
\
*!.*//
/
on
[
0
-
9
:-
]
+/
on
DATE
/
--
exec
$MYSQL_DUMP
test
--
echo
#
--
echo
# End of 5.0 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