Bug #38498 myslqdump cannot dump tables with names that are 64 characters long
Submitted: 31 Jul 2008 16:24 Modified: 1 Aug 2008 8:08
Reporter: Stefan Meier Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:10.11 Distrib 5.0.51b OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: mysqldump

[31 Jul 2008 16:24] Stefan Meier
Description:
When invoking mysqldump from the windows command prompt to dump the contents of a table whose name is exactly 64 characters long, mysqldump seems to look for a table whose name consists of the first 63 characters of the real table name.
This does not happen for all table names of this length though.

The error does not occur when I call mysqldump (same version) from a cygwin bash shell.

How to repeat:
## create a test table:

create table t123456789_123456789_123456789_123456789_123456789_123456789_234 (
    onecol int 
) Type=InnoDB;

## now try to dump the table

mysqldump -mysqldump -t -h<server> -u <user> -p<passwd> --opt <database> t123456789_123456789_123456789_123456789_123456789_123456789_234

## and get the following output:

-- MySQL dump 10.10
--
-- Host: sp101ap0006    Database: lvs_server_18080
-- ------------------------------------------------------
-- Server version       5.0.45-community-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
mysqldump: Got error: 1146: Table 'lvs_server_18080.t123456789_123456789_123456789_123456789_123456789_123456789_23' doesn't exist when doing LOCK TABLES

## Notice: the table name in the error message is 
t123456789_123456789_123456789_123456789_123456789_123456789_23
## instead of
t123456789_123456789_123456789_123456789_123456789_123456789_234
[31 Jul 2008 16:40] Valeriy Kravchuk
Sorry, but I see 5.0.45 as a server version. Please, try to repeat with 5.0.51b and inform about the results.

On recent 5.0.66a I've got:

--
-- Table structure for table `t123456789_123456789_123456789_123456789_123456789_123456789_234`
--

DROP TABLE IF EXISTS `t123456789_123456789_123456789_123456789_123456789_123456789_234`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `t123456789_123456789_123456789_123456789_123456789_123456789_234` (
  `onecol` int(11) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `t123456789_123456789_123456789_123456789_123456789_123456789_234`
--

LOCK TABLES `t123456789_123456789_123456789_123456789_123456789_123456789_234` WRITE;
/*!40000 ALTER TABLE `t123456789_123456789_123456789_123456789_123456789_123456789_234` DISABLE KEYS */;
/*!40000 ALTER TABLE `t123456789_123456789_123456789_123456789_123456789_123456789_234` ENABLE KEYS */;
UNLOCK TABLES;
[1 Aug 2008 7:13] Stefan Meier
The problem occured whith server version 5.0.45 on Suse Linux Enterprise 10.
The problem cannot be reproduce with server version 5.0.51a-3ubuntu5.1 (on Ubuntu server 8). Haven't had a chance to try it on Suse so far.
[1 Aug 2008 7:31] Susanne Ebrecht
Stefan,

sorry, I don't understand your answer. You have this problem by using MySQL 5.0.51b is this right?
[1 Aug 2008 7:40] Stefan Meier
I only have this problem using 5.0.45 on Suse Linux Enterprise.

I don't have this problem using 5.0.51 on Ubuntu Server.

So it seems that the problem is solved in 5.0.51 or it is an issue of compatibility (myqldump version 5.0.51 vs. mysql server version 5.0.45).

However I have no chance to test this with mysql server 5.0.51 on Suse, but I think it is very unlikely that the problem is Suse specific. You probably can close the bug now.
[1 Aug 2008 8:08] Susanne Ebrecht
Stefan,

I will close this bug. Please, feel free to open it again, when you have problems with newer version (>= 5.0.51b)