List:Commits« Previous MessageNext Message »
From:Rafal Somla Date:May 4 2010 10:01am
Subject:Re: bzr commit into mysql-5.1 branch (ingo.struewing:3449) WL#5322
View as plain text  
Hi Ingo,

Could you push the extreme_data.inc and friends. For the make_cnf.inc and 
meb_integrity.test, I'll use them for my work and push together with my 
previous patch. Do you agree?

See also some comments and one typo below.

Rafal

Ingo Struewing wrote:
> #At file:///home2/mydev/bzrroot/mysql-5.1-wl5322-1/ based on
> revid:rafal.somla@stripped
> 
>  3449 Ingo Struewing	2010-05-04
>       WL#5322 - Verify data consistency in IHB
>       
>       First version. Preliminary test.
>       
>       This patch contains a couple of include files to use for
>       test data creation, selection and cleanup, as well as a
>       stub for a test that uses these files.
>       
>       Note that the call to innobackup is preliminary in several
>       ways. A good flexible way to do this is in the works.
>       
>       Note that no retore is included as it needs a predictable
>       name for the backup target directory. This will be provided
>       later.
>      @ mysql-test/suite/meb/include/extreme_data.inc
>         WL#5322 - Verify data consistency in IHB
>         New include file for test data set up.
>      @ mysql-test/suite/meb/include/extreme_drop.inc
>         WL#5322 - Verify data consistency in IHB
>         New include file for test data clean up.
>      @ mysql-test/suite/meb/include/extreme_show.inc
>         WL#5322 - Verify data consistency in IHB
>         New include file for test data selection.
>      @ mysql-test/suite/meb/include/make_cnf.inc
>         WL#5322 - Verify data consistency in IHB
>         new, preliminary include file to generate a .cnf file
>         for use by innobackup.
>      @ mysql-test/suite/meb/r/meb_integrity.result
>         WL#5322 - Verify data consistency in IHB
>         New test result.
>      @ mysql-test/suite/meb/t/meb_integrity.test
>         WL#5322 - Verify data consistency in IHB
>         New test file with preliminary use of innobackup.
> 
>     added:
>       mysql-test/suite/meb/include/extreme_data.inc
>       mysql-test/suite/meb/include/extreme_drop.inc
>       mysql-test/suite/meb/include/extreme_show.inc
>       mysql-test/suite/meb/include/make_cnf.inc
>       mysql-test/suite/meb/r/meb_integrity.result
>       mysql-test/suite/meb/t/meb_integrity.test
> === added file 'mysql-test/suite/meb/include/extreme_data.inc'
> --- a/mysql-test/suite/meb/include/extreme_data.inc	1970-01-01 00:00:00 +0000
> +++ b/mysql-test/suite/meb/include/extreme_data.inc	2010-05-04 08:38:48 +0000
> @@ -0,0 +1,569 @@
> +#
> +# Create some databases and tables with all sorts of datatypes.
> +# Insert extreme and arbitraty values.
> +#
> +# Needs variables:
> +#
> +#   $ENGINE_1                   storage engine for some tables
> +#   $ENGINE_2                   storage engine for other tables
> +#   $ENGINE_3                   storage engine for more tables
> +#   $ENGINE_3_USES_TABLESPACE   storage engine uses tablespaces
> +#
> +#   The engines must be capable of all data types supported by MySQL.
> +#

Would be nice to add a short summary of what objects are created (can be 
done later).

> +--disable_warnings
> +DROP DATABASE IF EXISTS meb_extreme_db1;
> +DROP DATABASE IF EXISTS MEB_EXTREME_DB2;
> +DROP DATABASE IF EXISTS MebExtreme_Db3;

My personal preference is to use short names - saves a lot of typing in the 
tests. I would use db1, DB2 and Db3. However I see that it will not play 
with your show_extreme.inc test...

> +--enable_warnings
> +#
> +--echo #
> +--echo # Check setting of lower_case_table_names.
> +--echo #
> +SELECT @@lower_case_table_names;
> +#
> +--echo #
> +--echo # Set character set for table contents.
> +--echo #
> +SET NAMES 'utf8';
> +#
> +--echo #
> +--echo # Create some databases.
> +--echo #
> +CREATE DATABASE meb_extreme_db1;
> +CREATE DATABASE MEB_EXTREME_DB2;
> +CREATE DATABASE MebExtreme_db3;

E: From above, the third database should be called `..._Db3` (note case of 
letter D).

> === added file 'mysql-test/suite/meb/t/meb_integrity.test'
> --- a/mysql-test/suite/meb/t/meb_integrity.test	1970-01-01 00:00:00 +0000
> +++ b/mysql-test/suite/meb/t/meb_integrity.test	2010-05-04 08:38:48 +0000
> @@ -0,0 +1,68 @@
> +#
> +# WL#5322 - Verify data consistency in IHB
> +#
> +
> +#
> +# innobackup needs to connect to the server. Not supported in embedded.
> +#
> +--source include/not_embedded.inc
> +
> +#
> +# Configure the engines to use for the tables in extreme_data.inc.
> +# Note that these engines must support all data types supported by MySQL.
> +#
> +--let $ENGINE_1 = MyISAM
> +#
> +--let $ENGINE_2 = InnoDB
> +--source include/have_innodb.inc
> +#
> +--let $ENGINE_3 = InnoDB
> +--let $ENGINE_3_USES_TABLESPACE = 0
> +--source include/have_innodb.inc
> +
> +#
> +# Create tables and populate them with extreme and arbitrary values.
> +#
> +--source suite/meb/include/extreme_data.inc
> +
> +#
> +# Show the created data as a reference.
> +#
> +--source suite/meb/include/extreme_show.inc
> +
> +#
> +# WARNING: This way to create a .cnf file for innobackup is preliminary!
> +#          If you include it in your tests, be prepared to change it later!
> +#
> +--source suite/meb/include/make_cnf.inc
> +
> +#
> +# WARNING: This way to call innobackup is preliminary!
> +#          It assumes IHB in suite/meb/include!
> +#          And innobackup assumes to find the "mysql" client in PATH!
> +#          If you include it in your tests, be prepared to change it later!
> +#
> +--echo
> +--echo #
> +--echo # Running innobackup
> +--exec $MYSQL_TEST_DIR/suite/meb/include/innobackup
> --ibbackup=$MYSQL_TEST_DIR/suite/meb/include/ibbackup
> --socket=$MYSQLTEST_VARDIR/tmp/mysqld.1.sock --user=root
> $MYSQLTEST_VARDIR/tmp/hot_backup_my.cnf $MYSQLTEST_VARDIR/tmp >
> $MYSQLTEST_VARDIR/tmp/innobackup.log 2>&1

I'd like to try to reformulate it using my have_meb.inc setup. That is, the 
invocation would look like this:

--exec $INNOBACKUP --socket=$MYSQLD_SOCK --user=root $SERVER_CNF $BACKUP_DIR 
   ...

Rafal

Thread
bzr commit into mysql-5.1 branch (ingo.struewing:3449) WL#5322Ingo Struewing4 May
  • Re: bzr commit into mysql-5.1 branch (ingo.struewing:3449) WL#5322Rafal Somla4 May