Below is the list of changes that have just been committed into a local
6.0 repository of istruewing. When istruewing 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, 2008-05-22 14:13:00+02:00, istruewing@stripped +7 -0
Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
Changed synchronization point calls,
adapted backup_progress.test and re-enabled it.
mysql-test/r/backup_progress.result@stripped, 2008-05-22 14:12:57+02:00, istruewing@stripped +32 -43
Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
Changed result.
mysql-test/t/backup_no_be.test@stripped, 2008-05-22 14:12:57+02:00, istruewing@stripped +1 -1
Fixed a typo.
mysql-test/t/backup_progress.test@stripped, 2008-05-22 14:12:57+02:00, istruewing@stripped +46 -113
Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
Changed test.
mysql-test/t/disabled.def@stripped, 2008-05-22 14:12:57+02:00, istruewing@stripped +1 -1
Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
Re-enabled the converted test case.
sql/backup/data_backup.cc@stripped, 2008-05-22 14:12:57+02:00, istruewing@stripped +2 -2
Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
Changed synchronization point calls.
sql/backup/kernel.cc@stripped, 2008-05-22 14:12:57+02:00, istruewing@stripped +2 -2
Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
Changed synchronization point calls.
sql/backup/logger.h@stripped, 2008-05-22 14:12:57+02:00, istruewing@stripped +2 -1
Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
Added inclusion of the DEBUG_SYNC declaration.
Changed a synchronization point call.
diff -Nrup a/mysql-test/r/backup_progress.result b/mysql-test/r/backup_progress.result
--- a/mysql-test/r/backup_progress.result 2008-03-20 15:53:06 +01:00
+++ b/mysql-test/r/backup_progress.result 2008-05-22 14:12:57 +02:00
@@ -1,6 +1,6 @@
+SET DEBUG_SYNC= 'reset';
DROP DATABASE IF EXISTS backup_progress;
DROP TABLE IF EXISTS backup_progress.t1_res;
-SET GLOBAL debug="d,backup_debug:d,backup";
CREATE DATABASE backup_progress;
con1: Create table and new users.
CREATE TABLE backup_progress.t1 (a char(30)) ENGINE=MYISAM;
@@ -25,49 +25,41 @@ INSERT INTO backup_progress.t3 VALUES ("
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: Activate sync points for the backup statement.
+SET DEBUG_SYNC= 'after_backup_log_init SIGNAL started WAIT_FOR do_run';
+SET DEBUG_SYNC= 'after_backup_start_backup SIGNAL phase1 WAIT_FOR backup';
+SET DEBUG_SYNC= 'after_backup_validated SIGNAL validated WAIT_FOR do_phase2';
+SET DEBUG_SYNC= 'after_backup_binlog SIGNAL phase2 WAIT_FOR finish';
con2: Send backup command.
BACKUP DATABASE backup_progress to 'backup_progress_orig.bak';
-con1: Checking locks.
-con1: Checking progress.
+con1: Wait for the backup to be started.
+SET DEBUG_SYNC= 'now WAIT_FOR started';
+con1: Display progress
SELECT MAX(backup_id) INTO @bup_id FROM mysql.online_backup WHERE command LIKE "BACKUP DATABASE backup_progress%";
INSERT INTO backup_progress.t1_res (id) VALUES (@bup_id);
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.
+con1: Let backup step to running state.
+SET DEBUG_SYNC= 'now SIGNAL do_run WAIT_FOR phase1';
+con1: Display 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.
+con1: Let backup do the backup phase1.
+SET DEBUG_SYNC= 'now SIGNAL backup WAIT_FOR validated';
+con1: Display 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.
+con1: Let backup do the backup phase2.
+SET DEBUG_SYNC= 'now SIGNAL do_phase2 WAIT_FOR phase2';
+con1: Display 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
+con1: Let backup finish.
+SET DEBUG_SYNC= 'now SIGNAL finish';
con2: Finish backup command
backup_id
#
@@ -98,14 +90,15 @@ backup_id object start_time stop_time to
# backup kernel # # 0 0 0 running
# backup kernel # # 0 0 0 complete
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: Activate sync points for the backup statement.
+SET DEBUG_SYNC= 'after_backup_log_init SIGNAL started WAIT_FOR do_run';
+SET DEBUG_SYNC= 'after_backup_start_restore SIGNAL running WAIT_FOR finish';
con2: Send restore command.
RESTORE FROM 'backup_progress_orig.bak';
-con1: Checking locks.
-con1: Checking progress.
+con1: Wait for the restore to be started.
+SET DEBUG_SYNC= 'now WAIT_FOR started';
+con1: Display progress
select * from backup_progress.t1_res;
id
SELECT MAX(backup_id) INTO @bup_id FROM mysql.online_backup WHERE command LIKE "RESTORE FROM%";
@@ -113,19 +106,14 @@ INSERT INTO backup_progress.t1_res (id)
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.
+con1: Let restore step to running state.
+SET DEBUG_SYNC= 'now SIGNAL do_run WAIT_FOR running';
+con1: Display 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
+con1: Let restore do its job and finish.
+SET DEBUG_SYNC= 'now SIGNAL finish';
con2: Finish restore command
backup_id
#
@@ -156,4 +144,5 @@ backup_id object start_time stop_time to
# backup kernel # # 0 0 0 starting
# backup kernel # # 0 0 0 running
# backup kernel # # 0 0 0 complete
+SET DEBUG_SYNC= 'reset';
DROP DATABASE backup_progress;
diff -Nrup a/mysql-test/t/backup_no_be.test b/mysql-test/t/backup_no_be.test
--- a/mysql-test/t/backup_no_be.test 2008-05-10 10:42:45 +02:00
+++ b/mysql-test/t/backup_no_be.test 2008-05-22 14:12:57 +02:00
@@ -67,7 +67,7 @@ SELECT @@debug;
--remove_file $MYSQLTEST_VARDIR/master-data/db1.bak
--replace_column 1 #
BACKUP DATABASE db1 TO 'db1.bak';
---enable_warings
+--enable_warnings
# Don't show warning message code
--replace_column 2 #
diff -Nrup a/mysql-test/t/backup_progress.test b/mysql-test/t/backup_progress.test
--- a/mysql-test/t/backup_progress.test 2008-03-20 15:53:07 +01:00
+++ b/mysql-test/t/backup_progress.test 2008-05-22 14:12:57 +02:00
@@ -4,11 +4,15 @@
#
--source include/have_log_bin.inc
---source include/have_debug.inc
+--source include/have_debug_sync.inc
--source include/have_innodb.inc
--source include/not_embedded.inc
+#
+# Preparative cleanup.
+#
--disable_warnings
+SET DEBUG_SYNC= 'reset';
DROP DATABASE IF EXISTS backup_progress;
DROP TABLE IF EXISTS backup_progress.t1_res;
--error 0,1
@@ -18,9 +22,6 @@ DROP TABLE IF EXISTS backup_progress.t1_
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
-# Setup the server to use the backup breakpoints
-SET GLOBAL debug="d,backup_debug:d,backup";
-
#
# Test 1 - Check output of backup.
#
@@ -58,96 +59,47 @@ INSERT INTO backup_progress.t3 VALUES ("
--echo Do backup of database
-SELECT get_lock("bp_starting_state", 0);
-
connection con2;
+--echo con2: Activate sync points for the backup statement.
+SET DEBUG_SYNC= 'after_backup_log_init SIGNAL started WAIT_FOR do_run';
+SET DEBUG_SYNC= 'after_backup_start_backup SIGNAL phase1 WAIT_FOR backup';
+SET DEBUG_SYNC= 'after_backup_validated SIGNAL validated WAIT_FOR do_phase2';
+SET DEBUG_SYNC= 'after_backup_binlog SIGNAL phase2 WAIT_FOR finish';
+
--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 con1: Wait for the backup to be started.
+SET DEBUG_SYNC= 'now WAIT_FOR started';
---echo: Display progress
+--echo con1: Display progress
SELECT MAX(backup_id) INTO @bup_id FROM mysql.online_backup WHERE command LIKE "BACKUP DATABASE backup_progress%";
INSERT INTO backup_progress.t1_res (id) VALUES (@bup_id);
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);
+--echo con1: Let backup step to running state.
+SET DEBUG_SYNC= 'now SIGNAL do_run WAIT_FOR phase1';
+
+--echo con1: 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: Let backup do the backup phase1.
+SET DEBUG_SYNC= 'now SIGNAL backup WAIT_FOR validated';
+
+--echo con1: Display progress
+SELECT backup_state FROM mysql.online_backup AS ob JOIN backup_progress.t1_res as t1 ON ob.backup_id = t1.id;
-# 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 con1: Let backup do the backup phase2.
+SET DEBUG_SYNC= 'now SIGNAL do_phase2 WAIT_FOR phase2';
---echo: Display progress
+--echo con1: 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");
+--echo con1: Let backup finish.
+SET DEBUG_SYNC= 'now SIGNAL finish';
connection con2;
--echo con2: Finish backup command
@@ -164,59 +116,36 @@ connection con1;
--echo Do restore of database
-SELECT get_lock("bp_starting_state", 0);
-
connection con2;
DELETE FROM backup_progress.t1_res;
+
+--echo con2: Activate sync points for the backup statement.
+SET DEBUG_SYNC= 'after_backup_log_init SIGNAL started WAIT_FOR do_run';
+SET DEBUG_SYNC= 'after_backup_start_restore SIGNAL running WAIT_FOR finish';
--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 con1: Wait for the restore to be started.
+SET DEBUG_SYNC= 'now WAIT_FOR started';
---echo: Display progress
+--echo con1: Display progress
select * from backup_progress.t1_res;
SELECT MAX(backup_id) INTO @bup_id FROM mysql.online_backup WHERE command LIKE "RESTORE FROM%";
INSERT INTO backup_progress.t1_res (id) VALUES (@bup_id);
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);
+--echo con1: Let restore step to running state.
+SET DEBUG_SYNC= 'now SIGNAL do_run WAIT_FOR running';
-# 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
+--echo con1: 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");
+--echo con1: Let restore do its job and finish.
+SET DEBUG_SYNC= 'now SIGNAL finish';
connection con2;
--echo con2: Finish restore command
@@ -234,6 +163,10 @@ SELECT obp.* FROM mysql.online_backup_pr
connection con1;
+#
+# Cleanup.
+#
+SET DEBUG_SYNC= 'reset';
DROP DATABASE backup_progress;
--remove_file $MYSQLTEST_VARDIR/master-data/backup_progress_orig.bak
diff -Nrup a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
--- a/mysql-test/t/disabled.def 2008-05-05 21:33:23 +02:00
+++ b/mysql-test/t/disabled.def 2008-05-22 14:12:57 +02:00
@@ -25,7 +25,7 @@ user_limits : Bug#23921 2007-12
backup :BUG#34235 pending replacement of test facility with WL#4259
backup_commit_blocker :BUG#34235 pending replacement of test facility with WL#4259
backup_ddl_blocker :BUG#34235 pending replacement of test facility with WL#4259
-backup_progress :BUG#34235 pending replacement of test facility with WL#4259
+#backup_progress :BUG#34235 pending replacement of test facility with WL#4259
backup_security :BUG#34235 pending replacement of test facility with WL#4259
backup_snapshot :BUG#34235 pending replacement of test facility with WL#4259
backup_no_engine : Bug#36021 2008-04-13 rsomla server crashes when openning table with unknown storage engine
diff -Nrup a/sql/backup/data_backup.cc b/sql/backup/data_backup.cc
--- a/sql/backup/data_backup.cc 2008-05-05 17:03:15 +02:00
+++ b/sql/backup/data_backup.cc 2008-05-22 14:12:57 +02:00
@@ -613,7 +613,7 @@ int write_table_data(THD* thd, Backup_in
the backup progress. It is not to be used to indicate actual
timing of the validity point.
*/
- BACKUP_BREAKPOINT("bp_vp_state");
+ DEBUG_SYNC(thd, "after_backup_validated");
/*
Block commits.
@@ -667,7 +667,7 @@ int write_table_data(THD* thd, Backup_in
}
info.m_ctx.report_state(BUP_RUNNING);
- BACKUP_BREAKPOINT("bp_running_state");
+ DEBUG_SYNC(thd, "after_backup_binlog");
/**** VP creation (end) ********************************************/
diff -Nrup a/sql/backup/kernel.cc b/sql/backup/kernel.cc
--- a/sql/backup/kernel.cc 2008-05-21 12:45:50 +02:00
+++ b/sql/backup/kernel.cc 2008-05-22 14:12:57 +02:00
@@ -148,7 +148,7 @@ execute_backup_command(THD *thd, LEX *le
if (!info || !info->is_valid())
DBUG_RETURN(send_error(context, ER_BACKUP_BACKUP_PREPARE));
- BACKUP_BREAKPOINT("bp_running_state");
+ DEBUG_SYNC(thd, "after_backup_start_backup");
// select objects to backup
@@ -192,7 +192,7 @@ execute_backup_command(THD *thd, LEX *le
if (!info || !info->is_valid())
DBUG_RETURN(send_error(context, ER_BACKUP_RESTORE_PREPARE));
- BACKUP_BREAKPOINT("bp_running_state");
+ DEBUG_SYNC(thd, "after_backup_start_restore");
res= context.do_restore();
diff -Nrup a/sql/backup/logger.h b/sql/backup/logger.h
--- a/sql/backup/logger.h 2008-03-21 10:57:37 +01:00
+++ b/sql/backup/logger.h 2008-05-22 14:12:57 +02:00
@@ -1,6 +1,7 @@
#ifndef _BACKUP_LOGGER_H
#define _BACKUP_LOGGER_H
+#include "mysql_priv.h"
#include <backup_stream.h>
#include <backup/error.h>
#include <backup/debug.h>
@@ -130,7 +131,7 @@ int Logger::init(enum_type type, const L
m_op_id= report_ob_init(m_thd, m_thd->id, BUP_STARTING,
type == BACKUP ? OP_BACKUP : OP_RESTORE,
0, "", path.str, query);
- BACKUP_BREAKPOINT("bp_starting_state");
+ DEBUG_SYNC(m_thd, "after_backup_log_init");
return 0;
}
| Thread |
|---|
| • bk commit into 6.0 tree (istruewing:1.2623) | Ingo Struewing | 22 May |