List:Commits« Previous MessageNext Message »
From:Chuck Bell Date:November 7 2008 11:50pm
Subject:Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2727)
Bug#34579
View as plain text  
STATUS
------
Changes requested.

REQUESTS
--------
1. Fix test failures (see previous email with details). Test run results
    attached for completeness.
2. Remove backup_restore_overwrite test and put test case in
    backup_errors test.

COMMENTARY
----------
Patch (code) looks good. Just got issues with the test results. Note: 
some of the test failures may not be related to the patch. I will be 
happy to assist in testing on Windows.

SUGGESTIONS
-----------
1. The patch is so large the MySQL commit lists thingy turns it into
    MIME format. Perhaps it would be better to have multiple patches
    instead of one large one?

From: Date: November 7 2008 12:31pm
Subject: bzr commit into mysql-6.0-backup branch (jorgen.loland:2727) 
Bug#34579
List-Archive: http://lists.mysql.com/commits/58167
X-Bug: 34579
Message-Id: <20081107113120.46DDBBCC008@stripped>

I0F0IGZpbGU6Ly8vbG9jYWxob21lL2psMjA4MDQ1L215c3FsL215c3FsLTYuMC1iYWNrdXAtMzQ1
NzkvCgogMjcyNyBKb3JnZW4gTG9sYW5kCTIwMDgtMTEtMDcKICAgICAgQnVnIzM0NTc5IC0gQmFj
a3VwOiBSZXN0b3JlIG92ZXJ3cml0ZXMgdGhlIG5ldyAvIG1vZGlmaWVkIGRhdGEgd2l0aG91dCB3
YXJuaW5nCiAgICAgIAogICAgICBBZGQgT1ZFUldSSVRFIGZsYWcgdG8gUkVTVE9SRSBjb21tYW5k
CiAgICAgIAogICAgICBCZWZvcmUsIFJFU1RPUkUgd291bGQgb3ZlcndyaXRlIGV4aXN0aW5nIERC
cyB3aXRoIHNhbWUgbmFtZS4gV2l0aCB0aGlzIHBhdGNoLCBSRVNUT1JFIHdpbGwgZXJyb3IgaWYg
ZGF0YWJhc2UgZXhpc3RzIGFuZCBPVkVSV1JJVEUgaXMgbm90IHNwZWNpZmllZC4KYWRkZWQ6CiAg
bXlzcWwtdGVzdC9zdWl0ZS9iYWNrdXAvci9iYWNrdXBfcmVzdG9yZV9vdmVyd3JpdGUucmVzdWx0
CiAgbXlzcWwtdGVzdC9zdWl0ZS9iYWNrdXAvdC9iYWNrdXBfcmVzdG9yZV9vdmVyd3JpdGUudGVz
dAptb2RpZmllZDoKICBteXNxbC10ZXN0L2xpYi9tdHJfcmVwb3J0LnBsCiAgbXlzcWwtdGVzdC9z
dWl0ZS9iYWNrdXAvci9iYWNrdXAucmVzdWx0CiAgbXlzcWwtdGVzdC9zdWl0ZS9iYWNrdXAvci9i

...

DETAILS
-------

>  2727 Jorgen Loland	2008-11-07
>       Bug#34579 - Backup: Restore overwrites the new / modified data without warning
>       
>       Add OVERWRITE flag to RESTORE command
>       
>       Before, RESTORE would overwrite existing DBs with same name. With this patch,
> RESTORE will error if database exists and OVERWRITE is not specified.

...

> === added file 'mysql-test/suite/backup/t/backup_restore_overwrite.test'
> --- a/mysql-test/suite/backup/t/backup_restore_overwrite.test	1970-01-01 00:00:00
> +0000
> +++ b/mysql-test/suite/backup/t/backup_restore_overwrite.test	2008-11-07 11:31:08
> +0000
> @@ -0,0 +1,34 @@
> +#
> +# This test is designed to test the RESTORE ... OVERWRITE functionality
> +#
> +
> +--source include/not_embedded.inc
> +
> +--echo Initialize
> +CREATE DATABASE overwrite_bup;
> +USE overwrite_bup;
> +CREATE TABLE table1 (text VARCHAR(20));
> +INSERT INTO table1 VALUES ('Inserted before');
> +
> +--echo 
> +--echo Backup database
> +--replace_column 1 #
> +BACKUP DATABASE overwrite_bup TO 'overwrite.bak';
> +
> +--echo 
> +--echo Insert more data and display
> +INSERT INTO table1 VALUES ('Inserted after');
> +SELECT * FROM table1;
> +
> +--echo 
> +--echo Restore without overwrite; will fail
> +--error ER_RESTORE_DB_EXISTS
> +RESTORE FROM 'overwrite.bak';
> +
> +--echo 
> +--replace_column 1 #
> +RESTORE FROM 'overwrite.bak' OVERWRITE;
> +
> +--echo 
> +--echo Show that inserted value 2 is not there
> +SELECT * FROM table1;

[2] I think this test belongs in backup_errors. That's where we conduct 
similar test cases. I don't see anything specific here to warrant a new 
test.

Chuck

Logging: ./mysql-test-run.pl --do-test=backup --suite=rpl,backup,backup_engines --force
MySQL Version 6.0.9
Using dynamic switching of binlog format
Skipping ndbcluster, mysqld not compiled with ndbcluster
Setting mysqld to support SSL connections
Binaries are debug compiled
Using MTR_BUILD_THREAD      = 0
Using MASTER_MYPORT         = 9306
Using MASTER_MYPORT1        = 9307
Using SLAVE_MYPORT          = 9308
Using SLAVE_MYPORT1         = 9309
Using SLAVE_MYPORT2         = 9310
 - adding combinations
 - adding combinations
Killing Possible Leftover Processes
Removing Stale Files
Creating Directories
Installing Master Database
Installing Slave1 Database
Saving snapshot of installed databases
=======================================================

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

rpl.rpl_backup 'row'           [ pass ]           2862
rpl.rpl_backup 'stmt'          [ pass ]           2467
rpl.rpl_backup 'mix'           [ pass ]           2723
backup.backup                  [ pass ]           3597
backup.backup_backupdir        [ pass ]            701
backup.backup_blob             [ pass ]           1058
backup.backup_charsets         [ pass ]            169
backup.backup_commit_backup    [ pass ]            308
backup.backup_commit_blocker   [ pass ]            785
backup.backup_commit_restore   [ pass ]           1462
backup.backup_compression      [ pass ]            365
backup.backup_concurrent       [ pass ]            297
backup.backup_db_grants        [ pass ]            556
backup.backup_ddl_blocker      [ disabled ]  Bug#17823 2008-10-09 rafal Tests in main
suite leave undeleted files causing this test to fail
backup.backup_default          [ pass ]            233
backup.backup_errors           [ pass ]            762
backup.backup_fkey             [ pass ]            486
backup.backup_lock_myisam      [ pass ]           3014
backup.backup_logs             [ pass ]            929
backup.backup_logs_output      [ pass ]           1046
backup.backup_logs_purge       [ pass ]           9341
backup.backup_many_dbs         [ pass ]           2165
backup.backup_multi_blocks     [ pass ]            178
backup.backup_myisam1          [ pass ]            128
backup.backup_myisam2          [ pass ]            453
backup.backup_no_be            [ fail ]

mysqltest: At line 87: query 'RESTORE FROM 'db1.bak'' failed: 1746: Database 'db1' already
exists. Use OVERWRITE flag to overwrite.

The result from queries just before the failure was:
< snip >
WHERE command LIKE 'BACKUP DATABASE db1 %';
SELECT drivers FROM mysql.backup_history WHERE backup_id=@id;
drivers
MyISAM
SET SESSION debug="+d,backup_test_dummy_be_factory";
SELECT @@debug;
@@debug
d,backup_test_dummy_be_factory
BACKUP DATABASE db1 TO 'db1.bak';
backup_id
#
SHOW WARNINGS;
Level	Code	Message
Warning	#	Cannot create backup engine for storage engine MyISAM
SELECT max(backup_id) INTO @id FROM mysql.backup_history 
WHERE command LIKE 'BACKUP DATABASE db1 %';
SELECT drivers FROM mysql.backup_history WHERE backup_id=@id;
drivers
Default
RESTORE FROM 'db1.bak';

More results from queries before failure can be found in
c:\source\bzr\mysql-6.0-bug-34579\mysql-test\var\log\backup_no_be.log

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

backup.backup_no_data          [ disabled ]  Bug#17823 2008-10-09 rafal Tests in main
suite leave undeleted files causing this test to fail
backup.backup_no_engine        [ disabled ]  Bug#36021 2008-04-13 rsomla server crashes
when openning table with unknown storage engine
backup.backup_nodata_driver    [ fail ]

mysqltest: At line 130: query 'RESTORE FROM 'bup_nodata.bak'' failed: 1146: Table
'bup_data.myisam1' doesn't exist

The result from queries just before the failure was:
< snip >
Period	Vapor_period
DROP DATABASE bup_data;
show data
SHOW FULL TABLES FROM bup_nodata;
Tables_in_bup_nodata	Table_type
b1	BASE TABLE
e1	BASE TABLE
f1	BASE TABLE
merge1	BASE TABLE
SELECT * FROM bup_nodata.merge1;
ERROR 42S02: Table 'bup_data.myisam1' doesn't exist
SELECT * FROM bup_nodata.f1;
Got one of the listed errors
SELECT * FROM bup_nodata.b1;
a	b	c
SELECT * FROM bup_nodata.e1;
Period	Vapor_period
DROP DATABASE bup_nodata;
Restoring nodata database.
RESTORE FROM 'bup_nodata.bak';

More results from queries before failure can be found in
c:\source\bzr\mysql-6.0-bug-34579\mysql-test\var\log\backup_nodata_driver.log

Warnings from just before the error:
Error 1146 Table 'bup_data.myisam1' doesn't exist

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

backup.backup_objects          [ pass ]            751
backup.backup_procedures       [ pass ]            178
backup.backup_restore_overwrite [ pass ]            146
backup.backup_securefilepriv   [ pass ]            720
backup.backup_security         [ pass ]            327
backup.backup_snapshot         [ pass ]            445
backup.backup_tablespace       [ pass ]            218
backup.backup_timeout          [ pass ]           1317
backup.backup_triggers_and_events [ disabled ]  Bug#37762 2008-07-01 rafal Test fails on
remove_file for unknown reasons
backup.backup_views            [ pass ]           1944
backup_engines.backup_functions 'myisam' [ pass ]            754
backup_engines.backup_online_testing 'myisam' [ pass ]           2372
backup_engines.backup_procedures 'myisam' [ pass ]            407
backup_engines.backup_ptr_commit_mixed 'myisam' [ skipped ]   "This test does not support
Myisam engine"
backup_engines.backup_ptr_commit_row 'myisam' [ skipped ]   "This test does not support
Myisam engine"
backup_engines.backup_ptr_commit_stmt 'myisam' [ skipped ]   "This test does not support
Myisam engine"
backup_engines.backup_ptr_mixed 'myisam' [ fail ]

Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 00782E48, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 00782450, allocated at line  201 in '..\mysys\my_alloc.c'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 01B02E48, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 01B02450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (8229 bytes):
	  8193 bytes at 009230E0, allocated at line  155 in '.\readline.cc'
	    36 bytes at 008F2838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 00132E48, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 00132450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 01D2B520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 01D22838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 01C12E48, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 01C12450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 0021B520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 00212838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 4
Warning: Memory that was not free'ed (600 bytes):
	   104 bytes at 01AC2F08, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	    20 bytes at 01AC2710, allocated at line  638 in '..\mysys\my_getopt.c'
	    20 bytes at 01AC26B0, allocated at line  638 in '..\mysys\my_getopt.c'
	   456 bytes at 01AC2450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (8229 bytes):
	  8193 bytes at 00A630E0, allocated at line  155 in '.\readline.cc'
	    36 bytes at 00A32838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 4
Warning: Memory that was not free'ed (600 bytes):
	   104 bytes at 01AF2F08, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	    20 bytes at 01AF2710, allocated at line  638 in '..\mysys\my_getopt.c'
	    20 bytes at 01AF26B0, allocated at line  638 in '..\mysys\my_getopt.c'
	   456 bytes at 01AF2450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 00ADB520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 00AD2838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 4
Warning: Memory that was not free'ed (600 bytes):
	   104 bytes at 01C22F08, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	    20 bytes at 01C22710, allocated at line  638 in '..\mysys\my_getopt.c'
	    20 bytes at 01C226B0, allocated at line  638 in '..\mysys\my_getopt.c'
	   456 bytes at 01C22450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 003EB520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 003E2838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 01CB2E48, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 01CB2450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (8229 bytes):
	  8193 bytes at 008C30E0, allocated at line  155 in '.\readline.cc'
	    36 bytes at 00BD2838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 4
Warning: Memory that was not free'ed (600 bytes):
	   104 bytes at 00F12F08, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	    20 bytes at 00F12710, allocated at line  638 in '..\mysys\my_getopt.c'
	    20 bytes at 00F126B0, allocated at line  638 in '..\mysys\my_getopt.c'
	   456 bytes at 00F12450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (8229 bytes):
	  8193 bytes at 00A130E0, allocated at line  155 in '.\readline.cc'
	    36 bytes at 00052838, allocated at line   34 in '.\readline.cc'
---
c:/source/bzr/mysql-6.0-bug-34579/mysql-test/suite/backup_engines/r/backup_ptr_mixed.result	2008-11-08
00:20:36.465355900 +0300
+++
c:\source\bzr\mysql-6.0-bug-34579\mysql-test\suite\backup_engines\r\backup_ptr_mixed.reject	2008-11-08
02:26:28.396000000 +0300
@@ -653,6 +653,7 @@
 Database
 information_schema
 mysql
+overwrite_bup
 ptr
 test
 SHOW TABLES FROM ptr;
@@ -717,6 +718,7 @@
 Database
 information_schema
 mysql
+overwrite_bup
 ptr
 test
 SHOW TABLES FROM ptr;
@@ -781,6 +783,7 @@
 Database
 information_schema
 mysql
+overwrite_bup
 ptr
 test
 SHOW TABLES FROM ptr;

mysqltest: Result content mismatch

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

backup_engines.backup_ptr_objects_mixed 'myisam' [ pass ]           4024
backup_engines.backup_ptr_objects_row 'myisam' [ pass ]           4554
backup_engines.backup_ptr_objects_stmt 'myisam' [ pass ]           3929
backup_engines.backup_ptr_row 'myisam' [ pass ]           2196
backup_engines.backup_ptr_stmt 'myisam' [ pass ]           1890
backup_engines.backup_tmp_tables 'myisam' [ fail ]

mysqltest: At line 54: query 'RESTORE FROM 'db.bkp'' failed: 1746: Database 'db' already
exists. Use OVERWRITE flag to overwrite.

The result from queries just before the failure was:
< snip >
CREATE VIEW v1 AS SELECT * FROM t1;
** Store table's definition for later check
** Insert some data into the tables
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES ('x');
** Create temporary tables with the same name, but different layout
** and using different storage engines
CREATE TEMPORARY TABLE t1 (b text, c int) ENGINE=MyISAM;
CREATE TEMPORARY TABLE t2 (b int, c blob) ENGINE=InnoDB;
** Insert data into the temporary tables
INSERT INTO t1 VALUES ('foo', 2);
INSERT INTO t2 VALUES (3, 'bar');
** Backup database
BACKUP DATABASE db TO 'db.bkp';
backup_id
#
** Drop and restore the database
DROP TABLE t1;
DROP TABLE t2;
RESTORE FROM 'db.bkp';

More results from queries before failure can be found in
c:\source\bzr\mysql-6.0-bug-34579\mysql-test\var\log\backup_tmp_tables.log

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

backup_engines.backup_triggers 'myisam' [ pass ]            990
backup_engines.backup_functions 'falcon' [ pass ]            625
backup_engines.backup_online_testing 'falcon' [ pass ]           1626
backup_engines.backup_procedures 'falcon' [ pass ]            379
backup_engines.backup_ptr_commit_mixed 'falcon' [ skipped ]   "This test does not support
Falcon engine"
backup_engines.backup_ptr_commit_row 'falcon' [ skipped ]   "This test does not support
Falcon engine"
backup_engines.backup_ptr_commit_stmt 'falcon' [ skipped ]   "This test does not support
Falcon engine"
backup_engines.backup_ptr_mixed 'falcon' [ pass ]           2261
backup_engines.backup_ptr_objects_mixed 'falcon' [ pass ]           4182
backup_engines.backup_ptr_objects_row 'falcon' [ pass ]           4183
backup_engines.backup_ptr_objects_stmt 'falcon' [ skipped ]   "This test does not support
Falcon engine"
backup_engines.backup_ptr_row 'falcon' [ pass ]           2273
backup_engines.backup_ptr_stmt 'falcon' [ skipped ]   "This test does not support Falcon
engine"
backup_engines.backup_tmp_tables 'falcon' [ fail ]

mysqltest: At line 54: query 'RESTORE FROM 'db.bkp'' failed: 1746: Database 'db' already
exists. Use OVERWRITE flag to overwrite.

The result from queries just before the failure was:
< snip >
CREATE VIEW v1 AS SELECT * FROM t1;
** Store table's definition for later check
** Insert some data into the tables
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES ('x');
** Create temporary tables with the same name, but different layout
** and using different storage engines
CREATE TEMPORARY TABLE t1 (b text, c int) ENGINE=MyISAM;
CREATE TEMPORARY TABLE t2 (b int, c blob) ENGINE=InnoDB;
** Insert data into the temporary tables
INSERT INTO t1 VALUES ('foo', 2);
INSERT INTO t2 VALUES (3, 'bar');
** Backup database
BACKUP DATABASE db TO 'db.bkp';
backup_id
#
** Drop and restore the database
DROP TABLE t1;
DROP TABLE t2;
RESTORE FROM 'db.bkp';

More results from queries before failure can be found in
c:\source\bzr\mysql-6.0-bug-34579\mysql-test\var\log\backup_tmp_tables.log

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

backup_engines.backup_triggers 'falcon' [ pass ]            861
backup_engines.backup_functions 'memory' [ pass ]            476
backup_engines.backup_online_testing 'memory' [ pass ]           1601
backup_engines.backup_procedures 'memory' [ pass ]            360
backup_engines.backup_ptr_commit_mixed 'memory' [ skipped ]   "This test does not support
memory engine"
backup_engines.backup_ptr_commit_row 'memory' [ skipped ]   "This test does not support
memory engine"
backup_engines.backup_ptr_commit_stmt 'memory' [ skipped ]   "This test does not support
memory engine"
backup_engines.backup_ptr_mixed 'memory' [ skipped ]   "This test does not support memory
engine"
backup_engines.backup_ptr_objects_mixed 'memory' [ skipped ]   "This test does not support
memory engine"
backup_engines.backup_ptr_objects_row 'memory' [ skipped ]   "This test does not support
memory engine"
backup_engines.backup_ptr_objects_stmt 'memory' [ skipped ]   "This test does not support
memory engine"
backup_engines.backup_ptr_row 'memory' [ skipped ]   "This test does not support memory
engine"
backup_engines.backup_ptr_stmt 'memory' [ skipped ]   "This test does not support memory
engine"
backup_engines.backup_tmp_tables 'memory' [ fail ]

mysqltest: At line 54: query 'RESTORE FROM 'db.bkp'' failed: 1746: Database 'db' already
exists. Use OVERWRITE flag to overwrite.

The result from queries just before the failure was:
< snip >
CREATE VIEW v1 AS SELECT * FROM t1;
** Store table's definition for later check
** Insert some data into the tables
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES ('x');
** Create temporary tables with the same name, but different layout
** and using different storage engines
CREATE TEMPORARY TABLE t1 (b text, c int) ENGINE=MyISAM;
CREATE TEMPORARY TABLE t2 (b int, c blob) ENGINE=InnoDB;
** Insert data into the temporary tables
INSERT INTO t1 VALUES ('foo', 2);
INSERT INTO t2 VALUES (3, 'bar');
** Backup database
BACKUP DATABASE db TO 'db.bkp';
backup_id
#
** Drop and restore the database
DROP TABLE t1;
DROP TABLE t2;
RESTORE FROM 'db.bkp';

More results from queries before failure can be found in
c:\source\bzr\mysql-6.0-bug-34579\mysql-test\var\log\backup_tmp_tables.log

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

backup_engines.backup_triggers 'memory' [ pass ]            694
backup_engines.backup_functions 'innodb' [ pass ]            586
backup_engines.backup_online_testing 'innodb' [ pass ]           1493
backup_engines.backup_procedures 'innodb' [ pass ]            381
backup_engines.backup_ptr_commit_mixed 'innodb' [ fail ]

Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 00182DF8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 00182450, allocated at line  201 in '..\mysys\my_alloc.c'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 01A32DF8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 01A32450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (8229 bytes):
	  8193 bytes at 009530E0, allocated at line  155 in '.\readline.cc'
	    36 bytes at 00922838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 01B02DF8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 01B02450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 00B0B520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 00B02838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 00792DF8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 00792450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 00B1B520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 00B12838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 4
Warning: Memory that was not free'ed (600 bytes):
	   104 bytes at 00132EB8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	    20 bytes at 001326C0, allocated at line  638 in '..\mysys\my_getopt.c'
	    20 bytes at 00132660, allocated at line  638 in '..\mysys\my_getopt.c'
	   456 bytes at 00132450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (8229 bytes):
	  8193 bytes at 009530E0, allocated at line  155 in '.\readline.cc'
	    36 bytes at 00A42838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 4
Warning: Memory that was not free'ed (600 bytes):
	   104 bytes at 00842EB8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	    20 bytes at 008426C0, allocated at line  638 in '..\mysys\my_getopt.c'
	    20 bytes at 00842660, allocated at line  638 in '..\mysys\my_getopt.c'
	   456 bytes at 00842450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 00B6B520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 00B62838, allocated at line   34 in '.\readline.cc'
mysqltest: In included file ".\suite\backup_engines\include\backup_ptr_commit.inc": At
line 205: query 'RESTORE FROM 'ptr_commit.bak'' failed: 1746: Database 'ptr' already
exists. Use OVERWRITE flag to overwrite.

The result from queries just before the failure was:
< snip >
10	After Backup1
20	After Backup2
SELECT * FROM ptr.t2;
id	info
201	aa1
202	After Backup-1
203	During backup-1
204	During backup-2
SELECT * FROM ptr.t3;
id	name
1	hh1
2	After Backup-1
3	ab3
4	ab4
5	ab5
*** TEST4 *** 
Perform Restore and Recover committed data using mysqlbinlog position
after backup.
Perform restore operation
RESTORE FROM 'ptr_commit.bak';

More results from queries before failure can be found in
c:\source\bzr\mysql-6.0-bug-34579\mysql-test\var\log\backup_ptr_commit_mixed.log

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

backup_engines.backup_ptr_commit_row 'innodb' [ fail ]

Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 000D2DF8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 000D2450, allocated at line  201 in '..\mysys\my_alloc.c'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 00E62DF8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 00E62450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (8229 bytes):
	  8193 bytes at 00AF30E0, allocated at line  155 in '.\readline.cc'
	    36 bytes at 00AC2838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 00082DF8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 00082450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 01D4B520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 01D42838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 01B32DF8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 01B32450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 0038B520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 00382838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 4
Warning: Memory that was not free'ed (600 bytes):
	   104 bytes at 00332EB8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	    20 bytes at 003326C0, allocated at line  638 in '..\mysys\my_getopt.c'
	    20 bytes at 00332660, allocated at line  638 in '..\mysys\my_getopt.c'
	   456 bytes at 00332450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (8229 bytes):
	  8193 bytes at 00AC30E0, allocated at line  155 in '.\readline.cc'
	    36 bytes at 009E2838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 4
Warning: Memory that was not free'ed (600 bytes):
	   104 bytes at 01B02EB8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	    20 bytes at 01B026C0, allocated at line  638 in '..\mysys\my_getopt.c'
	    20 bytes at 01B02660, allocated at line  638 in '..\mysys\my_getopt.c'
	   456 bytes at 01B02450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 00AEB520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 00AE2838, allocated at line   34 in '.\readline.cc'
mysqltest: In included file ".\suite\backup_engines\include\backup_ptr_commit.inc": At
line 205: query 'RESTORE FROM 'ptr_commit.bak'' failed: 1746: Database 'ptr' already
exists. Use OVERWRITE flag to overwrite.

The result from queries just before the failure was:
< snip >
10	After Backup1
20	After Backup2
SELECT * FROM ptr.t2;
id	info
201	aa1
202	After Backup-1
203	During backup-1
204	During backup-2
SELECT * FROM ptr.t3;
id	name
1	hh1
2	After Backup-1
3	ab3
4	ab4
5	ab5
*** TEST4 *** 
Perform Restore and Recover committed data using mysqlbinlog position
after backup.
Perform restore operation
RESTORE FROM 'ptr_commit.bak';

More results from queries before failure can be found in
c:\source\bzr\mysql-6.0-bug-34579\mysql-test\var\log\backup_ptr_commit_row.log

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

backup_engines.backup_ptr_commit_stmt 'innodb' [ fail ]

Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 01992DF8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 01992450, allocated at line  201 in '..\mysys\my_alloc.c'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 01AF2DF8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 01AF2450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (8229 bytes):
	  8193 bytes at 009830E0, allocated at line  155 in '.\readline.cc'
	    36 bytes at 00152838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 00262DF8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 00262450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 0099B520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 00992838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (560 bytes):
	   104 bytes at 00D42DF8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	   456 bytes at 00D42450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 01D5B520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 01D52838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 4
Warning: Memory that was not free'ed (600 bytes):
	   104 bytes at 01C72EB8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	    20 bytes at 01C726C0, allocated at line  638 in '..\mysys\my_getopt.c'
	    20 bytes at 01C72660, allocated at line  638 in '..\mysys\my_getopt.c'
	   456 bytes at 01C72450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (8229 bytes):
	  8193 bytes at 009830E0, allocated at line  155 in '.\readline.cc'
	    36 bytes at 01D12838, allocated at line   34 in '.\readline.cc'
Warning: Not freed memory segments: 4
Warning: Memory that was not free'ed (600 bytes):
	   104 bytes at 019F2EB8, allocated at line 1020 in
'C:\source\bzr\mysql-6.0-bug-34579\sql\log_event.cc'
	    20 bytes at 019F26C0, allocated at line  638 in '..\mysys\my_getopt.c'
	    20 bytes at 019F2660, allocated at line  638 in '..\mysys\my_getopt.c'
	   456 bytes at 019F2450, allocated at line  201 in '..\mysys\my_alloc.c'
c:\source\bzr\mysql-6.0-bug-34579\client\debug\\mysql.exe: Error reading file '(null)'
(Errcode: 32)
Warning: Not freed memory segments: 2
Warning: Memory that was not free'ed (4133 bytes):
	  4097 bytes at 0084B520, allocated at line   97 in '.\readline.cc'
	    36 bytes at 00842838, allocated at line   34 in '.\readline.cc'
mysqltest: In included file ".\suite\backup_engines\include\backup_ptr_commit.inc": At
line 205: query 'RESTORE FROM 'ptr_commit.bak'' failed: 1746: Database 'ptr' already
exists. Use OVERWRITE flag to overwrite.

The result from queries just before the failure was:
< snip >
10	After Backup1
20	After Backup2
SELECT * FROM ptr.t2;
id	info
201	aa1
202	After Backup-1
203	During backup-1
204	During backup-2
SELECT * FROM ptr.t3;
id	name
1	hh1
2	After Backup-1
3	ab3
4	ab4
5	ab5
*** TEST4 *** 
Perform Restore and Recover committed data using mysqlbinlog position
after backup.
Perform restore operation
RESTORE FROM 'ptr_commit.bak';

More results from queries before failure can be found in
c:\source\bzr\mysql-6.0-bug-34579\mysql-test\var\log\backup_ptr_commit_stmt.log

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

backup_engines.backup_ptr_mixed 'innodb' [ pass ]           2010
backup_engines.backup_ptr_objects_mixed 'innodb' [ skipped ]   "This test does not support
Innodb engine"
backup_engines.backup_ptr_objects_row 'innodb' [ pass ]           4123
backup_engines.backup_ptr_objects_stmt 'innodb' [ skipped ]   "This test does not support
Innodb engine"
backup_engines.backup_ptr_row 'innodb' [ pass ]           1976
backup_engines.backup_ptr_stmt 'innodb' [ pass ]           2026
backup_engines.backup_tmp_tables 'innodb' [ fail ]

mysqltest: At line 54: query 'RESTORE FROM 'db.bkp'' failed: 1746: Database 'db' already
exists. Use OVERWRITE flag to overwrite.

The result from queries just before the failure was:
< snip >
CREATE VIEW v1 AS SELECT * FROM t1;
** Store table's definition for later check
** Insert some data into the tables
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES ('x');
** Create temporary tables with the same name, but different layout
** and using different storage engines
CREATE TEMPORARY TABLE t1 (b text, c int) ENGINE=MyISAM;
CREATE TEMPORARY TABLE t2 (b int, c blob) ENGINE=InnoDB;
** Insert data into the temporary tables
INSERT INTO t1 VALUES ('foo', 2);
INSERT INTO t2 VALUES (3, 'bar');
** Backup database
BACKUP DATABASE db TO 'db.bkp';
backup_id
#
** Drop and restore the database
DROP TABLE t1;
DROP TABLE t2;
RESTORE FROM 'db.bkp';

More results from queries before failure can be found in
c:\source\bzr\mysql-6.0-bug-34579\mysql-test\var\log\backup_tmp_tables.log

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

backup_engines.backup_triggers 'innodb' [ pass ]           1248
-------------------------------------------------------
Stopping All Servers
Failed 10/72 tests, 86.11% were successful.

The log files in var/log may give you some hint
of what went wrong.
If you want to report this error, please read first the documentation at
http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html
The servers were restarted 33 times
Spent 96.611 of 271 seconds executing testcases

mysql-test-run in default mode: *** Failing the test(s): backup.backup_no_be
backup.backup_nodata_driver backup_engines.backup_ptr_mixed
backup_engines.backup_tmp_tables backup_engines.backup_tmp_tables
backup_engines.backup_tmp_tables backup_engines.backup_ptr_commit_mixed
backup_engines.backup_ptr_commit_row backup_engines.backup_ptr_commit_stmt
backup_engines.backup_tmp_tables

Thread
bzr commit into mysql-6.0-backup branch (jorgen.loland:2727) Bug#34579Jorgen Loland7 Nov
  • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2727)Bug#34579Chuck Bell8 Nov
  • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2727)Bug#34579Rafal Somla8 Nov