Mysqldump Can Fail Due to Case Insenstivity of the SHOW PROCEDURE STATUS Command; Error 1305 (Doc ID 1387948.1)

Last updated on JULY 20, 2014

Applies to:

MySQL Server - Version 4.0 and later
Information in this document applies to any platform.

Symptoms

When trying to create a mysqldump backup for a server having two databases with the same name but using different cases, for example dumptest and Dumptest, mysqldump will try to dump procedures from both databases for each database.

For example:

mysql> create database dumptest;
Query OK, 1 row affected (0.01 sec)

mysql> use dumptest;
Database changed

mysql> delimiter ;;
mysql> create procedure dumpproc () BEGIN SELECT 1 AS one FROM DUAL; end;;
Query OK, 0 rows affected (0.01 sec)

mysql> delimiter ;
mysql> create database Dumptest;
Query OK, 1 row affected (0.02 sec)


Which will cause an error when dumping the Dumptest database:

$ mysqldump -u root -p --allow-keywords --add-drop-table --no-data --routines Dumptest > /dev/null
Enter password:
mysqldump: Couldn't execute 'SHOW CREATE PROCEDURE `dumpproc`': PROCEDURE dumpproc does not exist (1305)

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms