List:Commits« Previous MessageNext Message »
From:Ingo Strüwing Date:November 11 2008 10:56am
Subject:Re: bzr commit into mysql-6.0 branch (satya.bn:2902) Bug#36573
View as plain text  
Hi Satya,

satya, 11.11.2008 07:24:
...
> This functionality exists with the current patch. I have added
> the testcase to test this. Will submit with the new patch.

Ok. Thanks.

...
> I have a problem with this. When I add 2>&1 to the test , the negative
> test case prints
> the error message with the current file path to the result file. I have
> gone through the
> test framework and test commands manual. Couldn't find anything related
> to this.
> Any ideas on how to fix  this?

--replace_regex should work. I attached the test case
backup_client.test, which shows, how I do this. It starts with an
explanation of all used regular expressions. You'll find the use of them
before the calls "exec $MYSQL_BACKUP ...".

Note that these regular expressions work on Linux and Windows. So it
should be safe to use them. However, I must admit that I haven't seen
any pushbuild run with them yet. But I've seen "2>&1" in other test
cases too, e.g. mysql.test, mysqldump.test, perror.test.

Regards
Ingo
-- 
Ingo Strüwing, Database Group
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schröder, Wolfgang Engels, Dr. Roland Bömer
Vorsitzender des Aufsichtsrates: Martin Häring   HRB München 161028

--echo #
--echo # WL#4534 - Backup client program
--echo #
--echo # Tests with no binlog turned on.
--echo #
#
# Note: Use of regular expressions in this file:
#
#   This test case uses two sets of replacements by regular expressions.
#   1. For cases where program output is expected.
#      It consists of the following replacements:
#      /Image path: [^[.newline.]]*/Image path: #/
#        Replace everything behind "Image path: " until newline,
#        but excluding newline by "#".
#      /Image size: [^[.newline.]]*/Image size: #/
#        Replace everything behind "Image size: " until newline,
#        but excluding newline by "#".
#      / time: [^[.newline.]]*/ time: #/
#        Replace everything behind " time: " until newline,
#        but excluding newline by "#".
#      /Server version: [^[.newline.]]*/Server version: #/
#        Replace everything behind "Server version: " until newline,
#        but excluding newline by "#".
#      /'([[:alpha:]]:)?[\/\\][^']*'/#/
#        Replace everything between single quotes, that starts with
#        an optional drive letter and colon plus a slash or backslash
#        by "#". The single quotes are also replaced.
#      /.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
#        Replace everything before "mysqlbackup" or "mysqlbackup.exe",
#        if followed by ": Out of memory ", and everything behind
#        "Out of memory" until newline, but excluding newline by nothing.
#        This settles the differences in output between
#        my_malloc.c:my_malloc() and safemalloc.c:_mymalloc().
#      /.*mysqlbackup(\.exe)?: needed .*//
#        Replace everything before "mysqlbackup" or "mysqlbackup.exe",
#        if followed by ": needed ", and everything behind
#        and everything behind "needed" until newline,
#        and this time *in*cluding newline by nothing.
#        This settles the differences in output between
#        my_malloc.c:my_malloc() and safemalloc.c:_mymalloc().
#        The latter produces one extra line, which is removed here.
#
#   2. For cases where program usage is printed.
#      It consists of the following replacements:
#      /.*mysqlbackup(\.exe)? Ver .* for .* at [^[.newline.]]*/mysqlbackup Ver # for # at
#/
#        Replace everything before "mysqlbackup" or "mysqlbackup.exe",
#        if followed by version and machine information by nothing, and
#        everything between the fixed words and everything behind "at"
#        until newline, but excluding newline by "#".
#      /Usage: .*mysqlbackup(\.exe)? /Usage: mysqlbackup /
#        Replace everything between "Usage: " and "mysqlbackup" or
#        "mysqlbackup.exe" by nothing.
#      /.*mysqlbackup(\.exe)?: unknown option /mysqlbackup: unknown option /
#        Replace everything before "mysqlbackup" or "mysqlbackup.exe",
#        if followed by ": unknown option" by nothing.
#      /debug   [^[.newline.]]*/debug #/
#        Replace everything behind "debug   " until newline,
#        but excluding newline by "#".
#      /open_files_limit   [^[.newline.]]*/open_files_limit #/
#        Replace everything behind "open_files_limit   " until newline,
#        but excluding newline by "#".
#
# Note: --replace_regex does not allow continuation lines.
# Note: Windows cannot parse command line continuation by backspace.
# So please excuse the long lines.
#
--source include/not_embedded.inc
--source include/have_innodb.inc
SET SESSION max_heap_table_size=67108864;
#
--disable_warnings
DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE IF EXISTS mysqltest3;
--enable_warnings
#
--echo #
--echo # Create some databases.
--echo #
CREATE DATABASE mysqltest1;
CREATE DATABASE mysqltest2;
CREATE DATABASE mysqltest3;
--echo #
--echo # Create a table.
--echo #
CREATE TABLE mysqltest1.t1 (
  c1 INT PRIMARY KEY AUTO_INCREMENT,
  c2 VARCHAR(30000)) ENGINE=MyISAM;
INSERT INTO mysqltest1.t1 VALUES(NULL, REPEAT('A', 30000));
INSERT INTO mysqltest1.t1 SELECT NULL, c2 FROM mysqltest1.t1;
INSERT INTO mysqltest1.t1 SELECT NULL, c2 FROM mysqltest1.t1;
INSERT INTO mysqltest1.t1 SELECT NULL, c2 FROM mysqltest1.t1;
INSERT INTO mysqltest1.t1 SELECT NULL, c2 FROM mysqltest1.t1;
INSERT INTO mysqltest1.t1 SELECT NULL, c2 FROM mysqltest1.t1;
#INSERT INTO mysqltest1.t1 SELECT NULL, c2 FROM mysqltest1.t1;
#INSERT INTO mysqltest1.t1 SELECT NULL, c2 FROM mysqltest1.t1;
#INSERT INTO mysqltest1.t1 SELECT NULL, c2 FROM mysqltest1.t1;
#INSERT INTO mysqltest1.t1 SELECT NULL, c2 FROM mysqltest1.t1;
#INSERT INTO mysqltest1.t1 SELECT NULL, c2 FROM mysqltest1.t1;
#SELECT COUNT(*) FROM mysqltest1.t1;
#SELECT c1, SUBSTR(c2 FROM 1 FOR 30) FROM mysqltest1.t1;
--echo #
--echo # Create more tables.
--echo #
CREATE TABLE mysqltest1.t2 ENGINE=InnoDB AS SELECT * FROM mysqltest1.t1;
#SELECT COUNT(*) FROM mysqltest1.t2;
#SELECT c1, SUBSTR(c2 FROM 1 FOR 30) FROM mysqltest1.t2;
CREATE TABLE mysqltest1.t3 ENGINE=MEMORY AS SELECT * FROM mysqltest1.t1;
#
CREATE TABLE mysqltest2.t1 ENGINE=InnoDB AS SELECT * FROM mysqltest1.t1;
CREATE TABLE mysqltest2.t2 ENGINE=MEMORY AS SELECT * FROM mysqltest1.t1;
CREATE TABLE mysqltest2.t3 ENGINE=MyISAM AS SELECT * FROM mysqltest1.t1;
#
CREATE TABLE mysqltest3.t1 ENGINE=MEMORY AS SELECT * FROM mysqltest1.t1;
CREATE TABLE mysqltest3.t2 ENGINE=MyISAM AS SELECT * FROM mysqltest1.t1;
CREATE TABLE mysqltest3.t3 ENGINE=InnoDB AS SELECT * FROM mysqltest1.t1;
--echo #
--echo # Create views.
--echo #
CREATE VIEW mysqltest1.v1 (c1, c2, c3, c4) AS
  SELECT c1, c2, c1 IN (SELECT c1+2 FROM mysqltest1.t1),
  c1 = ALL (SELECT c1 FROM mysqltest1.t1) FROM mysqltest1.t1;
#SHOW CREATE VIEW mysqltest1.v1;
CREATE VIEW mysqltest1.v2 AS SELECT c2, c3 FROM mysqltest1.v1;
#SHOW CREATE VIEW mysqltest1.v2;
#
CREATE VIEW mysqltest2.v1 (c1, c2, c3, c4) AS
  SELECT connection_id(), pi(), current_user(), version();
#SHOW CREATE VIEW mysqltest2.v1;
CREATE VIEW mysqltest2.v2 AS
  SELECT mysqltest2.t2.c1 AS c1, mysqltest2.t2.c2 AS c2
    FROM mysqltest2.t2, mysqltest2.t3 UNION ALL
  SELECT mysqltest2.t2.c1 AS c3, mysqltest2.t2.c2 AS c4
    FROM mysqltest2.t2, mysqltest2.t3;
#SHOW CREATE VIEW mysqltest2.v2;
#
CREATE VIEW mysqltest3.v1 (c1, c2) AS
  SELECT mysqltest1.v1.c1 AS c1, mysqltest2.v2.c1 AS c2
  FROM mysqltest1.v1, mysqltest2.v2
  WHERE mysqltest1.v1.c1 = mysqltest2.v2.c1;
#SHOW CREATE VIEW mysqltest3.v1;
CREATE VIEW mysqltest3.v2 (c1, c2) AS
  SELECT mysqltest1.v1.c1 AS c1, mysqltest2.v2.c1 AS c2
  FROM mysqltest1.v1 LEFT JOIN mysqltest2.v2
  ON (mysqltest1.v1.c1 = mysqltest2.v2.c1);
#SHOW CREATE VIEW mysqltest3.v2;
#
--echo #
--echo # Create users and grants
--echo #
CREATE USER 'bup_user1'@'%';
CREATE USER 'bup_user2';
CREATE USER 'bup_user3'@'%';
REVOKE ALL ON *.* FROM 'bup_user1'@'%';
REVOKE ALL ON *.* FROM 'bup_user2';
GRANT ALL ON mysqltest2.* TO 'bup_user1'@'%';
GRANT SELECT ON mysqltest1.* TO 'bup_user1'@'%';
GRANT INSERT ON mysqltest1.* TO 'bup_user2';
GRANT ALL ON mysqltest1.* TO 'no_user'@'%';
GRANT SELECT (c1) ON mysqltest1.t1 TO 'bup_user1'@'%';
GRANT SELECT (c2), INSERT (c2) ON mysqltest1.t2 TO 'bup_user2';
FLUSH PRIVILEGES;
#
SHOW GRANTS FOR 'bup_user1'@'%';
SHOW GRANTS FOR 'bup_user2';
SHOW GRANTS FOR 'bup_user3'@'%';
SHOW GRANTS FOR 'no_user'@'%';

--echo #
--echo # Backup.
--echo #
#
--error 0, 1
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak
--replace_column 1 #
BACKUP DATABASE mysqltest1, mysqltest2, mysqltest3 TO 'mysqltest.bak';
#
#--echo
#--exec ls -l $MYSQLTEST_VARDIR/master-data
#--echo
#--exec ls -l $MYSQLTEST_VARDIR/master-data/mysqltest[123]
#--echo
#
--error 0, 1
--remove_file /tmp/wl4534-test-1.bak
--copy_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak /tmp/wl4534-test-1.bak
#
--echo
--echo Show help output with --help:
--echo ========vvvvvvvv========
--replace_regex /.*mysqlbackup(\.exe)? Ver .* for .* at [^[.newline.]]*/mysqlbackup Ver #
for # at #/ /Usage: .*mysqlbackup(\.exe)? /Usage: mysqlbackup / /.*mysqlbackup(\.exe)?:
unknown option /mysqlbackup: unknown option / /debug   [^[.newline.]]*/debug #/
/open_files_limit   [^[.newline.]]*/open_files_limit #/
exec $MYSQL_BACKUP --help 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Show help output with -?:
--echo ========vvvvvvvv========
--replace_regex /.*mysqlbackup(\.exe)? Ver .* for .* at [^[.newline.]]*/mysqlbackup Ver #
for # at #/ /Usage: .*mysqlbackup(\.exe)? /Usage: mysqlbackup / /.*mysqlbackup(\.exe)?:
unknown option /mysqlbackup: unknown option / /debug   [^[.newline.]]*/debug #/
/open_files_limit   [^[.newline.]]*/open_files_limit #/
exec $MYSQL_BACKUP -? 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Show version with --version:
--echo ========vvvvvvvv========
--replace_regex /.*mysqlbackup(\.exe)? Ver .* for .* at [^[.newline.]]*/mysqlbackup Ver #
for # at #/ /Usage: .*mysqlbackup(\.exe)? /Usage: mysqlbackup / /.*mysqlbackup(\.exe)?:
unknown option /mysqlbackup: unknown option / /debug   [^[.newline.]]*/debug #/
/open_files_limit   [^[.newline.]]*/open_files_limit #/
exec $MYSQL_BACKUP --version 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Show version with -V:
--echo ========vvvvvvvv========
--replace_regex /.*mysqlbackup(\.exe)? Ver .* for .* at [^[.newline.]]*/mysqlbackup Ver #
for # at #/ /Usage: .*mysqlbackup(\.exe)? /Usage: mysqlbackup / /.*mysqlbackup(\.exe)?:
unknown option /mysqlbackup: unknown option / /debug   [^[.newline.]]*/debug #/
/open_files_limit   [^[.newline.]]*/open_files_limit #/
exec $MYSQL_BACKUP -V 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Minimal output without options:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP $MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Catalog summary:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --catalog-summary $MYSQLTEST_VARDIR/master-data/mysqltest.bak
2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Catalog details:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --catalog-details $MYSQLTEST_VARDIR/master-data/mysqltest.bak
2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Metadata statements:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --metadata-statements $MYSQLTEST_VARDIR/master-data/mysqltest.bak
2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Metadata extra:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --metadata-extra $MYSQLTEST_VARDIR/master-data/mysqltest.bak
2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Snapshots:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --snapshots $MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Data chunks:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --data-chunks $MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Data totals:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --data-totals $MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Summary:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --summary $MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Full set of most relevant information:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --all $MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Full set of most relevant information, verbosely:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP -v --all $MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Full set of most relevant information plus snapshots:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --all --snapshots $MYSQLTEST_VARDIR/master-data/mysqltest.bak
2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Full set of most relevant information plus snapshots, verbosely:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP -v --all --snapshots $MYSQLTEST_VARDIR/master-data/mysqltest.bak
2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Full set of most relevant information plus data chunks:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --all --data-chunks $MYSQLTEST_VARDIR/master-data/mysqltest.bak
2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Full set of most relevant information plus snapshots and data chunks:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --all --snapshots --data-chunks
$MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Full set of information incl snapshots and data chunks, exact numbers:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --all --snapshots --data-chunks --exact
$MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Search for an object:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --search=utf8 $MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Search for another object:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --search=mysqltest2 $MYSQLTEST_VARDIR/master-data/mysqltest.bak
2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Search for an object in databases:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --search=%.t2 $MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Search for an object in databases and show create statement:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --search=%.t2 --metadata-statements
$MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--echo
--echo Search for another object in databases and show create statement:
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP --search=%.v2 --metadata-statements
$MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak
#
--echo #
--echo # Backup with compression.
--echo #
#
--error 0, 1
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bgz
--replace_column 1 #
BACKUP DATABASE mysqltest1, mysqltest2, mysqltest3 TO 'mysqltest.bgz'
  WITH COMPRESSION;
#
--error 0, 1
--remove_file /tmp/wl4534-test-2.bgz
--copy_file $MYSQLTEST_VARDIR/master-data/mysqltest.bgz /tmp/wl4534-test-2.bgz
#
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP -v --all --snapshots $MYSQLTEST_VARDIR/master-data/mysqltest.bgz
2>&1;
--echo ========^^^^^^^^========
#
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bgz
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
DROP DATABASE mysqltest3;
#
--echo #
--echo # Create one empty database.
--echo #
#
CREATE DATABASE mysqltest1;
#
# Backup.
#
--error 0, 1
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak
--replace_column 1 #
BACKUP DATABASE mysqltest1 TO 'mysqltest.bak';
#
--error 0, 1
--remove_file /tmp/wl4534-test-3.bak
--copy_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak /tmp/wl4534-test-3.bak
#
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP -v --all --snapshots --data-chunks
$MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak
DROP DATABASE mysqltest1;
#
--echo #
--echo # Create two empty databases.
--echo #
#
CREATE DATABASE mysqltest1;
CREATE DATABASE mysqltest2;
#
# Backup.
#
--error 0, 1
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak
--replace_column 1 #
BACKUP DATABASE mysqltest1, mysqltest2 TO 'mysqltest.bak';
#
--error 0, 1
--remove_file /tmp/wl4534-test-4.bak
--copy_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak /tmp/wl4534-test-4.bak
#
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP -v --all --snapshots --data-chunks
$MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
#
--echo #
--echo # Create three empty databases.
--echo #
#
CREATE DATABASE mysqltest1;
CREATE DATABASE mysqltest2;
CREATE DATABASE mysqltest3;
#
# Backup.
#
--error 0, 1
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak
--replace_column 1 #
BACKUP DATABASE mysqltest1, mysqltest2, mysqltest3 TO 'mysqltest.bak';
#
--error 0, 1
--remove_file /tmp/wl4534-test-5.bak
--copy_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak /tmp/wl4534-test-5.bak
#
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP -v --all --snapshots --data-chunks
$MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
DROP DATABASE mysqltest3;
#
--echo #
--echo # Create three databases with one element each.
--echo #
#
CREATE DATABASE mysqltest1;
CREATE DATABASE mysqltest2;
CREATE DATABASE mysqltest3;
CREATE TABLE mysqltest1.t1 (c1 INT) ENGINE=MyISAM;
CREATE TABLE mysqltest2.t1 (c1 INT) ENGINE=InnoDB;
CREATE VIEW  mysqltest3.v1 AS
  SELECT mysqltest1.t1.c1 + mysqltest2.t1.c1 AS c1
    FROM mysqltest1.t1, mysqltest2.t1;
#
# Backup.
#
--error 0, 1
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak
--replace_column 1 #
BACKUP DATABASE mysqltest1, mysqltest2, mysqltest3 TO 'mysqltest.bak';
#
--error 0, 1
--remove_file /tmp/wl4534-test-6.bak
--copy_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak /tmp/wl4534-test-6.bak
#
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP -v --all --snapshots --data-chunks
$MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
DROP DATABASE mysqltest3;
#
--echo #
--echo # Create three databases with two elements each.
--echo #
#
CREATE DATABASE mysqltest1;
CREATE DATABASE mysqltest2;
CREATE DATABASE mysqltest3;
CREATE TABLE mysqltest1.t1 (c1 INT) ENGINE=MyISAM;
CREATE TABLE mysqltest1.t2 (c1 INT) ENGINE=MyISAM;
CREATE TABLE mysqltest2.t1 (c1 INT) ENGINE=InnoDB;
CREATE TABLE mysqltest2.t2 (c1 INT) ENGINE=InnoDB;
CREATE VIEW  mysqltest3.v1 AS
  SELECT mysqltest1.t1.c1 + mysqltest2.t1.c1 AS c1
    FROM mysqltest1.t1, mysqltest2.t1;
CREATE VIEW  mysqltest3.v2 AS
  SELECT mysqltest1.t2.c1 + mysqltest2.t2.c1 AS c1
    FROM mysqltest1.t2, mysqltest2.t2;
#
# Backup.
#
--error 0, 1
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak
--replace_column 1 #
BACKUP DATABASE mysqltest1, mysqltest2, mysqltest3 TO 'mysqltest.bak';
#
--error 0, 1
--remove_file /tmp/wl4534-test-7.bak
--copy_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak /tmp/wl4534-test-7.bak
#
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP -v --all --snapshots --data-chunks
$MYSQLTEST_VARDIR/master-data/mysqltest.bak 2>&1;
--echo ========^^^^^^^^========
#
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bak
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
DROP DATABASE mysqltest3;
#
--echo #
--echo # Create one empty database.
--echo #
#
CREATE DATABASE mysqltest1;
#
--echo #
--echo # Backup with compression.
--echo #
#
--error 0, 1
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bgz
--replace_column 1 #
BACKUP DATABASE mysqltest1 TO 'mysqltest.bgz' WITH COMPRESSION;
#
--error 0, 1
--remove_file /tmp/wl4534-test-8.bgz
--copy_file $MYSQLTEST_VARDIR/master-data/mysqltest.bgz /tmp/wl4534-test-8.bgz
#
--echo ========vvvvvvvv========
--replace_regex /Image path: [^[.newline.]]*/Image path: #/ /Image size:
[^[.newline.]]*/Image size: #/ / time: [^[.newline.]]*/ time: #/ /Server version:
[^[.newline.]]*/Server version: #/ /'([[:alpha:]]:)?[\/\\][^']*'/#/
/.*mysqlbackup(\.exe)?: Out of memory [^[.newline.]]*/mysqlbackup: Out of memory/
/.*mysqlbackup(\.exe)?: needed .*//
exec $MYSQL_BACKUP -v --all --snapshots --data-chunks
$MYSQLTEST_VARDIR/master-data/mysqltest.bgz 2>&1;
--echo ========^^^^^^^^========
#
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest.bgz
DROP DATABASE mysqltest1;


Thread
bzr commit into mysql-6.0 branch (satya.bn:2902) Bug#36573Satya B7 Nov
  • Re: bzr commit into mysql-6.0 branch (satya.bn:2902) Bug#36573Ingo Strüwing7 Nov
    • Re: bzr commit into mysql-6.0 branch (satya.bn:2902) Bug#36573satya11 Nov
      • Re: bzr commit into mysql-6.0 branch (satya.bn:2902) Bug#36573Ingo Strüwing11 Nov