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, 2008-02-15 12:33:26-05:00, cbell@mysql_cab_desk. +3 -0
Pushbuild fixes.
mysql-test/r/backup_errors.result@stripped, 2008-02-15 12:33:18-05:00, cbell@mysql_cab_desk. +2 -4
New result file.
mysql-test/t/backup_errors.test@stripped, 2008-02-15 12:33:19-05:00, cbell@mysql_cab_desk. +2 -2
Use correct error number.
sql/backup/backup_progress.cc@stripped, 2008-02-15 12:33:20-05:00, cbell@mysql_cab_desk. +7 -2
Correct behaviour of checking to see if progress tables are present.
Old code could fail without warning.
diff -Nrup a/mysql-test/r/backup_errors.result b/mysql-test/r/backup_errors.result
--- a/mysql-test/r/backup_errors.result 2008-02-11 19:17:47 -05:00
+++ b/mysql-test/r/backup_errors.result 2008-02-15 12:33:18 -05:00
@@ -75,10 +75,9 @@ backup_id
DROP TABLE mysql.online_backup;
Backup the database;
BACKUP DATABASE test_ob_error TO 'ob_err.bak';
-ERROR 42S02: Table 'mysql.online_backup' doesn't exist
+ERROR HY000: Can't open the online backup progress tables. Check 'mysql.online_backup' and 'mysql.online_backup_progress'.
SHOW ERRORS;
Level Code Message
-Error # Table 'mysql.online_backup' doesn't exist
Error # Can't open the online backup progress tables. Check 'mysql.online_backup' and 'mysql.online_backup_progress'.
Restoring the table
CREATE TABLE mysql.online_backup LIKE test.ob_copy;
@@ -86,10 +85,9 @@ DROP TABLE test.ob_copy;
DROP TABLE mysql.online_backup_progress;
Backup the database;
BACKUP DATABASE test_ob_error TO 'ob_err.bak';
-ERROR 42S02: Table 'mysql.online_backup_progress' doesn't exist
+ERROR HY000: Can't open the online backup progress tables. Check 'mysql.online_backup' and 'mysql.online_backup_progress'.
SHOW ERRORS;
Level Code Message
-Error # Table 'mysql.online_backup_progress' doesn't exist
Error # Can't open the online backup progress tables. Check 'mysql.online_backup' and 'mysql.online_backup_progress'.
Restoring the table
CREATE TABLE mysql.online_backup_progress LIKE test.obp_copy;
diff -Nrup a/mysql-test/t/backup_errors.test b/mysql-test/t/backup_errors.test
--- a/mysql-test/t/backup_errors.test 2008-02-11 19:17:48 -05:00
+++ b/mysql-test/t/backup_errors.test 2008-02-15 12:33:19 -05:00
@@ -179,7 +179,7 @@ DROP TABLE mysql.online_backup;
# Try to backup the database (should be error).
--echo Backup the database;
---error ER_NO_SUCH_TABLE
+--error ER_BACKUP_PROGRESS_TABLES
BACKUP DATABASE test_ob_error TO 'ob_err.bak';
--error 0,1
--remove_file $MYSQLTEST_VARDIR/master-data/ob_err.bak
@@ -196,7 +196,7 @@ DROP TABLE mysql.online_backup_progress;
# Try to backup the database (should be error).
--echo Backup the database;
---error ER_NO_SUCH_TABLE
+--error ER_BACKUP_PROGRESS_TABLES
BACKUP DATABASE test_ob_error TO 'ob_err.bak';
--error 0,1
--remove_file $MYSQLTEST_VARDIR/master-data/ob_err.bak
diff -Nrup a/sql/backup/backup_progress.cc b/sql/backup/backup_progress.cc
--- a/sql/backup/backup_progress.cc 2008-01-31 12:26:20 -05:00
+++ b/sql/backup/backup_progress.cc 2008-02-15 12:33:20 -05:00
@@ -27,6 +27,8 @@
#include "backup_progress.h"
#include "be_thread.h"
+extern bool check_if_table_exists(THD *thd, TABLE_LIST *table, bool *exists);
+
/**
Check online backup progress tables.
@@ -44,12 +46,14 @@ my_bool check_ob_progress_tables(THD *th
{
TABLE_LIST tables;
my_bool ret= FALSE;
+ bool exists= FALSE;
DBUG_ENTER("check_ob_progress_tables");
/* Check mysql.online_backup */
tables.init_one_table("mysql", "online_backup", TL_READ);
- if (simple_open_n_lock_tables(thd, &tables))
+ check_if_table_exists(thd, &tables, &exists);
+ if (!exists)
{
ret= TRUE;
sql_print_error(ER(ER_BACKUP_PROGRESS_TABLES));
@@ -59,7 +63,8 @@ my_bool check_ob_progress_tables(THD *th
/* Check mysql.online_backup_progress */
tables.init_one_table("mysql", "online_backup_progress", TL_READ);
- if (simple_open_n_lock_tables(thd, &tables))
+ check_if_table_exists(thd, &tables, &exists);
+ if (!exists)
{
ret= TRUE;
sql_print_error(ER(ER_BACKUP_PROGRESS_TABLES));
| Thread |
|---|
| • bk commit into 6.0 tree (cbell:1.2569) | cbell | 15 Feb |