Bug #89273 Windows lower_case_table_names=2 and restored stored procedure issue
Submitted: 17 Jan 2018 1:10 Modified: 12 May 2018 17:42
Reporter: Mark Rhoades Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: DDL Severity:S2 (Serious)
Version:5.7.20 OS:Windows (7)
Assigned to: CPU Architecture:Any
Tags: lower_case_table_names=2

[17 Jan 2018 1:10] Mark Rhoades
Description:
I have a Solaris MySQL 5.0.77 database dump and restoring on Windows MySQL 5.7.20 with lower_case_table_names=2 the stored procedures are restored with the database name in upper/lower case (from the Solaris system). When I use one of the stored  procedures it creates a new entry in mysql.proc with the lowercase db name and then it reports it can't find the stored procedure.

How to repeat:
In my case this is the configuration:

Solaris 8 with MySQL 5.0.77
MySQLDump with
--single-transaction
--flush-logs
--complete-insert
--add-drop-database
--master-data=2
--delete-master-logs
--all-databases
-p

Windows 7 computer with MySQL configured with lower_case_table_names=2

source database dump from above
run mysql_upgrade

Try running stored procedures that was loaded.

I found the following workaround for the problem.
update mysql.proc set db='mydb' where db='MyDB';

If it makes a difference the database character set is latin1
[19 Jan 2018 12:16] MySQL Verification Team
Looks duplicate of https://bugs.mysql.com/bug.php?id=15345 and https://bugs.mysql.com/bug.php?id=9051.
[19 Jan 2018 22:23] Mark Rhoades
It is a little similar to the first one but the problem is only when a database dump is loaded. 

When I manually create the stored procedures it creates them correctly. It points to an issue with loading a database dump.
[25 Jan 2018 22:13] MySQL Verification Team
Thank you for the feedback. Please provide a dump file attach it using the Files tab. Thanks.
[26 Feb 2018 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[12 Apr 2018 17:42] MySQL Verification Team
Thank you for the feedback. If you're able to provide a small dump file from a linux machine, which allow to check this issue would be nice. Thanks.
[13 May 2018 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".