Bug #7651 'mysqldump' test fails on multiple platforms
Submitted: 4 Jan 2005 5:47 Modified: 6 Jan 2005 19:03
Reporter: Matt Wagner Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.9 (pre-release) OS:Multiple
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[4 Jan 2005 5:47] Matt Wagner
Description:
The 'mysqldump' test fails on multiple platforms when building a '-debug' version of the server. 
'bk revtool' reports that Lars was the last to change the files on Dec 27, 2004.

The test result diff looks like:
11200: Below are the diffs between actual and expected results:
11201: -------------------------------------------------------
11202: *** r/mysqldump.result   Mon Jan  3 23:43:25 2005
11203: --- r/mysqldump.reject   Tue Jan  4 01:40:53 2005
11204: ***************
11205: *** 414,420 ****
11206:   
11207:   /*!40000 ALTER TABLE `t1` DISABLE KEYS */;
11208:   LOCK TABLES `t1` WRITE;
11209: ! INSERT INTO `t1` VALUES ('����');
11210:   UNLOCK TABLES;
11211:   /*!40000 ALTER TABLE `t1` ENABLE KEYS */;
11212:   
11213: --- 414,420 ----
11214:   
11215:   /*!40000 ALTER TABLE `t1` DISABLE KEYS */;
11216:   LOCK TABLES `t1` WRITE;
11217: ! INSERT INTO `t1` VALUES ('ÄÖÜß');
11218:   UNLOCK TABLES;
11219:   /*!40000 ALTER TABLE `t1` ENABLE KEYS */;
11220:   
11221: -------------------------------------------------------

How to repeat:
Build on effected platforms.
[5 Jan 2005 16:23] Lars Thalmann
The test inserts ascii char 0xC4 as _latin1 into a char() column.
According to r/mysqldump.result, the following should hold:

TEST    SHOULD OUTPUT    MYSQLDUMP ARGUMENTS
----    -------------    -------------------
1       0xC3 0x84        (none)
2       0xC4             --compatible=mysql323
3       0x8E             --compatible=mysql323 --default-character-set=cp850
4       0x8E             --default-character-set=cp850 --compatible=mysql323
5       0xC3 0x84        --default-character-set=utf8 --compatible=mysql323

Current bug is that test 2 also output 0xC3 0x84 on some (not all)
platforms.

It seems that through the 'mysql' program one always get 0xC4 back,
which seems fine.

As far as I can see, mysqldump only use the --compatible flag to
produce extra /*!4xxxx*/ comments in the dump.  It does not *directly*
affect how things are put into the INSERT statements.

Thus, it seems the /*!4xxxx*/ comments are parsed and executed in
mysqld and there must be some error in that execution.  It seems like
these comments control whether mysqld should behave as mysql323 when
it comes to the API.

On Brian and Joergs recommendation, I'm reassigning the report to 
you Bar, hope you can help with this.
[6 Jan 2005 17:36] Ingo Strüwing
Taking review.
[6 Jan 2005 18:56] Ingo Strüwing
The patch is good. I suggested just a small change in a comment.
[6 Jan 2005 19:03] Oleksandr Byelkin
Thank you for bugreport! Bugfix is pushed into our source repository.