mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-15021: mysqldump --tables --routines generates non importable dump file
The order of outputting stored procedures is important. Stored procedures must be available on view creation, for views which make use of them. Make sure to print them before outputting tables.
This commit is contained in:
committed by
Vicențiu Ciorbaru
parent
953d70f960
commit
1d43f71c7b
@ -5401,3 +5401,18 @@ DELIMITER ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE `a\"'``b` CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
||||
DROP DATABASE `a\"'``b`;
|
||||
#
|
||||
# MDEV-15021: Fix the order in which routines are called
|
||||
#
|
||||
use test;
|
||||
CREATE FUNCTION f() RETURNS INT RETURN 1;
|
||||
CREATE VIEW v1 AS SELECT f();
|
||||
# Running mysqldump -uroot test --routines --tables v1 > **vardir**/test.dmp
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION f;
|
||||
# Running mysql -uroot test < **vardir**/test.dmp
|
||||
#
|
||||
# Cleanup after succesful import.
|
||||
#
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION f;
|
||||
|
Reference in New Issue
Block a user