Bug #101970 MySQL Shell 8.0.22 loadDump fails for views using functions
Submitted: 11 Dec 2020 3:24 Modified: 2 Oct 19:32
Reporter: Yoseph Phillips Email Updates:
Status: Closed Impact on me:
Category:Shell General / Core Client Severity:S3 (Non-critical)
Version:8.0.22 OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[11 Dec 2020 3:24] Yoseph Phillips
MySQL Shell 8.0.22 loadDump fails for views using functions.

After doing the how to repeat the following error is displayed:
Util.loadDump: FUNCTION functionName does not exist (RuntimeError)

How to repeat:
Connect to MySQL 8.0.22.
Create a VIEW which uses a FUNCTION in database dbName.
util.dumpTables("dbName", [], "d:/temp/dumpDirectory", {all: true})

Dump completed successfully.

Connect to MySQL 5.7.27.
util.loadDump("d:/temp/dumpDirectory", {ignoreVersion: true, schema: "dbName"})
[11 Dec 2020 6:04] MySQL Verification Team
Hello Yoseph Phillips,

Thank you for the report and feedback.
Verified as described.

[11 Dec 2020 17:05] Alfredo Kojima
dumpTables will only dump tables (and views), nothing else. Loading dumps produced by it assume that any referenced objects like functions and other tables already exist.

If you need to dump tables and functions, you will need to use dumpSchemas or dumpInstance and filter.

However, it appears our documentation doesn't mention functions and SPs in the list of limitations for dumpTables, so that will be fixed.
[2 Oct 19:32] Margaret Fisher
Posted by developer:
Added limitation to utility docs and closed with no changelog entry.