Bug #37353 The test backup_views produces session specific data in the results
Submitted: 11 Jun 2008 18:33 Modified: 7 Aug 2008 15:18
Reporter: Chuck Bell Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:6.0.6 OS:Any
Assigned to: Jørgen Løland CPU Architecture:Any

[11 Jun 2008 18:33] Chuck Bell
Description:
The test 'backup_views' is producing session-specific results.

How to repeat:
Run MTR:

main.backup_views              [ fail ]

--- d:/source/bzr/mysql-6.0-testconv/mysql-test/r/backup_views.result   2008-06-
11 20:52:32.911357800 +0300
+++ d:\source\bzr\mysql-6.0-testconv\mysql-test\r\backup_views.reject   2008-06-
11 21:28:22.393357800 +0300
@@ -214,19 +214,19 @@
 backup data
 BACKUP DATABASE bup_db1, bup_db2 TO 'bup_objectview.bak';
 backup_id
-1
+38
 BACKUP DATABASE bup_db1 TO 'bup_objectview1.bak';
 backup_id
-2
+39
 BACKUP DATABASE bup_db2 TO 'bup_objectview2.bak';
 backup_id
-3
+40
 dropping  database.
 DROP DATABASE bup_db1;
 DROP DATABASE bup_db2;
 RESTORE FROM 'bup_objectview.bak';
 backup_id
-4
+41
 showing objects and create statements
 SHOW CREATE DATABASE bup_db1;;
 Database       bup_db1
@@ -368,7 +368,7 @@
 Restoring Database
 RESTORE FROM 'bup_objectview.bak';
 backup_id
-5
+42
 USE bup_db1;
 ALTER TABLE t1 CHANGE id id tinyint not null;
 SHOW CREATE TABLE t1;;
@@ -420,12 +420,12 @@
 aa8    27      undergrad
 BACKUP DATABASE bup_db1, bup_db2 TO 'bup_objectview3.bak';
 backup_id
-6
+43
 DROP DATABASE bup_db1;
 DROP DATABASE bup_db2;
 RESTORE FROM 'bup_objectview3.bak';
 backup_id
-7
+44
 USE bup_db2;
 SELECT * FROM v3;
 name   age     education

Suggested fix:
Use replace_column command for all backup and restore commands such as:

# Backup the database with fkey constraints preserved.
--echo Backup the database originally.
--replace_column 1 #
BACKUP DATABASE backup_fkey TO 'backup_fkey_orig.bak';
 
# Restore the database and ensure there are no errors.
--echo Now restore the database.
--replace_column 1 #
RESTORE FROM 'backup_fkey.bak';
[12 Jun 2008 9:51] 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/47774

2633 Jorgen Loland	2008-06-12
      Bug#37353 "The test backup_views produces session specific data in the results"
      
      Fix - remove session specific results by adding replace_column in the test file.
[12 Jun 2008 9:55] Rafal Somla
Good to push.
[12 Jun 2008 9:59] 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/47775

2633 Jorgen Loland	2008-06-12
      Bug#37353 "The test backup_views produces session specific data in the results"
      
      Fix - remove session specific results by adding replace_column in the test file.
[7 Aug 2008 15:18] Paul DuBois
Test case change. No changelog entry needed.
[14 Sep 2008 2:05] Bugs System
Pushed into 6.0.6-alpha  (revid:jorgen.loland@sun.com-20080612095535-yrjomiqid0uc49k3) (version source revid:hakan@mysql.com-20080716160034-sdexuyp3qow7zlc6) (pib:3)