Bug #58913 rpl_lcase_tblnames_rewrite_db & rpl_stm_lcase_tblnames fails on Mac OSX
Submitted: 14 Dec 2010 9:41 Modified: 18 Dec 2010 13:09
Reporter: Alexander Nozdrin Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Replication Severity:S7 (Test Cases)
Version:5.6 OS:MacOS
Assigned to: Luis Soares CPU Architecture:Any

[14 Dec 2010 9:41] Alexander Nozdrin
Description:
rpl.rpl_row_lcase_tblnames [ fail ]
        Test ended at 2010-12-11 07:37:31

CURRENT_TEST: rpl.rpl_row_lcase_tblnames
--- /Volumes/hd2/test/sb_1-2654952-1292040118.72/mysql-5.6.1-m5-osx10.5-x86-test/mysql-test/suite/rpl/r/rpl_row_lcase_tblnames.result	2010-12-10 19:06:28.000000000 +0300
+++ /Volumes/hd2/test/sb_1-2654952-1292040118.72/mysql-5.6.1-m5-osx10.5-x86-test/mysql-test/suite/rpl/r/rpl_row_lcase_tblnames.reject	2010-12-11 09:37:31.000000000 +0300
@@ -19,7 +19,7 @@
 CREATE TABLE T2 (b int) ENGINE=InnoDB;
 CREATE TABLE T3 (txt TEXT);
 show tables;
-Tables_in_BUG_37656
+Tables_in_bug_37656
 T1
 T2
 T3

rpl.rpl_lcase_tblnames_rewrite_db [ fail ]
        Test ended at 2010-12-11 05:09:36

CURRENT_TEST: rpl.rpl_lcase_tblnames_rewrite_db
--- /Volumes/hd2/test/sb_1-2654952-1292040118.72/mysql-5.6.1-m5-osx10.5-x86-test/mysql-test/suite/rpl/r/rpl_lcase_tblnames_rewrite_db.result	2010-12-10 19:06:28.000000000 +0300
+++ /Volumes/hd2/test/sb_1-2654952-1292040118.72/mysql-5.6.1-m5-osx10.5-x86-test/mysql-test/suite/rpl/r/rpl_lcase_tblnames_rewrite_db.reject	2010-12-11 07:09:36.000000000 +0300
@@ -17,7 +17,7 @@
 INSERT INTO T1 VALUES (1);
 ### assertion: master contains capitalized case table
 SHOW TABLES;
-Tables_in_B37656
+Tables_in_b37656
 T1
 use bug37656;
 ### assertion: slave contains lowered case table

How to repeat:
Started on the "luis.soares@orac... 2010-12-10 21:06:51" build in daily-trunk-bugfixing.

Log: http://pb2.norway.sun.com/web.py?action=archive_download&archive_id=2656271&pretty=please
[14 Dec 2010 13:27] Bjørn Munch
This would be a typical case for the use of the new test command
--lowercase_result, *if* the result here is expected.
[15 Dec 2010 0:10] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/126865

3435 Luis Soares	2010-12-15
      BuG#58913: rpl_lcase_tblnames_rewrite_db & rpl_stm_lcase_tblnames 
                 fails on Mac OSX
      
      The following three test cases fail on Mac OSX because they 
      assume that the lower_case_table_names is set to 0 on the master
      by default (which is not the case on MacOSX - defaults to 2 - 
      nor on Windows - defaults to 1): 
      
        - rpl.rpl_row_lcase_tblnames
        - rpl.rpl_stm_lcase_tblnames
        - rpl.rpl_lcase_tblnames_rewrite_db
      
      This causes a result mismatch when the tests are run on such
      platforms. However, the tests are configured to be skipped on
      windows, so this issue does not show up on that platform, only 
      on Mac OSX.
      
      We fix this by forcing MTR to start the master with 
      lower_case_table_names set to 0 always.
[15 Dec 2010 8:36] Bjørn Munch
Did you see my comment about --lowercase_result?

That would be a more "light weight" solution, the committed fix will likely result in extra server restarts. Just add

--lowercase_result

Immediately before the statements that cause the mismatch, then run --record to make a new result file.

This is precisely what --lowercase_result was made for, I would love to see it used.... :-)

Forcing lower_case_table_names changes the test, IMHO one should not change the server's behavior unless that is what is being tested.

--lowercase_result OTOH does not change what the test does, just avoids false negatives.
[15 Dec 2010 10:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/126904

3435 Luis Soares	2010-12-15
      BuG#58913: rpl_lcase_tblnames_rewrite_db & rpl_stm_lcase_tblnames 
                 fails on Mac OSX
      
      The following three test cases fail on Mac OSX because they 
      assume that the lower_case_table_names is set to 0 on the master
      by default (which is not the case on MacOSX - defaults to 2 - 
      nor on Windows - defaults to 1): 
      
        - rpl.rpl_row_lcase_tblnames
        - rpl.rpl_stm_lcase_tblnames
        - rpl.rpl_lcase_tblnames_rewrite_db
      
      This causes a result mismatch when the tests are run on such
      platforms. However, the tests are configured to be skipped on
      windows, so this issue does not show up on that platform, only 
      on Mac OSX.
      
      We fix this by masking out the part of the result that is 
      different on Mac OSX and other platforms.
[15 Dec 2010 10:33] Luis Soares
Bjorn,
  lowercase_result cannot be used here, because only one line from the
result should change, the others must remain in their current case. This
is because MacOSX defaults to lower_case_table_names=2 as opposed to Linux
which defaults to 0.
[15 Dec 2010 11:17] Bjørn Munch
This looks good, a minimal impact fix.
[15 Dec 2010 14:27] Luis Soares
Queued in mysql-trunk-bugfixing.
[17 Dec 2010 12:55] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:georgi.kodinov@oracle.com-20101217125013-y8pb3az32rtbplc9) (version source revid:luis.soares@oracle.com-20101215142637-ubj4dkyn550x36m3) (merge vers: 5.6.1) (pib:24)
[18 Dec 2010 13:09] Jon Stephens
Changes affect testing only. Closed without further action.