Bug #50848 BACKPORT: The backup_xpfm_compat_*_lctn2 tests fail in porting tree
Submitted: 2 Feb 2010 18:51 Modified: 8 Feb 2010 20:18
Reporter: Chuck Bell Email Updates:
Status: Patch queued Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:5.4.4 OS:Microsoft Windows
Assigned to: Assigned Account CPU Architecture:Any

[2 Feb 2010 18:51] Chuck Bell
Description:
The lctn2 tests for cross platform tests are failing in PB for Windows platforms. The test failures are name mismatch for database names (similar to BUG#50628) and some commands are not executing properly due to database names not found (more case issues). 

Sample failure:

backup.backup_xpfm_compat_backup_lctn2   [ fail ]
        Test ended at 2010-02-02 01:19:28

CURRENT_TEST: backup.backup_xpfm_compat_backup_lctn2
'diff' is not recognized as an internal or external command,
operable program or batch file.
--- G:/pb2/test/sb_1-1278016-1265068343.28/mysql-5.6.0-beta-win-x86_64-test/mysql-test/suite/backup/r/backup_xpfm_compat_backup_lctn2.result	2010-02-02 02:15:45.000000000 +0300
+++ G:\pb2\test\sb_1-1278016-1265068343.28\mysql-5.6.0-beta-win-x86_64-test\mysql-test\suite\backup\r\backup_xpfm_compat_backup_lctn2.reject	2010-02-02 03:19:28.428988400 +0300
@@ -1546,15 +1546,15 @@
 WHERE TABLE_SCHEMA like 'bup%xpfm%compat%'
   ORDER BY LOWER(TABLE_SCHEMA), LOWER(TABLE_NAME);
 TABLE_SCHEMA	TABLE_NAME	VIEW_DEFINITION
-BupXPfmCompat_db3	view1	select `view1`.`c1` AS `c1`,`view2`.`c1` AS `c2` from `bup_xpfm_compat_db1`.`view1` join `bup_xpfm_compat_db2`.`view2` where (`view1`.`c1` = `view2`.`c1`)
-BupXPfmCompat_db3	view2	select `view1`.`c1` AS `c1`,`view2`.`c1` AS `c2` from (`bup_xpfm_compat_db1`.`view1` left join `bup_xpfm_compat_db2`.`view2` on((`view1`.`c1` = `view2`.`c1`)))
-BupXPfmCompat_db3	view3	select `view1`.`c1` AS `c1`,`view1`.`c2` AS `c2` from `bupxpfmcompat_db3`.`view1`
+bupxpfmcompat_db3	view1	select `view1`.`c1` AS `c1`,`view2`.`c1` AS `c2` from `bup_xpfm_compat_db1`.`view1` join `bup_xpfm_compat_db2`.`view2` where (`view1`.`c1` = `view2`.`c1`)
+bupxpfmcompat_db3	view2	select `view1`.`c1` AS `c1`,`view2`.`c1` AS `c2` from (`bup_xpfm_compat_db1`.`view1` left join `bup_xpfm_compat_db2`.`view2` on((`view1`.`c1` = `view2`.`c1`)))
+bupxpfmcompat_db3	view3	select `view1`.`c1` AS `c1`,`view1`.`c2` AS `c2` from `bupxpfmcompat_db3`.`view1`
 bup_xpfm_compat_db1	view1	select `bup_xpfm_compat_db1`.`table1`.`c13` AS `c1`,`bup_xpfm_compat_db1`.`table1`.`c48` AS `c2`,`bup_xpfm_compat_db1`.`table1`.`c13` in (select (`bup_xpfm_compat_db1`.`table1`.`c13` + 2) AS `c13+2` from `bup_xpfm_compat_db1`.`table1`) AS `c3`,`bup_xpfm_compat_db1`.`table1`.`c13` = all (select `bup_xpfm_compat_db1`.`table1`.`c13` AS `c13` from `bup_xpfm_compat_db1`.`table1`) AS `c4` from `bup_xpfm_compat_db1`.`table1`
 bup_xpfm_compat_db1	view2	select `view1`.`c2` AS `c2`,`view1`.`c3` AS `c3` from `bup_xpfm_compat_db1`.`view1`
 bup_xpfm_compat_db1	view3	select `view1`.`c3` AS `c3`,`view1`.`c4` AS `c4` from `bup_xpfm_compat_db1`.`view1`
-BUP_XPFM_COMPAT_DB2	view1	select connection_id() AS `c1`,pi() AS `c2`,current_user() AS `c3`,rpad(version(),40,' ') AS `c4`
-BUP_XPFM_COMPAT_DB2	view2	select `bup_xpfm_compat_db2`.`table2`.`c13` AS `c1`,`bup_xpfm_compat_db2`.`table2`.`c48` AS `c2` from `bup_xpfm_compat_db2`.`table2` join `bup_xpfm_compat_db2`.`table3` union all select `bup_xpfm_compat_db2`.`table2`.`c13` AS `c13`,`bup_xpfm_compat_db2`.`table2`.`c48` AS `c48` from `bup_xpfm_compat_db2`.`table2` join `bup_xpfm_compat_db2`.`table3`
-BUP_XPFM_COMPAT_DB2	view3	select `view1`.`c3` AS `c3`,`view1`.`c4` AS `c4` from `bup_xpfm_compat_db2`.`view1`
+bup_xpfm_compat_db2	view1	select connection_id() AS `c1`,pi() AS `c2`,current_user() AS `c3`,rpad(version(),40,' ') AS `c4`
+bup_xpfm_compat_db2	view2	select `bup_xpfm_compat_db2`.`table2`.`c13` AS `c1`,`bup_xpfm_compat_db2`.`table2`.`c48` AS `c2` from `bup_xpfm_compat_db2`.`table2` join `bup_xpfm_compat_db2`.`table3` union all select `bup_xpfm_compat_db2`.`table2`.`c13` AS `c13`,`bup_xpfm_compat_db2`.`table2`.`c48` AS `c48` from `bup_xpfm_compat_db2`.`table2` join `bup_xpfm_compat_db2`.`table3`
+bup_xpfm_compat_db2	view3	select `view1`.`c3` AS `c3`,`view1`.`c4` AS `c4` from `bup_xpfm_compat_db2`.`view1`
 SELECT ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_DEFINITION
 FROM INFORMATION_SCHEMA.ROUTINES
 WHERE ROUTINE_SCHEMA like 'bup%xpfm%compat%'
@@ -1627,7 +1627,7 @@
 WHERE TRIGGER_SCHEMA like 'bup%xpfm%compat%'
   ORDER BY LOWER(TRIGGER_SCHEMA), LOWER(TRIGGER_NAME);
 TRIGGER_SCHEMA	TRIGGER_NAME	ACTION_TIMING	EVENT_MANIPULATION	EVENT_OBJECT_SCHEMA	EVENT_OBJECT_TABLE	ACTION_STATEMENT
-BupXPfmCompat_db3	trigger1	AFTER	INSERT	BupXPfmCompat_db3	table1	BEGIN
+bupxpfmcompat_db3	trigger1	AFTER	INSERT	bupxpfmcompat_db3	table1	BEGIN
 DELETE FROM BupXPfmCompat_db3.TABLE2
 WHERE BupXPfmCompat_db3.TABLE2.c13 = NEW.c13;
 END
@@ -1635,7 +1635,7 @@
 DELETE FROM BupXPfmCompat_db3.table1
 WHERE BupXPfmCompat_db3.table1.c13 = NEW.c13;
 END
-BupXPfmCompat_db3	TrigGer3	AFTER	INSERT	BupXPfmCompat_db3	TaBle3	BEGIN
+bupxpfmcompat_db3	TrigGer3	AFTER	INSERT	bupxpfmcompat_db3	TaBle3	BEGIN
 INSERT INTO bup_xpfm_compat_db1.table1 SET c13 = 53;
 END
 bup_xpfm_compat_db1	trigger1	AFTER	INSERT	bup_xpfm_compat_db1	table1	BEGIN
@@ -1649,7 +1649,7 @@
 bup_xpfm_compat_db1	TrigGer3	AFTER	INSERT	bup_xpfm_compat_db1	TaBle3	BEGIN
 INSERT INTO BUP_XPFM_COMPAT_DB2.TABLE2 SET c13 = 51;
 END
-BUP_XPFM_COMPAT_DB2	trigger1	AFTER	INSERT	BUP_XPFM_COMPAT_DB2	table1	BEGIN
+bup_xpfm_compat_db2	trigger1	AFTER	INSERT	bup_xpfm_compat_db2	table1	BEGIN
 DELETE FROM BUP_XPFM_COMPAT_DB2.TABLE2
 WHERE BUP_XPFM_COMPAT_DB2.TABLE2.c13 = NEW.c13;
 END
@@ -1657,7 +1657,7 @@
 DELETE FROM BUP_XPFM_COMPAT_DB2.table1
 WHERE BUP_XPFM_COMPAT_DB2.table1.c13 = NEW.c13;
 END
-BUP_XPFM_COMPAT_DB2	TrigGer3	AFTER	INSERT	BUP_XPFM_COMPAT_DB2	TaBle3	BEGIN
+bup_xpfm_compat_db2	TrigGer3	AFTER	INSERT	bup_xpfm_compat_db2	TaBle3	BEGIN
 INSERT INTO BupXPfmCompat_db3.TaBle3 SET c13 = 52;
 END
 SHOW CREATE TRIGGER bup_xpfm_compat_db1.trigger1;
@@ -1889,8 +1889,6 @@
     Event     'BUP_XPFM_COMPAT_DB2'.'EVENT2'
     Event     'BUP_XPFM_COMPAT_DB2'.'EvEnt3'
     Trigger   'BUP_XPFM_COMPAT_DB2'.'TRIGGER2'
-    Trigger   'BUP_XPFM_COMPAT_DB2'.'TrigGer3'
-    Trigger   'BUP_XPFM_COMPAT_DB2'.'trigger1'
     Privilege 'BUP_XPFM_COMPAT_DB2'.'<empty>'
     Privilege 'BUP_XPFM_COMPAT_DB2'.'<empty>'
     Privilege 'BUP_XPFM_COMPAT_DB2'.'<empty>'
@@ -1930,8 +1928,6 @@
     Event     'BupXPfmCompat_db3'.'EVENT2'
     Event     'BupXPfmCompat_db3'.'EvEnt3'
     Trigger   'BupXPfmCompat_db3'.'TRIGGER2'
-    Trigger   'BupXPfmCompat_db3'.'TrigGer3'
-    Trigger   'BupXPfmCompat_db3'.'trigger1'
     Privilege 'BupXPfmCompat_db3'.'<empty>'
     Privilege 'BupXPfmCompat_db3'.'<empty>'
     Privilege 'BupXPfmCompat_db3'.'<empty>'
@@ -2631,7 +2627,7 @@
 56 GRANT UPDATE ON `bup_xpfm_compat_db1`.* TO 'no_user'@'%'
 '
 

How to repeat:
./mysql-test-run.pl backup_xpfm_compat_backup_lcnt2

Suggested fix:
Change result file for database name differences.
Correct calls for steps failing due to name differences.
[4 Feb 2010 17:18] 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/99330

3083 Chuck Bell	2010-02-04
      BUG#50848 : BACKPORT: The backup_xpfm_compat_*_lctn2 tests fail in porting tree
      
      The lctn2 tests for cross platform tests are failing in PB for Windows platforms. The
      test failures are name mismatch for database names (similar to BUG#50628) and some
      commands are not executing properly due to database names not found (more case issues).
      
      The cause of the database name case differences is acknowledged and a bug
      has been opened to deal with that (BUG#50268). This patch accepts the behavior
      until such time as the bug is resolved.
      
      The cause of the missing triggers is a problem with the query in si_objects
      that returns a list of triggers for a database. This is corrected by converting
      the names to lower case first. This forces the code to look for triggers by lower
      case names in the OS which is currently how the compare works. This, again, is an
      acknowledged difference in how the code works between 5.X and 6.0 versions. This
      behaviour has been reported as BUG#50924.
     @ mysql-test/suite/backup/r/backup_xpfm_compat_backup_lctn2.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_xpfm_compat_restore_lctn2.result
        Corrected result file.
     @ sql/si_objects.cc
        On a system with LCTN = 2, the query in si_objects fails to
        return all of the triggers. Forcing the names to lower case fixes
        the query and all triggers are returned.
[4 Feb 2010 19:49] Hema Sridharan
Patch approved.
[8 Feb 2010 20:05] 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/99627

3084 Chuck Bell	2010-02-08
      BUG#50848 : BACKPORT: The backup_xpfm_compat_*_lctn2 tests fail 
                  in porting tree
      
      The lctn2 tests for cross platform tests are failing in PB for 
      Windows platforms. The test failures are name mismatch for 
      database names (similar to BUG#50628) and some commands are not 
      executing properly due to database names not found (more case 
      issues).
      
      The cause of the database name case differences is acknowledged 
      and a bug has been opened to deal with that (BUG#50268). This 
      patch accepts the behavior until such time as the bug is resolved.
      
      The cause of the missing triggers is a problem with the query 
      in si_objects that returns a list of triggers for a database. 
      This is corrected by converting the names to lower case first. 
      This forces the code to look for triggers by lower case names 
      in the OS which is currently how the compare works. This, again, 
      is an acknowledged difference in how the code works between 5.X 
      and 6.0 versions. This behaviour has been reported as BUG#50924.
     @ mysql-test/suite/backup/r/backup_xpfm_compat_backup_lctn2.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_xpfm_compat_restore_lctn2.result
        Corrected result file.
     @ sql/si_objects.cc
        On a system with LCTN = 2, the query in si_objects fails to
        return all of the triggers. Forcing the names to lower case fixes
        the query and all triggers are returned.