List:Commits« Previous MessageNext Message »
From:cbell Date:November 29 2007 2:26pm
Subject:bk commit into 6.0 tree (cbell:1.2692) WL#4116
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of cbell. When cbell does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-11-29 09:26:16-05:00, cbell@mysql_cab_desk. +18 -0
  WL#4116 : Online Backup: Record Online Backup Progress
  
   Patch 3 of 3
  
   This patch contains updated tests and results for the backup
   progress code changes.

  mysql-test/r/backup.result@stripped, 2007-11-29 09:25:59-05:00, cbell@mysql_cab_desk. +6 -24
    WL#4116 : Online Backup: Record Online Backup Progress
    
    New result file.

  mysql-test/r/backup_commit_blocker.result@stripped, 2007-11-29 09:26:00-05:00, cbell@mysql_cab_desk. +12 -36
    WL#4116 : Online Backup: Record Online Backup Progress
    
    New result file.

  mysql-test/r/backup_ddl_blocker.result@stripped, 2007-11-29 09:26:01-05:00, cbell@mysql_cab_desk. +41 -122
    WL#4116 : Online Backup: Record Online Backup Progress
    
    New result file.

  mysql-test/r/backup_fkey.result@stripped, 2007-11-29 09:26:01-05:00, cbell@mysql_cab_desk. +14 -42
    WL#4116 : Online Backup: Record Online Backup Progress
    
    New result file.

  mysql-test/r/backup_no_data.result@stripped, 2007-11-29 09:26:02-05:00, cbell@mysql_cab_desk. +14 -42
    WL#4116 : Online Backup: Record Online Backup Progress
    
    New result file.

  mysql-test/r/backup_no_engine.result@stripped, 2007-11-29 09:26:03-05:00, cbell@mysql_cab_desk. +4 -12
    WL#4116 : Online Backup: Record Online Backup Progress
    
    New result file.

  mysql-test/r/backup_progress.result@stripped, 2007-11-29 09:26:11-05:00, cbell@mysql_cab_desk. +141 -0
    WL#4116 : Online Backup: Record Online Backup Progress
    
    New result file.

  mysql-test/r/backup_progress.result@stripped, 2007-11-29 09:26:11-05:00, cbell@mysql_cab_desk. +0 -0

  mysql-test/r/backup_security.result@stripped, 2007-11-29 09:26:03-05:00, cbell@mysql_cab_desk. +9 -24
    WL#4116 : Online Backup: Record Online Backup Progress
    
    New result file.

  mysql-test/r/backup_snapshot.result@stripped, 2007-11-29 09:26:04-05:00, cbell@mysql_cab_desk. +8 -24
    WL#4116 : Online Backup: Record Online Backup Progress
    
    New result file.

  mysql-test/t/backup.test@stripped, 2007-11-29 09:26:05-05:00, cbell@mysql_cab_desk. +6 -2
    WL#4116 : Online Backup: Record Online Backup Progress
    
    Test modified to make use of new reporting feature.

  mysql-test/t/backup_commit_blocker.test@stripped, 2007-11-29 09:26:05-05:00, cbell@mysql_cab_desk. +18 -2
    WL#4116 : Online Backup: Record Online Backup Progress
    
    Test modified to make use of new reporting feature.

  mysql-test/t/backup_ddl_blocker.test@stripped, 2007-11-29 09:26:06-05:00, cbell@mysql_cab_desk. +31 -3
    WL#4116 : Online Backup: Record Online Backup Progress
    
    Test modified to make use of new reporting feature.

  mysql-test/t/backup_fkey.test@stripped, 2007-11-29 09:26:07-05:00, cbell@mysql_cab_desk. +7 -0
    WL#4116 : Online Backup: Record Online Backup Progress
    
    Test modified to make use of new reporting feature.

  mysql-test/t/backup_no_data.test@stripped, 2007-11-29 09:26:07-05:00, cbell@mysql_cab_desk. +7 -0
    WL#4116 : Online Backup: Record Online Backup Progress
    
    Test modified to make use of new reporting feature.

  mysql-test/t/backup_no_engine.test@stripped, 2007-11-29 09:26:08-05:00, cbell@mysql_cab_desk. +2 -0
    WL#4116 : Online Backup: Record Online Backup Progress
    
    Test modified to make use of new reporting feature.

  mysql-test/t/backup_progress.test@stripped, 2007-11-29 09:26:10-05:00, cbell@mysql_cab_desk. +226 -0
    WL#4116 : Online Backup: Record Online Backup Progress
    
    New test for backup progress methods.

  mysql-test/t/backup_progress.test@stripped, 2007-11-29 09:26:10-05:00, cbell@mysql_cab_desk. +0 -0

  mysql-test/t/backup_security.test@stripped, 2007-11-29 09:26:09-05:00, cbell@mysql_cab_desk. +7 -0
    WL#4116 : Online Backup: Record Online Backup Progress
    
    Test modified to make use of new reporting feature.

  mysql-test/t/backup_snapshot.test@stripped, 2007-11-29 09:26:09-05:00, cbell@mysql_cab_desk. +12 -2
    WL#4116 : Online Backup: Record Online Backup Progress
    
    Test modified to make use of new reporting feature.

diff -Nrup a/mysql-test/r/backup.result b/mysql-test/r/backup.result
--- a/mysql-test/r/backup.result	2007-11-09 16:32:08 -05:00
+++ b/mysql-test/r/backup.result	2007-11-29 09:25:59 -05:00
@@ -56,22 +56,13 @@ LOCK TABLES `tasking` WRITE;
 INSERT INTO `tasking` VALUES ('333445555','405',23),('123763153','405',33.5),('921312388','601',44),('800122337','300',13),('820123637','300',9.5),('830132335','401',8.5),('333445555','300',11),('921312388','500',13),('800122337','300',44),('820123637','401',500.5),('830132335','400',12),('333445665','600',300.25),('123654321','607',444.75),('123456789','300',1000);
 UNLOCK TABLES;
 BACKUP DATABASE db1,db2 TO 'test.ba';
-Backup Summary
- header     =       52 bytes
- meta-data  =      807 bytes
- data       =      639 bytes
-              --------------
- total            1498 bytes
+backup_id
+#
 DROP DATABASE db1;
 DROP DATABASE db2;
 USE mysql;
 RESTORE FROM 'test.ba';
-Restore Summary
- header     =       52 bytes
- meta-data  =      807 bytes
- data       =      639 bytes
-              --------------
- total            1498 bytes
+backup_id	#
 USE db1;
 SHOW TABLES;
 Tables_in_db1
@@ -318,20 +309,11 @@ Running the client:
 Chuck@linux:~> mysql -uroot -p
 Enter password:
 BACKUP DATABASE bup_default TO "bup_default.bak";
-Backup Summary
- header     =       43 bytes
- meta-data  =      890 bytes
- data       =     7368 bytes
-              --------------
- total            8301 bytes
+backup_id
+#
 DROP DATABASE bup_default;
 RESTORE FROM "bup_default.bak";
-Restore Summary
- header     =       43 bytes
- meta-data  =      890 bytes
- data       =     7368 bytes
-              --------------
- total            8301 bytes
+backup_id	#
 SELECT * FROM bup_default.t1;
 a
 1
diff -Nrup a/mysql-test/r/backup_commit_blocker.result b/mysql-test/r/backup_commit_blocker.result
--- a/mysql-test/r/backup_commit_blocker.result	2007-11-15 20:29:32 -05:00
+++ b/mysql-test/r/backup_commit_blocker.result	2007-11-29 09:26:00 -05:00
@@ -85,12 +85,8 @@ con3: Completing transaction
 UPDATE bup_commit_blocker.t3 SET col_a = "con4: 05 CHANGED" WHERE col_a LIKE '05%';
 UPDATE bup_commit_blocker.t3 SET col_a = "con4: 06 CHANGED" WHERE col_a LIKE '06%';
 COMMIT;
-Backup Summary
- header     =       36 bytes
- meta-data  =      284 bytes
- data       =      471 bytes
-              --------------
- total             791 bytes
+backup_id
+#
 con1: Showing data after updates and backup
 SELECT * FROM bup_commit_blocker.t1;
 col_a
@@ -120,12 +116,8 @@ DROP TABLE bup_commit_blocker.t2;
 DROP TABLE bup_commit_blocker.t3;
 con1: Restoring the database
 RESTORE FROM "bup_commit_blocker.bak";
-Restore Summary
- header     =       36 bytes
- meta-data  =      284 bytes
- data       =      471 bytes
-              --------------
- total             791 bytes
+backup_id
+#
 con1: Showing the data (no new data should be here).
 SELECT * FROM bup_commit_blocker.t1;
 col_a
@@ -216,12 +208,8 @@ release_lock("backup_commit_blocker")
 NULL
 con6: Completing statement
 con7: Completing statement
-Backup Summary
- header     =       28 bytes
- meta-data  =       95 bytes
- data       =       50 bytes
-              --------------
- total             173 bytes
+backup_id
+#
 con1: Showing data after updates and backup
 SELECT * FROM bup_commit_blocker.t5;
 col_a
@@ -234,12 +222,8 @@ con1: Dropping the database
 DROP TABLE bup_commit_blocker.t5;
 con1: Restoring the database
 RESTORE FROM "bup_commit_blocker.bak";
-Restore Summary
- header     =       28 bytes
- meta-data  =       95 bytes
- data       =       50 bytes
-              --------------
- total             173 bytes
+backup_id
+#
 con1: Showing the data (no new data should be here).
 SELECT * FROM bup_commit_blocker.t5;
 col_a
@@ -366,12 +350,8 @@ UPDATE bup_commit_blocker.t3 SET col_a =
 UPDATE bup_commit_blocker.t3 SET col_a = "con4: 06 CHANGED" WHERE col_a LIKE '06%';
 COMMIT;
 con7: Completing statement
-Backup Summary
- header     =       43 bytes
- meta-data  =      377 bytes
- data       =      521 bytes
-              --------------
- total             941 bytes
+backup_id
+#
 con1: Showing data after updates and backup
 SELECT * FROM bup_commit_blocker.t1;
 col_a
@@ -408,12 +388,8 @@ DROP TABLE bup_commit_blocker.t3;
 DROP TABLE bup_commit_blocker.t5;
 con1: Restoring the database
 RESTORE FROM "bup_commit_blocker.bak";
-Restore Summary
- header     =       43 bytes
- meta-data  =      377 bytes
- data       =      521 bytes
-              --------------
- total             941 bytes
+backup_id
+#
 con1: Showing the data (no new data should be here).
 SELECT * FROM bup_commit_blocker.t1;
 col_a
diff -Nrup a/mysql-test/r/backup_ddl_blocker.result b/mysql-test/r/backup_ddl_blocker.result
--- a/mysql-test/r/backup_ddl_blocker.result	2007-11-23 08:27:44 -05:00
+++ b/mysql-test/r/backup_ddl_blocker.result	2007-11-29 09:26:01 -05:00
@@ -50,12 +50,8 @@ con2: Completing DDL
 con3: Completing DDL
 con4: Completing DDL
 con5: Completing DDL
-Backup Summary
- header     =       36 bytes
- meta-data  =      316 bytes
- data       =      162 bytes
-              --------------
- total             514 bytes
+backup_id
+#
 
 Verifying Test 1 results for backup.
 
@@ -79,12 +75,8 @@ DROP TABLE bup_ddl_blocker.t1, bup_ddl_b
 bup_ddl_blocker.t3, bup_ddl_blocker.t4;
 con1: Restoring the database
 RESTORE FROM "bup_ddl_blocker.bak";
-Restore Summary
- header     =       36 bytes
- meta-data  =      316 bytes
- data       =      162 bytes
-              --------------
- total             514 bytes
+backup_id
+#
 con1: Showing columns that were backed up
 con1: Table t3 should not be in restored data.
 con1: Table t4 should not have new column in restored data.
@@ -125,12 +117,8 @@ INSERT INTO bup_ddl_blocker.t4 VALUES ("
 INSERT INTO bup_ddl_blocker.t4 VALUES ("03 Some data to test");
 DROP TABLE bup_ddl_blocker.t1, bup_ddl_blocker.t3;
 BACKUP DATABASE bup_ddl_blocker to 'bup_ddl_blocker_orig.bak';
-Backup Summary
- header     =       29 bytes
- meta-data  =      190 bytes
- data       =      162 bytes
-              --------------
- total             381 bytes
+backup_id
+#
 con6: Getting lock on DDL in progress.
 SELECT get_lock("DDL_in_progress", 0);
 get_lock("DDL_in_progress", 0)
@@ -159,12 +147,8 @@ con2: Completing DDL
 con3: Completing DDL
 con4: Completing DDL
 con5: Completing DDL
-Restore Summary
- header     =       29 bytes
- meta-data  =      190 bytes
- data       =      162 bytes
-              --------------
- total             381 bytes
+backup_id
+#
 
 Verifying Test 1 results for restore.
 
@@ -239,12 +223,8 @@ con4: Completing DDL
 con5: Completing DDL
 Table	Op	Msg_type	Msg_text
 bup_ddl_blocker.t4	repair	status	OK
-Backup Summary
- header     =       41 bytes
- meta-data  =      379 bytes
- data       =      324 bytes
-              --------------
- total             744 bytes
+backup_id
+#
 
 Verifying Test 2 results for backup.
 
@@ -261,12 +241,8 @@ DROP TABLE bup_ddl_blocker.t01, bup_ddl_
 bup_ddl_blocker.t03, bup_ddl_blocker.t4;
 con1: Restoring the database
 RESTORE FROM "bup_ddl_blocker.bak";
-Restore Summary
- header     =       41 bytes
- meta-data  =      379 bytes
- data       =      324 bytes
-              --------------
- total             744 bytes
+backup_id
+#
 con1: Showing columns that were backed up
 con1: Table t01 should be in restore
 con1: Table t03 should not be in restore
@@ -301,12 +277,8 @@ INSERT INTO bup_ddl_blocker.t4 VALUES ("
 INSERT INTO bup_ddl_blocker.t4 VALUES ("02 Some data to test");
 INSERT INTO bup_ddl_blocker.t4 VALUES ("03 Some data to test");
 BACKUP DATABASE bup_ddl_blocker to 'bup_ddl_blocker_orig.bak';
-Backup Summary
- header     =       40 bytes
- meta-data  =      378 bytes
- data       =      324 bytes
-              --------------
- total             742 bytes
+backup_id
+#
 con6: Getting lock on DDL in progress.
 SELECT get_lock("DDL_in_progress", 0);
 get_lock("DDL_in_progress", 0)
@@ -339,12 +311,8 @@ con4: Completing DDL
 con5: Completing DDL
 Table	Op	Msg_type	Msg_text
 bup_ddl_blocker.t4	repair	status	OK
-Restore Summary
- header     =       40 bytes
- meta-data  =      378 bytes
- data       =      324 bytes
-              --------------
- total             742 bytes
+backup_id
+#
 
 Verifying Test 2 results for restore.
 
@@ -411,12 +379,8 @@ con4: Completing DDL
 Table	Op	Msg_type	Msg_text
 bup_ddl_blocker.t3	optimize	status	OK
 con5: Completing DDL
-Backup Summary
- header     =       36 bytes
- meta-data  =      284 bytes
- data       =      243 bytes
-              --------------
- total             563 bytes
+backup_id
+#
 
 Verifying Test 3 results for backup.
 
@@ -430,12 +394,8 @@ con1: Dropping the database tables
 DROP TABLE bup_ddl_blocker.t1, bup_ddl_blocker.t3;
 con1: Restoring the database
 RESTORE FROM "bup_ddl_blocker.bak";
-Restore Summary
- header     =       36 bytes
- meta-data  =      284 bytes
- data       =      243 bytes
-              --------------
- total             563 bytes
+backup_id
+#
 con1: Showing columns that were backed up
 con1: Table t2 should not be in restore
 use bup_ddl_blocker;
@@ -468,12 +428,8 @@ INSERT INTO bup_ddl_blocker.t4 VALUES ("
 INSERT INTO bup_ddl_blocker.t4 VALUES ("02 Some data to test");
 INSERT INTO bup_ddl_blocker.t4 VALUES ("03 Some data to test");
 BACKUP DATABASE bup_ddl_blocker to 'bup_ddl_blocker_orig.bak';
-Backup Summary
- header     =       40 bytes
- meta-data  =      378 bytes
- data       =      324 bytes
-              --------------
- total             742 bytes
+backup_id
+#
 con6: Getting lock on DDL in progress.
 SELECT get_lock("DDL_in_progress", 0);
 get_lock("DDL_in_progress", 0)
@@ -506,12 +462,8 @@ con4: Completing DDL
 Table	Op	Msg_type	Msg_text
 bup_ddl_blocker.t3	optimize	status	OK
 con5: Completing DDL
-Restore Summary
- header     =       40 bytes
- meta-data  =      378 bytes
- data       =      324 bytes
-              --------------
- total             742 bytes
+backup_id
+#
 
 Verifying Test 3 results for restore.
 
@@ -575,12 +527,8 @@ con2: Completing DDL
 con3: Completing DDL
 con4: Completing DDL
 con5: Completing DDL
-Backup Summary
- header     =       81 bytes
- meta-data  =      384 bytes
- data       =      324 bytes
-              --------------
- total             789 bytes
+backup_id
+#
 
 Verifying Test 4 results for backup.
 
@@ -595,12 +543,8 @@ DROP DATABASE bup_ddl_blocker_1;
 DROP DATABASE bup_ddl_blocker_3;
 con1: Restoring the database
 RESTORE FROM "bup_ddl_blocker.bak";
-Restore Summary
- header     =       81 bytes
- meta-data  =      384 bytes
- data       =      324 bytes
-              --------------
- total             789 bytes
+backup_id
+#
 con1: Showing databases that were backed up
 con1: bup_ddl_blocker_2 and bup_ddl_blocker_3 are not present
 SHOW DATABASES LIKE 'bup_ddl_blocker_%';
@@ -636,12 +580,8 @@ Database (bup_ddl_blocker_%)
 bup_ddl_blocker_2
 bup_ddl_blocker_4
 BACKUP DATABASE bup_ddl_blocker_2, bup_ddl_blocker_4 to 'bup_ddl_blocker_orig.bak';
-Backup Summary
- header     =       52 bytes
- meta-data  =      192 bytes
- data       =      162 bytes
-              --------------
- total             406 bytes
+backup_id
+#
 con6: Getting lock on DDL in progress.
 SELECT get_lock("DDL_in_progress", 0);
 get_lock("DDL_in_progress", 0)
@@ -670,12 +610,8 @@ con2: Completing DDL
 con3: Completing DDL
 con4: Completing DDL
 con5: Completing DDL
-Restore Summary
- header     =       52 bytes
- meta-data  =      192 bytes
- data       =      162 bytes
-              --------------
- total             406 bytes
+backup_id
+#
 
 Verifying Test 4 results for restore.
 
@@ -738,12 +674,8 @@ con2: Completing DDL
 con3: Completing DDL
 con4: Completing DDL
 con5: Completing DDL
-Backup Summary
- header     =       85 bytes
- meta-data  =      478 bytes
- data       =      324 bytes
-              --------------
- total             887 bytes
+backup_id
+#
 
 Verifying Test 5 results for backup.
 
@@ -771,12 +703,8 @@ DROP DATABASE bup_ddl_blocker_2;
 DROP DATABASE bup_ddl_blocker_4;
 con1: Restoring the database
 RESTORE FROM "bup_ddl_blocker.bak";
-Restore Summary
- header     =       85 bytes
- meta-data  =      478 bytes
- data       =      324 bytes
-              --------------
- total             887 bytes
+backup_id
+#
 con1: Showing databases that were backed up
 con1: bup_ddl_blocker_1 has been renamed and
 con1: bup_ddl_blocker_2.t1 has been truncated.
@@ -827,14 +755,9 @@ SHOW DATABASES LIKE 'bup_ddl_blocker_%';
 Database (bup_ddl_blocker_%)
 bup_ddl_blocker_2
 bup_ddl_blocker_4
-BACKUP DATABASE bup_ddl_blocker_2, bup_ddl_blocker_4
-to 'bup_ddl_blocker_orig.bak';
-Backup Summary
- header     =       52 bytes
- meta-data  =      192 bytes
- data       =      162 bytes
-              --------------
- total             406 bytes
+BACKUP DATABASE bup_ddl_blocker_2, bup_ddl_blocker_4 to 'bup_ddl_blocker_orig.bak';
+backup_id
+#
 con6: Getting lock on DDL in progress.
 SELECT get_lock("DDL_in_progress", 0);
 get_lock("DDL_in_progress", 0)
@@ -863,12 +786,8 @@ con2: Completing DDL
 con3: Completing DDL
 con4: Completing DDL
 con5: Completing DDL
-Restore Summary
- header     =       52 bytes
- meta-data  =      192 bytes
- data       =      162 bytes
-              --------------
- total             406 bytes
+backup_id
+#
 
 Verifying Test 5 results for restore.
 
diff -Nrup a/mysql-test/r/backup_fkey.result b/mysql-test/r/backup_fkey.result
--- a/mysql-test/r/backup_fkey.result	2007-11-21 08:44:14 -05:00
+++ b/mysql-test/r/backup_fkey.result	2007-11-29 09:26:01 -05:00
@@ -24,12 +24,8 @@ INSERT INTO backup_fkey.child VALUES (4,
 ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`backup_fkey`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`) ON DELETE CASCADE)
 Backup the database originally.
 BACKUP DATABASE backup_fkey TO 'backup_fkey_orig.bak';
-Backup Summary
- header     =       32 bytes
- meta-data  =      376 bytes
- data       =      106 bytes
-              --------------
- total             514 bytes
+backup_id
+#
 Turn off foreign key constraints.
 SET foreign_key_checks = 0;
 SHOW VARIABLES LIKE 'foreign_key_checks%';
@@ -39,12 +35,8 @@ Drop the parent table.
 DROP TABLE backup_fkey.parent;
 Backup the database without the parent table.
 BACKUP DATABASE backup_fkey TO 'backup_fkey.bak';
-Backup Summary
- header     =       24 bytes
- meta-data  =      264 bytes
- data       =       56 bytes
-              --------------
- total             344 bytes
+backup_id
+#
 Turn on foreign key constraints.
 SET foreign_key_checks = 1;
 SHOW VARIABLES LIKE 'foreign_key_checks%';
@@ -52,19 +44,11 @@ Variable_name	Value
 foreign_key_checks	ON
 Now restore the database.
 RESTORE FROM 'backup_fkey.bak';
-Restore Summary
- header     =       24 bytes
- meta-data  =      264 bytes
- data       =       56 bytes
-              --------------
- total             344 bytes
+backup_id
+#
 RESTORE FROM 'backup_fkey_orig.bak';
-Restore Summary
- header     =       32 bytes
- meta-data  =      376 bytes
- data       =      106 bytes
-              --------------
- total             514 bytes
+backup_id
+#
 Show data
 SELECT * FROM backup_fkey.parent;
 id
@@ -92,12 +76,8 @@ INSERT INTO backup_fkey.t1 VALUES ("06 T
 INSERT INTO backup_fkey.t1 VALUES ("07 Test #2 - foreign key constraints");
 Backup the data
 BACKUP DATABASE backup_fkey TO 'backup_fkey.bak';
-Backup Summary
- header     =       21 bytes
- meta-data  =       92 bytes
- data       =      301 bytes
-              --------------
- total             414 bytes
+backup_id
+#
 Turn on foreign key constraints.
 SET foreign_key_checks = 1;
 SHOW VARIABLES LIKE 'foreign_key_checks%';
@@ -105,12 +85,8 @@ Variable_name	Value
 foreign_key_checks	ON
 Restoring data
 RESTORE FROM 'backup_fkey.bak';
-Restore Summary
- header     =       21 bytes
- meta-data  =       92 bytes
- data       =      301 bytes
-              --------------
- total             414 bytes
+backup_id
+#
 Verify foreign_key_checks = ON
 SHOW VARIABLES LIKE 'foreign_key_checks%';
 Variable_name	Value
@@ -122,12 +98,8 @@ Variable_name	Value
 foreign_key_checks	OFF
 Restoring data
 RESTORE FROM 'backup_fkey.bak';
-Restore Summary
- header     =       21 bytes
- meta-data  =       92 bytes
- data       =      301 bytes
-              --------------
- total             414 bytes
+backup_id
+#
 Verify foreign_key_checks = OFF
 SHOW VARIABLES LIKE 'foreign_key_checks%';
 Variable_name	Value
diff -Nrup a/mysql-test/r/backup_no_data.result b/mysql-test/r/backup_no_data.result
--- a/mysql-test/r/backup_no_data.result	2007-11-06 13:32:23 -05:00
+++ b/mysql-test/r/backup_no_data.result	2007-11-29 09:26:02 -05:00
@@ -1,19 +1,11 @@
 DROP DATABASE IF EXISTS empty_db;
 CREATE DATABASE empty_db;
 BACKUP DATABASE empty_db TO 'empty_db.bak';
-Backup Summary
- header     =       11 bytes
- meta-data  =        2 bytes
- data       =        0 bytes
-              --------------
- total              13 bytes
+backup_id
+#
 BACKUP DATABASE * TO 'all.bak';
-Backup Summary
- header     =       16 bytes
- meta-data  =        4 bytes
- data       =        0 bytes
-              --------------
- total              20 bytes
+backup_id
+#
 DROP DATABASE empty_db;
 DROP DATABASE test;
 SHOW DATABASES;
@@ -25,12 +17,8 @@ Database
 information_schema
 mysql
 RESTORE FROM 'all.bak';
-Restore Summary
- header     =       16 bytes
- meta-data  =        4 bytes
- data       =        0 bytes
-              --------------
- total              20 bytes
+backup_id
+#
 SHOW DATABASES;
 Database
 information_schema
@@ -40,12 +28,8 @@ test
 DROP DATABASE empty_db;
 DROP DATABASE test;
 RESTORE FROM 'empty_db.bak';
-Restore Summary
- header     =       11 bytes
- meta-data  =        2 bytes
- data       =        0 bytes
-              --------------
- total              13 bytes
+backup_id
+#
 SHOW DATABASES;
 Database
 information_schema
@@ -54,12 +38,8 @@ mysql
 SHOW TABLES IN empty_db;
 Tables_in_empty_db
 RESTORE FROM 'all.bak';
-Restore Summary
- header     =       16 bytes
- meta-data  =        4 bytes
- data       =        0 bytes
-              --------------
- total              20 bytes
+backup_id
+#
 SHOW DATABASES;
 Database
 information_schema
@@ -80,12 +60,8 @@ USE empty_db;
 DROP VIEW IF EXISTS v1;
 CREATE VIEW v1 AS SELECT * FROM test.t1;
 BACKUP DATABASE empty_db TO 'empty_db.bak';
-Backup Summary
- header     =       11 bytes
- meta-data  =        2 bytes
- data       =        0 bytes
-              --------------
- total              13 bytes
+backup_id
+#
 SHOW DATABASES;
 Database
 information_schema
@@ -93,12 +69,8 @@ empty_db
 mysql
 test
 RESTORE FROM 'empty_db.bak';
-Restore Summary
- header     =       11 bytes
- meta-data  =        2 bytes
- data       =        0 bytes
-              --------------
- total              13 bytes
+backup_id
+#
 USE empty_db;
 SHOW TABLES;
 Tables_in_empty_db
diff -Nrup a/mysql-test/r/backup_no_engine.result b/mysql-test/r/backup_no_engine.result
--- a/mysql-test/r/backup_no_engine.result	2007-11-06 13:32:23 -05:00
+++ b/mysql-test/r/backup_no_engine.result	2007-11-29 09:26:03 -05:00
@@ -3,21 +3,13 @@ CREATE DATABASE db;
 CREATE TABLE db.t1 (a int, b char(32))
 ENGINE=myisam;
 BACKUP DATABASE db TO "db.backup";
-Backup Summary
- header     =       12 bytes
- meta-data  =      120 bytes
- data       =        0 bytes
-              --------------
- total             132 bytes
+backup_id
+#
 DROP DATABASE db;
 CREATE DATABASE db;
 RESTORE FROM "db.backup";
-Restore Summary
- header     =       12 bytes
- meta-data  =      120 bytes
- data       =        0 bytes
-              --------------
- total             132 bytes
+backup_id
+#
 SHOW TABLES IN db;
 Tables_in_db
 t1
diff -Nrup a/mysql-test/r/backup_progress.result b/mysql-test/r/backup_progress.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/r/backup_progress.result	2007-11-29 09:26:11 -05:00
@@ -0,0 +1,141 @@
+DROP DATABASE IF EXISTS backup_progress;
+DROP TABLE IF EXISTS backup_progress.t1_res;
+CREATE DATABASE backup_progress;
+con1: Create table and new users.
+CREATE TABLE backup_progress.t1 (a char(30)) ENGINE=MYISAM;
+CREATE TABLE backup_progress.t2 (a char(30)) ENGINE=INNODB;
+CREATE TABLE backup_progress.t3 (a char(30)) ENGINE=MEMORY;
+CREATE TABLE backup_progress.t1_res (id INT);
+INSERT INTO backup_progress.t1 VALUES ("01 Test #1 - progress");
+INSERT INTO backup_progress.t1 VALUES ("02 Test #1 - progress");
+INSERT INTO backup_progress.t1 VALUES ("03 Test #1 - progress");
+INSERT INTO backup_progress.t1 VALUES ("04 Test #1 - progress");
+INSERT INTO backup_progress.t1 VALUES ("05 Test #1 - progress");
+INSERT INTO backup_progress.t1 VALUES ("06 Test #1 - progress");
+INSERT INTO backup_progress.t1 VALUES ("07 Test #1 - progress");
+INSERT INTO backup_progress.t2 VALUES ("01 Test #1 - progress");
+INSERT INTO backup_progress.t2 VALUES ("02 Test #1 - progress");
+INSERT INTO backup_progress.t2 VALUES ("03 Test #1 - progress");
+INSERT INTO backup_progress.t2 VALUES ("04 Test #1 - progress");
+INSERT INTO backup_progress.t2 VALUES ("05 Test #1 - progress");
+INSERT INTO backup_progress.t2 VALUES ("06 Test #1 - progress");
+INSERT INTO backup_progress.t3 VALUES ("01 Test #1 - progress");
+INSERT INTO backup_progress.t3 VALUES ("02 Test #1 - progress");
+INSERT INTO backup_progress.t3 VALUES ("03 Test #1 - progress");
+INSERT INTO backup_progress.t3 VALUES ("04 Test #1 - progress");
+Do backup of database
+SELECT get_lock("bp_starting_state", 0);
+get_lock("bp_starting_state", 0)
+1
+con2: Send backup command.
+BACKUP DATABASE backup_progress to 'backup_progress_orig.bak';
+con1: Checking locks.
+con1: Checking progress.
+INSERT INTO backup_progress.t1_res (id) SELECT backup_id FROM mysql.online_backup WHERE command LIKE "BACKUP DATABASE backup_progress%";
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
+backup_state
+starting
+con1: Advance the lock.
+SELECT get_lock("bp_running_state", 0);
+get_lock("bp_running_state", 0)
+1
+con1: Checking locks.
+con1: Checking progress.
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
+backup_state
+running
+con1: Advance the lock.
+SELECT get_lock("bp_vp_state", 0);
+get_lock("bp_vp_state", 0)
+1
+con1: Checking locks.
+con1: Checking progress.
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
+backup_state
+validity point
+con1: Advance the lock.
+SELECT get_lock("bp_running_state", 0);
+get_lock("bp_running_state", 0)
+1
+con1: Checking locks.
+con1: Checking progress.
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
+backup_state
+running
+con1: Advance the lock.
+SELECT release_lock("bp_running_state");
+release_lock("bp_running_state")
+1
+con2: Finish backup command
+backup_id
+#
+SELECT ob.* FROM mysql.online_backup AS ob JOIN backup_progress.t1_res AS t1 ON ob.backup_id = t1.id;;
+backup_id	#
+process_id	#
+binlog_pos	#
+binlog_file	#
+backup_state	complete
+operation	backup
+error_num	0
+num_objects	4
+total_bytes	896
+validity_point_time	#
+start_time	#
+stop_time	#
+host_or_server_name	localhost
+username	root
+backup_file	backup_progress_orig.bak
+user_comment	
+command	BACKUP DATABASE backup_progress to 'backup_progress_orig.bak'
+engines	Default, Snapshot
+Do restore of database
+SELECT get_lock("bp_starting_state", 0);
+get_lock("bp_starting_state", 0)
+1
+DELETE FROM backup_progress.t1_res;
+con2: Send restore command.
+RESTORE FROM 'backup_progress_orig.bak';
+con1: Checking locks.
+con1: Checking progress.
+INSERT INTO backup_progress.t1_res (id) SELECT backup_id FROM mysql.online_backup WHERE command LIKE "BACKUP DATABASE backup_progress%";
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
+backup_state
+complete
+con1: Advance the lock.
+SELECT get_lock("bp_running_state", 0);
+get_lock("bp_running_state", 0)
+1
+con1: Checking locks.
+con1: Checking progress.
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
+backup_state
+complete
+con1: Advance the lock.
+SELECT release_lock("bp_running_state");
+release_lock("bp_running_state")
+1
+con2: Finish restore command
+backup_id
+#
+SELECT ob.* FROM mysql.online_backup AS ob JOIN backup_progress.t1_res AS t1 ON ob.backup_id = t1.id;;
+backup_id	#
+process_id	#
+binlog_pos	#
+binlog_file	#
+backup_state	complete
+operation	backup
+error_num	0
+num_objects	4
+total_bytes	896
+validity_point_time	#
+start_time	#
+stop_time	#
+host_or_server_name	localhost
+username	root
+backup_file	backup_progress_orig.bak
+user_comment	
+command	BACKUP DATABASE backup_progress to 'backup_progress_orig.bak'
+engines	Default, Snapshot
+BACKUP DATABASE DOES_NOT_EXIST to 'backup_progress_orig.bak';
+ERROR 42000: Unknown database 'DOES_NOT_EXIST'
+DROP DATABASE backup_progress;
diff -Nrup a/mysql-test/r/backup_security.result b/mysql-test/r/backup_security.result
--- a/mysql-test/r/backup_security.result	2007-11-09 16:32:08 -05:00
+++ b/mysql-test/r/backup_security.result	2007-11-29 09:26:03 -05:00
@@ -16,14 +16,11 @@ GRANT ALL ON *.* TO 'bup_no_rights'@'%';
 GRANT ALL ON *.* TO 'bup_with_rights'@'%';
 REVOKE SUPER ON *.* FROM 'bup_no_rights'@'%';
 GRANT SUPER ON *.* TO 'bup_with_rights'@'%';
+FLUSH PRIVILEGES;
 default: Do backup of database with default test user for later tests.
 BACKUP DATABASE backup_test to 'backup_test_orig.bak';
-Backup Summary
- header     =       21 bytes
- meta-data  =       92 bytes
- data       =      245 bytes
-              --------------
- total             358 bytes
+backup_id
+#
 default: Connect as user with no rights and attempt backup and restore.
 no_rights: Attempting backup. Should fail with error 1227
 BACKUP DATABASE backup_test to 'bup_no_rights.bak';
@@ -49,20 +46,12 @@ a
 Connect as user with rights and attempt backup and restore.
 no_rights: Attempting backup. Should succeed
 BACKUP DATABASE backup_test to 'bup_with_rights.bak';
-Backup Summary
- header     =       21 bytes
- meta-data  =       92 bytes
- data       =      245 bytes
-              --------------
- total             358 bytes
+backup_id
+#
 no_rights: Attempting restore. Should succeed
 RESTORE FROM 'bup_with_rights.bak';
-Restore Summary
- header     =       21 bytes
- meta-data  =       92 bytes
- data       =      245 bytes
-              --------------
- total             358 bytes
+backup_id
+#
 SELECT * FROM t1;
 a
 01 Test #1 - super privilege
@@ -74,12 +63,8 @@ a
 07 Test #1 - super privilege
 default: Do restore to ensure it still works with default test user.
 RESTORE FROM 'backup_test_orig.bak';
-Restore Summary
- header     =       21 bytes
- meta-data  =       92 bytes
- data       =      245 bytes
-              --------------
- total             358 bytes
+backup_id
+#
 SELECT * FROM t1;
 a
 01 Test #1 - super privilege
diff -Nrup a/mysql-test/r/backup_snapshot.result b/mysql-test/r/backup_snapshot.result
--- a/mysql-test/r/backup_snapshot.result	2007-11-15 20:29:25 -05:00
+++ b/mysql-test/r/backup_snapshot.result	2007-11-29 09:26:04 -05:00
@@ -35,12 +35,8 @@ con3: Release lock on driver.
 SELECT release_lock("backup_cs_locked");
 release_lock("backup_cs_locked")
 1
-Backup Summary
- header     =       29 bytes
- meta-data  =      184 bytes
- data       =      320 bytes
-              --------------
- total             533 bytes
+backup_id
+#
 INSERT INTO bup_snapshot.t1 VALUES("- Yes");
 INSERT INTO bup_snapshot.t1 VALUES("- Jethro Tull");
 DELETE FROM bup_snapshot.t1 WHERE word LIKE '10%';
@@ -57,12 +53,8 @@ con1: Dropping the database
 DROP TABLE bup_snapshot.t1;
 con1: Restoring the database
 RESTORE FROM "bup_snapshot.bak";
-Restore Summary
- header     =       29 bytes
- meta-data  =      184 bytes
- data       =      320 bytes
-              --------------
- total             533 bytes
+backup_id
+#
 con1: Showing the data (no new data should be here).
 SELECT * FROM bup_snapshot.t1 WHERE word LIKE '-%';
 word
@@ -97,22 +89,14 @@ word
 SELECT COUNT(*) FROM bup_snapshot.t1;
 COUNT(*)
 12
-Backup Summary
- header     =       29 bytes
- meta-data  =      184 bytes
- data       =      320 bytes
-              --------------
- total             533 bytes
+backup_id
+#
 con1: Dropping the database
 DROP TABLE bup_snapshot.t1;
 con1: Restoring the database
 RESTORE FROM "bup_snapshot.bak";
-Restore Summary
- header     =       29 bytes
- meta-data  =      184 bytes
- data       =      320 bytes
-              --------------
- total             533 bytes
+backup_id
+#
 con1: Showing the data (no new data should be here).
 SELECT * FROM bup_snapshot.t1 WHERE word LIKE '-%';
 word
diff -Nrup a/mysql-test/t/backup.test b/mysql-test/t/backup.test
--- a/mysql-test/t/backup.test	2007-11-06 13:32:25 -05:00
+++ b/mysql-test/t/backup.test	2007-11-29 09:26:05 -05:00
@@ -96,6 +96,7 @@ INSERT INTO `tasking` VALUES ('333445555
 UNLOCK TABLES;
 
 
+--replace_column 1 #
 BACKUP DATABASE db1,db2 TO 'test.ba';
 
 DROP DATABASE db1;
@@ -108,7 +109,8 @@ connection restore;
 
 USE mysql;
 
-RESTORE FROM 'test.ba';
+--replace_column 1 # 2 # 3 # 4 # 10 # 11 # 12 #
+--query_vertical RESTORE FROM 'test.ba'
 
 USE db1;
 SHOW TABLES;
@@ -261,13 +263,15 @@ SELECT COUNT(*) FROM bup_default.t1_blob
 SELECT COUNT(*) FROM bup_default.wide;
 --query_vertical SELECT * FROM bup_default.wide;
 
+--replace_column 1 #
 BACKUP DATABASE bup_default TO "bup_default.bak";
 
 # Now restore the database and then check to make sure the data is there.
 
 DROP DATABASE bup_default;
 
-RESTORE FROM "bup_default.bak";
+--replace_column 1 # 2 # 3 # 4 # 10 # 11 # 12 #
+--query_vertical RESTORE FROM "bup_default.bak"
 
 # Show the data
 
diff -Nrup a/mysql-test/t/backup_commit_blocker.test b/mysql-test/t/backup_commit_blocker.test
--- a/mysql-test/t/backup_commit_blocker.test	2007-11-15 20:29:31 -05:00
+++ b/mysql-test/t/backup_commit_blocker.test	2007-11-29 09:26:05 -05:00
@@ -31,6 +31,14 @@
 # strategically in the code to allow the threads to pause at the 
 # corresponding location for those goals above.
 #
+# Notes
+#   You must use a dedicated connection for getting and releasing locks.
+# Do not issue a get_lock() or release_lock() in the same connection
+# (thread) as code that calls BACKUP_BREAKPOINT(). Using the same connection
+# to get/release locks and run code that issues BACKUP_BREAKPOINTs will result
+# in an assertion using DEBUG_ASSERT(thd->ull == NULL) from debug_sync_point()
+# in item_func.cc.
+#
 
 --source include/have_innodb.inc
 --source include/have_debug.inc
@@ -247,6 +255,7 @@ COMMIT;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 # Now restore the database and then check to make sure the new rows
@@ -264,7 +273,8 @@ DROP TABLE bup_commit_blocker.t2;
 DROP TABLE bup_commit_blocker.t3;
 
 --echo con1: Restoring the database
-RESTORE FROM "bup_commit_blocker.bak";
+--replace_column 1 #
+ RESTORE FROM "bup_commit_blocker.bak";
 
 --echo con1: Showing the data (no new data should be here).
 SELECT * FROM bup_commit_blocker.t1;
@@ -336,6 +346,8 @@ INSERT INTO bup_commit_blocker.t5 VALUES
 #SELECT * FROM bup_commit_blocker.t4;
 SELECT * FROM bup_commit_blocker.t5;
 
+connection con5;
+
 # Set the breakpoint for the commit blocker.
 --echo con5: Getting lock on commit blocker.
 SELECT get_lock("backup_commit_blocker", 0);
@@ -414,6 +426,7 @@ reap;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 # Now restore the database and then check to make sure the new rows
@@ -429,7 +442,8 @@ SELECT * FROM bup_commit_blocker.t5;
 DROP TABLE bup_commit_blocker.t5;
 
 --echo con1: Restoring the database
-RESTORE FROM "bup_commit_blocker.bak";
+--replace_column 1 #
+ RESTORE FROM "bup_commit_blocker.bak";
 
 --echo con1: Showing the data (no new data should be here).
 #SELECT * FROM bup_commit_blocker.t4;
@@ -698,6 +712,7 @@ reap;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 # Now restore the database and then check to make sure the new rows
@@ -719,6 +734,7 @@ DROP TABLE bup_commit_blocker.t3;
 DROP TABLE bup_commit_blocker.t5;
 
 --echo con1: Restoring the database
+--replace_column 1 #
 RESTORE FROM "bup_commit_blocker.bak";
 
 --echo con1: Showing the data (no new data should be here).
diff -Nrup a/mysql-test/t/backup_ddl_blocker.test b/mysql-test/t/backup_ddl_blocker.test
--- a/mysql-test/t/backup_ddl_blocker.test	2007-11-23 08:27:45 -05:00
+++ b/mysql-test/t/backup_ddl_blocker.test	2007-11-29 09:26:06 -05:00
@@ -40,6 +40,14 @@
 #
 # TODO : Add a native driver to the test when one becomes available
 #
+# Notes
+#   You must use a dedicated connection for getting and releasing locks.
+# Do not issue a get_lock() or release_lock() in the same connection
+# (thread) as code that calls BACKUP_BREAKPOINT(). Using the same connection
+# to get/release locks and run code that issues BACKUP_BREAKPOINTs will result
+# in an assertion using DEBUG_ASSERT(thd->ull == NULL) from debug_sync_point()
+# in item_func.cc.
+#
 
 --source include/have_innodb.inc
 --source include/have_debug.inc
@@ -207,6 +215,7 @@ reap;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 ##############################################################
@@ -227,6 +236,7 @@ DROP TABLE bup_ddl_blocker.t1, bup_ddl_b
            bup_ddl_blocker.t3, bup_ddl_blocker.t4;
 
 --echo con1: Restoring the database
+--replace_column 1 #
 RESTORE FROM "bup_ddl_blocker.bak";
 
 --echo con1: Showing columns that were backed up
@@ -252,6 +262,7 @@ DESCRIBE bup_ddl_blocker.t4;
 DROP TABLE bup_ddl_blocker.t1, bup_ddl_blocker.t3;
 
 # Get a backup to work with.
+--replace_column 1 #
 BACKUP DATABASE bup_ddl_blocker to 'bup_ddl_blocker_orig.bak';
 
 connection con6;
@@ -355,6 +366,7 @@ reap;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 --echo
@@ -483,6 +495,7 @@ reap;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 ##############################################################
@@ -501,6 +514,7 @@ DROP TABLE bup_ddl_blocker.t01, bup_ddl_
            bup_ddl_blocker.t03, bup_ddl_blocker.t4;
 
 --echo con1: Restoring the database
+--replace_column 1 #
 RESTORE FROM "bup_ddl_blocker.bak";
 
 --echo con1: Showing columns that were backed up
@@ -521,6 +535,7 @@ SHOW TABLES;
 --source include/backup_ddl_create_data.inc
 
 # Get a backup to work with.
+--replace_column 1 #
 BACKUP DATABASE bup_ddl_blocker to 'bup_ddl_blocker_orig.bak';
 
 connection con6;
@@ -624,6 +639,7 @@ reap;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 ##############################################################
@@ -750,6 +766,7 @@ reap;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 ##############################################################
@@ -767,6 +784,7 @@ SHOW TABLES;
 DROP TABLE bup_ddl_blocker.t1, bup_ddl_blocker.t3;
 
 --echo con1: Restoring the database
+--replace_column 1 #
 RESTORE FROM "bup_ddl_blocker.bak";
 
 --echo con1: Showing columns that were backed up
@@ -786,6 +804,7 @@ SHOW TABLES;
 --source include/backup_ddl_create_data.inc
 
 # Get a backup to work with.
+--replace_column 1 #
 BACKUP DATABASE bup_ddl_blocker to 'bup_ddl_blocker_orig.bak';
 
 connection con6;
@@ -889,6 +908,7 @@ reap;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 ##############################################################
@@ -1041,6 +1061,7 @@ reap;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 ##############################################################
@@ -1059,7 +1080,10 @@ DROP DATABASE bup_ddl_blocker_1;
 DROP DATABASE bup_ddl_blocker_3;
 
 --echo con1: Restoring the database
+--replace_column 1 #
+--disable_warnings
 RESTORE FROM "bup_ddl_blocker.bak";
+--enable_warnings
 
 --echo con1: Showing databases that were backed up
 --echo con1: bup_ddl_blocker_2 and bup_ddl_blocker_3 are not present
@@ -1069,7 +1093,6 @@ SHOW DATABASES LIKE 'bup_ddl_blocker_%';
 DROP DATABASE bup_ddl_blocker_1;
 DROP DATABASE bup_ddl_blocker_4;
 
-
 ##############################################################
 --echo 
 --echo Starting Test 4 - Restore
@@ -1105,6 +1128,7 @@ INSERT INTO bup_ddl_blocker_4.t1 VALUES 
 SHOW DATABASES LIKE 'bup_ddl_blocker_%';
 
 # Get a backup to work with.
+--replace_column 1 #
 BACKUP DATABASE bup_ddl_blocker_2, bup_ddl_blocker_4 to 'bup_ddl_blocker_orig.bak';
 
 connection con6;
@@ -1208,6 +1232,7 @@ reap;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 ##############################################################
@@ -1359,6 +1384,7 @@ reap;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 ##############################################################
@@ -1384,6 +1410,7 @@ DROP DATABASE bup_ddl_blocker_2;
 DROP DATABASE bup_ddl_blocker_4;
 
 --echo con1: Restoring the database
+--replace_column 1 #
 RESTORE FROM "bup_ddl_blocker.bak";
 
 --echo con1: Showing databases that were backed up
@@ -1447,8 +1474,8 @@ INSERT INTO bup_ddl_blocker_4.t1 VALUES 
 SHOW DATABASES LIKE 'bup_ddl_blocker_%';
 
 # Get a backup to work with.
-BACKUP DATABASE bup_ddl_blocker_2, bup_ddl_blocker_4
-                to 'bup_ddl_blocker_orig.bak';
+--replace_column 1 #
+BACKUP DATABASE bup_ddl_blocker_2, bup_ddl_blocker_4 to 'bup_ddl_blocker_orig.bak';
 
 connection con6;
 
@@ -1551,6 +1578,7 @@ reap;
 # Reconnect to con1 and let backup finish.
 
 connection con1;
+--replace_column 1 #
 reap;
 
 ##############################################################
diff -Nrup a/mysql-test/t/backup_fkey.test b/mysql-test/t/backup_fkey.test
--- a/mysql-test/t/backup_fkey.test	2007-11-21 08:44:15 -05:00
+++ b/mysql-test/t/backup_fkey.test	2007-11-29 09:26:07 -05:00
@@ -49,6 +49,7 @@ INSERT INTO backup_fkey.child VALUES (4,
 
 # Backup the database with fkey constraints preserved.
 --echo Backup the database originally.
+--replace_column 1 #
 BACKUP DATABASE backup_fkey TO 'backup_fkey_orig.bak';
 
 # Turn off foreign key constraints to create a backup that has
@@ -63,6 +64,7 @@ DROP TABLE backup_fkey.parent;
 
 # Backup only the child table.
 --echo Backup the database without the parent table.
+--replace_column 1 #
 BACKUP DATABASE backup_fkey TO 'backup_fkey.bak';
 
 --echo Turn on foreign key constraints.
@@ -71,10 +73,12 @@ SHOW VARIABLES LIKE 'foreign_key_checks%
 
 # Restore the database and ensure there are no errors.
 --echo Now restore the database.
+--replace_column 1 #
 RESTORE FROM 'backup_fkey.bak';
 
 # Now restore the original files to show there are no problems
 # restoring valid fkey relationships.
+--replace_column 1 #
 RESTORE FROM 'backup_fkey_orig.bak';
 
 --echo Show data
@@ -100,6 +104,7 @@ INSERT INTO backup_fkey.t1 VALUES ("06 T
 INSERT INTO backup_fkey.t1 VALUES ("07 Test #2 - foreign key constraints"); 
 
 --echo Backup the data
+--replace_column 1 #
 BACKUP DATABASE backup_fkey TO 'backup_fkey.bak';
 
 # Turn ON foreign key constraints and do restore then check result.
@@ -108,6 +113,7 @@ SET foreign_key_checks = 1;
 SHOW VARIABLES LIKE 'foreign_key_checks%';
 
 --echo Restoring data
+--replace_column 1 #
 RESTORE FROM 'backup_fkey.bak';
 
 --echo Verify foreign_key_checks = ON
@@ -118,6 +124,7 @@ SET foreign_key_checks = 0;
 SHOW VARIABLES LIKE 'foreign_key_checks%';
 
 --echo Restoring data
+--replace_column 1 #
 RESTORE FROM 'backup_fkey.bak';
 
 --echo Verify foreign_key_checks = OFF
diff -Nrup a/mysql-test/t/backup_no_data.test b/mysql-test/t/backup_no_data.test
--- a/mysql-test/t/backup_no_data.test	2007-11-06 13:32:26 -05:00
+++ b/mysql-test/t/backup_no_data.test	2007-11-29 09:26:07 -05:00
@@ -12,7 +12,9 @@ DROP DATABASE IF EXISTS empty_db;
 
 CREATE DATABASE empty_db;
 
+--replace_column 1 #
 BACKUP DATABASE empty_db TO 'empty_db.bak';
+--replace_column 1 #
 BACKUP DATABASE * TO 'all.bak';
 
 DROP DATABASE empty_db;
@@ -24,6 +26,7 @@ connection restore;
 
 SHOW DATABASES;
 
+--replace_column 1 #
 RESTORE FROM 'all.bak';
 
 SHOW DATABASES;
@@ -31,11 +34,13 @@ SHOW DATABASES;
 DROP DATABASE empty_db;
 DROP DATABASE test;
 
+--replace_column 1 #
 RESTORE FROM 'empty_db.bak';
 
 SHOW DATABASES;
 SHOW TABLES IN empty_db;
 
+--replace_column 1 #
 RESTORE FROM 'all.bak';
 
 SHOW DATABASES;
@@ -60,6 +65,7 @@ DROP VIEW IF EXISTS v1;
 
 CREATE VIEW v1 AS SELECT * FROM test.t1;
 
+--replace_column 1 #
 BACKUP DATABASE empty_db TO 'empty_db.bak';
 
 disconnect backup;
@@ -68,6 +74,7 @@ connection restore;
 
 SHOW DATABASES;
 
+--replace_column 1 #
 RESTORE FROM 'empty_db.bak';
 
 USE empty_db;
diff -Nrup a/mysql-test/t/backup_no_engine.test b/mysql-test/t/backup_no_engine.test
--- a/mysql-test/t/backup_no_engine.test	2007-11-06 13:32:27 -05:00
+++ b/mysql-test/t/backup_no_engine.test	2007-11-29 09:26:08 -05:00
@@ -17,12 +17,14 @@ ENGINE=myisam;
 --copy_file $table_def $MYSQLTEST_VARDIR/master-data/db/t2.frm
 
 # backup test database, the table with no storage engine will be ignored
+--replace_column 1 #
 BACKUP DATABASE db TO "db.backup";
 
 # wipe-out backed-up database
 DROP DATABASE db;
 CREATE DATABASE db;
 
+--replace_column 1 #
 RESTORE FROM "db.backup";
 
 # check that the table with no engine was excluded
diff -Nrup a/mysql-test/t/backup_progress.test b/mysql-test/t/backup_progress.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/t/backup_progress.test	2007-11-29 09:26:10 -05:00
@@ -0,0 +1,226 @@
+#
+# This test includes tests for ensuring the backup progress tables
+# are updated.
+#
+
+source include/have_log_bin.inc;
+source include/have_debug.inc;
+source include/have_innodb.inc;
+
+--disable_warnings
+DROP DATABASE IF EXISTS backup_progress;
+DROP TABLE IF EXISTS backup_progress.t1_res;
+--enable_warnings
+
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+
+#
+# Test 1 - Check output of backup.
+#
+
+connection con1;
+
+CREATE DATABASE backup_progress;
+
+--echo con1: Create table and new users.
+
+CREATE TABLE backup_progress.t1 (a char(30)) ENGINE=MYISAM;
+CREATE TABLE backup_progress.t2 (a char(30)) ENGINE=INNODB;
+CREATE TABLE backup_progress.t3 (a char(30)) ENGINE=MEMORY;
+CREATE TABLE backup_progress.t1_res (id INT);
+
+INSERT INTO backup_progress.t1 VALUES ("01 Test #1 - progress"); 
+INSERT INTO backup_progress.t1 VALUES ("02 Test #1 - progress"); 
+INSERT INTO backup_progress.t1 VALUES ("03 Test #1 - progress"); 
+INSERT INTO backup_progress.t1 VALUES ("04 Test #1 - progress"); 
+INSERT INTO backup_progress.t1 VALUES ("05 Test #1 - progress"); 
+INSERT INTO backup_progress.t1 VALUES ("06 Test #1 - progress"); 
+INSERT INTO backup_progress.t1 VALUES ("07 Test #1 - progress"); 
+
+INSERT INTO backup_progress.t2 VALUES ("01 Test #1 - progress"); 
+INSERT INTO backup_progress.t2 VALUES ("02 Test #1 - progress"); 
+INSERT INTO backup_progress.t2 VALUES ("03 Test #1 - progress"); 
+INSERT INTO backup_progress.t2 VALUES ("04 Test #1 - progress"); 
+INSERT INTO backup_progress.t2 VALUES ("05 Test #1 - progress"); 
+INSERT INTO backup_progress.t2 VALUES ("06 Test #1 - progress"); 
+
+INSERT INTO backup_progress.t3 VALUES ("01 Test #1 - progress"); 
+INSERT INTO backup_progress.t3 VALUES ("02 Test #1 - progress"); 
+INSERT INTO backup_progress.t3 VALUES ("03 Test #1 - progress"); 
+INSERT INTO backup_progress.t3 VALUES ("04 Test #1 - progress"); 
+
+--echo Do backup of database
+
+SELECT get_lock("bp_starting_state", 0);
+
+connection con2;
+
+--echo con2: Send backup command.
+send BACKUP DATABASE backup_progress to 'backup_progress_orig.bak';
+
+connection con1;
+# Wait for lock to be acquired and execution to reach breakpoint
+--echo con1: Checking locks.
+let $wait_condition = SELECT state = "debug_sync_point: bp_starting_state"
+                      FROM INFORMATION_SCHEMA.PROCESSLIST
+                      WHERE info LIKE "BACKUP DATABASE %";
+--source include/wait_condition.inc
+
+# Wait for row to be written to progress table.
+--echo con1: Checking progress.
+let $wait_condition = SELECT backup_state = "starting"
+                      FROM mysql.online_backup
+                      WHERE command LIKE "BACKUP DATABASE backup_progress%";
+--source include/wait_condition.inc
+
+--echo: Display progress
+INSERT INTO backup_progress.t1_res (id) SELECT backup_id FROM mysql.online_backup WHERE command LIKE "BACKUP DATABASE backup_progress%";
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
+
+--echo con1: Advance the lock.
+SELECT get_lock("bp_running_state", 0);
+
+# Wait for lock to be acquired and execution to reach breakpoint
+--echo con1: Checking locks.
+let $wait_condition = SELECT state = "debug_sync_point: bp_running_state"
+                      FROM INFORMATION_SCHEMA.PROCESSLIST
+                      WHERE info LIKE "BACKUP DATABASE %";
+--source include/wait_condition.inc
+
+# Wait for row to be written to progress table.
+--echo con1: Checking progress.
+let $wait_condition = SELECT backup_state = "running"
+                      FROM mysql.online_backup
+                      WHERE command LIKE "BACKUP DATABASE backup_progress%";
+--source include/wait_condition.inc
+
+--echo: Display progress
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
+
+--echo con1: Advance the lock.
+SELECT get_lock("bp_vp_state", 0);
+
+# Wait for lock to be acquired and execution to reach breakpoint
+--echo con1: Checking locks.
+let $wait_condition = SELECT state = "debug_sync_point: bp_vp_state"
+                      FROM INFORMATION_SCHEMA.PROCESSLIST
+                      WHERE info LIKE "BACKUP DATABASE %";
+--source include/wait_condition.inc
+
+# Wait for row to be written to progress table.
+--echo con1: Checking progress.
+let $wait_condition = SELECT backup_state = "validity point"
+                      FROM mysql.online_backup
+                      WHERE command LIKE "BACKUP DATABASE backup_progress%";
+--source include/wait_condition.inc
+
+--echo: Display progress
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
+
+--echo con1: Advance the lock.
+SELECT get_lock("bp_running_state", 0);
+
+# Wait for lock to be acquired and execution to reach breakpoint
+--echo con1: Checking locks.
+let $wait_condition = SELECT state = "debug_sync_point: bp_running_state"
+                      FROM INFORMATION_SCHEMA.PROCESSLIST
+                      WHERE info LIKE "BACKUP DATABASE %";
+--source include/wait_condition.inc
+
+# Wait for row to be written to progress table.
+--echo con1: Checking progress.
+let $wait_condition = SELECT backup_state = "running"
+                      FROM mysql.online_backup
+                      WHERE command LIKE "BACKUP DATABASE backup_progress%";
+--source include/wait_condition.inc
+
+--echo: Display progress
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
+
+--echo con1: Advance the lock.
+SELECT release_lock("bp_running_state");
+
+connection con2;
+--echo con2: Finish backup command
+--replace_column 1 #
+reap;
+
+#Show results
+--replace_column 1 # 2 # 3 # 4 # 10 # 11 # 12 #
+--query_vertical SELECT ob.* FROM mysql.online_backup AS ob JOIN backup_progress.t1_res AS t1 ON ob.backup_id = t1.id;
+
+connection con1;
+
+--echo Do restore of database
+
+SELECT get_lock("bp_starting_state", 0);
+
+connection con2;
+
+DELETE FROM backup_progress.t1_res;
+
+--echo con2: Send restore command.
+send RESTORE FROM 'backup_progress_orig.bak';
+
+connection con1;
+# Wait for lock to be acquired and execution to reach breakpoint
+--echo con1: Checking locks.
+let $wait_condition = SELECT state = "debug_sync_point: bp_starting_state"
+                      FROM INFORMATION_SCHEMA.PROCESSLIST
+                      WHERE info LIKE "RESTORE FROM 'backup_progress_orig.bak'%";
+--source include/wait_condition.inc
+
+# Wait for row to be written to progress table.
+--echo con1: Checking progress.
+let $wait_condition = SELECT backup_state = "starting"
+                      FROM mysql.online_backup
+                      WHERE command LIKE "RESTORE FROM 'backup_progress_orig.bak'%";
+--source include/wait_condition.inc
+
+--echo: Display progress
+INSERT INTO backup_progress.t1_res (id) SELECT backup_id FROM mysql.online_backup WHERE command LIKE "BACKUP DATABASE backup_progress%";
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
+
+--echo con1: Advance the lock.
+SELECT get_lock("bp_running_state", 0);
+
+# Wait for lock to be acquired and execution to reach breakpoint
+--echo con1: Checking locks.
+let $wait_condition = SELECT state = "debug_sync_point: bp_running_state"
+                      FROM INFORMATION_SCHEMA.PROCESSLIST
+                      WHERE info LIKE "RESTORE FROM 'backup_progress_orig.bak'%";
+--source include/wait_condition.inc
+
+# Wait for row to be written to progress table.
+--echo con1: Checking progress.
+let $wait_condition = SELECT backup_state = "running"
+                      FROM mysql.online_backup
+                      WHERE command LIKE "RESTORE FROM 'backup_progress_orig.bak'%";
+--source include/wait_condition.inc
+
+--echo: Display progress
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
+
+--echo con1: Advance the lock.
+SELECT release_lock("bp_running_state");
+
+connection con2;
+--echo con2: Finish restore command
+--replace_column 1 #
+reap;
+
+#Show results
+--replace_column 1 # 2 # 3 # 4 # 10 # 11 # 12 #
+--query_vertical SELECT ob.* FROM mysql.online_backup AS ob JOIN backup_progress.t1_res AS t1 ON ob.backup_id = t1.id;
+
+connection con1;
+
+--replace_column 1 #
+--error 1049
+BACKUP DATABASE DOES_NOT_EXIST to 'backup_progress_orig.bak';
+
+DROP DATABASE backup_progress;
+
+remove_file $MYSQLTEST_VARDIR/master-data/backup_progress_orig.bak;
+
diff -Nrup a/mysql-test/t/backup_security.test b/mysql-test/t/backup_security.test
--- a/mysql-test/t/backup_security.test	2007-11-08 09:02:39 -05:00
+++ b/mysql-test/t/backup_security.test	2007-11-29 09:26:09 -05:00
@@ -35,9 +35,11 @@ GRANT ALL ON *.* TO 'bup_no_rights'@'%';
 GRANT ALL ON *.* TO 'bup_with_rights'@'%';
 REVOKE SUPER ON *.* FROM 'bup_no_rights'@'%';
 GRANT SUPER ON *.* TO 'bup_with_rights'@'%';
+FLUSH PRIVILEGES;
 
 --echo default: Do backup of database with default test user for later tests.
 
+--replace_column 1 #
 BACKUP DATABASE backup_test to 'backup_test_orig.bak';
 
 --echo default: Connect as user with no rights and attempt backup and restore.
@@ -46,11 +48,13 @@ connect (no_rights,localhost,bup_no_righ
 connection no_rights;
 
 --echo no_rights: Attempting backup. Should fail with error 1227
+--replace_column 1 #
 --error 1227
 BACKUP DATABASE backup_test to 'bup_no_rights.bak';
 SHOW ERRORS;
 
 --echo no_rights: Attempting restore. Should fail with error 1227
+--replace_column 1 #
 --error 1227
 RESTORE FROM 'bup_no_rights.bak';
 SHOW ERRORS;
@@ -63,9 +67,11 @@ connect (with_rights,localhost,bup_with_
 connection with_rights;
 
 --echo no_rights: Attempting backup. Should succeed
+--replace_column 1 #
 BACKUP DATABASE backup_test to 'bup_with_rights.bak';
 
 --echo no_rights: Attempting restore. Should succeed
+--replace_column 1 #
 RESTORE FROM 'bup_with_rights.bak';
 
 SELECT * FROM t1;
@@ -74,6 +80,7 @@ connection default;
 
 --echo default: Do restore to ensure it still works with default test user.
 
+--replace_column 1 #
 RESTORE FROM 'backup_test_orig.bak';
 
 SELECT * FROM t1;
diff -Nrup a/mysql-test/t/backup_snapshot.test b/mysql-test/t/backup_snapshot.test
--- a/mysql-test/t/backup_snapshot.test	2007-11-15 20:29:26 -05:00
+++ b/mysql-test/t/backup_snapshot.test	2007-11-29 09:26:09 -05:00
@@ -17,6 +17,14 @@
 #
 # The following tests test these conditions.
 #
+# Notes
+#   You must use a dedicated connection for getting and releasing locks.
+# Do not issue a get_lock() or release_lock() in the same connection
+# (thread) as code that calls BACKUP_BREAKPOINT(). Using the same connection
+# to get/release locks and run code that issues BACKUP_BREAKPOINTs will result
+# in an assertion using DEBUG_ASSERT(thd->ull == NULL) from debug_sync_point()
+# in item_func.cc.
+#
 
 --source include/have_innodb.inc
 --source include/have_debug.inc
@@ -107,7 +115,7 @@ let $wait_condition = SELECT count(*) = 
 SELECT release_lock("backup_cs_locked");
 
 connection con1;
-
+--replace_column 1 #
 reap;
 
 connection con2;
@@ -130,6 +138,7 @@ connection con1; 
 DROP TABLE bup_snapshot.t1;
 
 --echo con1: Restoring the database
+--replace_column 1 #
 RESTORE FROM "bup_snapshot.bak";
 
 --echo con1: Showing the data (no new data should be here).
@@ -197,7 +206,7 @@ SELECT * FROM bup_snapshot.t1 WHERE word
 SELECT COUNT(*) FROM bup_snapshot.t1;
 
 connection con1;
-
+--replace_column 1 #
 reap;
 
 # Now restore the database and then check to make sure the new rows
@@ -207,6 +216,7 @@ reap;
 DROP TABLE bup_snapshot.t1;
 
 --echo con1: Restoring the database
+--replace_column 1 #
 RESTORE FROM "bup_snapshot.bak";
 
 --echo con1: Showing the data (no new data should be here).

Thread
bk commit into 6.0 tree (cbell:1.2692) WL#4116cbell29 Nov
  • Re: bk commit into 6.0 tree (cbell:1.2692) WL#4116Rafal Somla30 Nov