mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fixed bug #31077.
mysqldump adds the "-- Dump completed on YYYY-MM-DD hh:mm:ss" string to the end of output if the --comments switch is on. The only way to suppress this line is to use --skip-comments/--compact switch. New switch has been added to the mysqldump client command line: --dump-date. For the compatibility with previous releases, by default the --dump-date is on. The --dump-date switch forces mysqldump to add date to the "-- Dump completed on ..." string at the end of output. The --skip-dump-date switch supresses the output of date string and uses short form of that commentary: "-- Dump completed". --skip-comments or --compact switches disable the whole commentary as usual.
This commit is contained in:
@ -3544,5 +3544,15 @@ 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 -- ::
|
||||
# --dump-date (default):
|
||||
-- Dump completed on -- ::
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
|
@ -1576,6 +1576,20 @@ 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:
|
||||
--exec $MYSQL_DUMP --skip-dump-date test | grep 'Dump completed'
|
||||
|
||||
--echo # --dump-date:
|
||||
--exec $MYSQL_DUMP --dump-date test | grep 'Dump completed' | tr -d '[0-9]'
|
||||
|
||||
--echo # --dump-date (default):
|
||||
--exec $MYSQL_DUMP test | grep 'Dump completed' | tr -d '[0-9]'
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.0 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user