1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-31092 mysqldump --force doesn't ignore error as it should

failed SHOW CREATE FUNCTION means we don't dump this function,
but should still try to dump all other functions
This commit is contained in:
Sergei Golubchik
2023-07-31 17:36:59 +02:00
parent 4dd38f9f39
commit ab10a675ac
3 changed files with 89 additions and 5 deletions

View File

@ -2921,6 +2921,7 @@ DROP DATABASE test1;
DROP DATABASE test2;
SET sql_mode=@save_sql_mode;
--remove_file $MYSQLTEST_VARDIR/tmp/dumptest1.sql
use test;
--echo #
--echo # MDEV-4875 Can't restore a mysqldump if --add-drop-database meets general_log
@ -2981,4 +2982,27 @@ TRUNCATE TABLE mysql.general_log;
DROP DATABASE test1;
--remove_file $MYSQLTEST_VARDIR/tmp/dumptest1.sql
--echo #
--echo # End of 10.3 tests
--echo #
--echo #
--echo # MDEV-31092 mysqldump --force doesn't ignore error as it should
--echo #
create function f1() returns int return 1;
create function f2() returns int return 2;
update mysql.proc set body='return no_such_var' where db='test' and name='f1';
create event e1 on schedule every 1 year starts '2030-01-01' do select 1;
update mysql.event set body ='select not_a_value' where db='test' and name='e1';
create table t1 (i int);
--replace_result mysqldump.exe mysqldump
--error 2
--exec $MYSQL_DUMP --compact --events --routines --force test 2>&1
drop function f1;
drop function f2;
drop event e1;
drop table t1;
--echo #
--echo # End of 10.4 tests
--echo #