mariadb/mysql-test/suite/engines
Shivji Kumar Jha 07ffa9c767 BUG#12359942 - REPLICATION TEST FROM ENGINE SUITE RPL_ROW_UNTIL TIMES OUT
=== Problem ===

The test is dependent on binlog positions and checks
to see if the command 'START SLAVE' functions correctly
with the 'UNTIL' clause added to it. The 'UNTIL' clause
is added to specify that the slave should start and run
until the SQL thread reaches a given point in the master
binary log or in the slave relay log.

The test uses hard coded values for MASTER_LOG_POS and
RELAY_LOG_POS, instead of extracting it using
query_get_value() function. There is a test
'rpl.rpl_row_until' which does the similar thing but uses 
query_get_value() function to set the values of
MASTER_LOG_POS/ RELAY_LOG_POS. To be precise,
rpl.rpl_row_until is a modified version of
engines/func.rpl_row_until.test.

The use of hard coded values may lead the slave to stop at a position
which may differ from the expected position in the binlog file,
an example being the failure of engines/funcs.rpl_row_until in 
mysql-5.1 given as: 
"query 'select * from t2' failed. Table 'test.t2' doesn't exist".
In this case, the slave actually ran a couple of extra commands
as a result of which the slave first deleted the table and then
ran a select query on table, leading to the above mentioned failure.

=== Fix ===

1) Fixed the code for failure seen in rpl.rpl_row_until.
   This test was also failing although the symptoms of
   failure were different.
2) Copied the contents from rpl.rpl_row_until into
   into engines/funcs.rpl.rpl_row_until.
3) Updated engines/funcs.rpl_row_until.result accordingly.

mysql-test/suite/engines/funcs/r/rpl_row_until.result:
  modified to accomodate the changes in corresponding
  test file.
mysql-test/suite/engines/funcs/t/disabled.def:
  removed from the list of disabled tests.
mysql-test/suite/engines/funcs/t/rpl_row_until.test:
  fixed rpl.rpl_row_until and copied its content to
  engines/funcs.rpl_row_until. The reason being both
  are same tests but rpl.rpl_row_until is an
  updated version.
mysql-test/suite/rpl/t/disabled.def:
  removed from the list of disabled tests.
sql/sql_repl.cc:
  Added a check to catch an improper combination
  of arguements passed to 'START SLAVE UNTIL'. Earlier,
  START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001',
  MASTER_LOG_POS=561, RELAY_LOG_POS=12;
  passed. It is now detected and an error is reported.
2012-11-30 12:12:33 +05:30
..
funcs BUG#12359942 - REPLICATION TEST FROM ENGINE SUITE RPL_ROW_UNTIL TIMES OUT 2012-11-30 12:12:33 +05:30
iuds Backport of the deprecation warning from WL#6219: "Deprecate and remove YEAR(2) type" 2012-06-29 12:55:45 +04:00
rr_trx Test suites for engine testing, moved from test-extra so will be available 2010-03-17 23:42:07 -07:00
README Updates to README file of the 'engines' test suites 2010-05-04 14:24:36 -07:00



This directory includes a set of three test suites aimed as testing functionality
in an engine independent way, that is - the tests should work identically against
different engines.


The following suites are included:

1) 'funcs' suite
   -------------
   A collection of functional tests covering basic engine and server functionality that can be run
   against iany engine.

   To run the test suite:
      cd INSTALL_DIR/mysql-test
      run: perl ./mysql-test-run.pl --suite=engines/funcs --mysqld=--default-storage-engine=<engine>

2) 'iuds' suite
   ------------
   Similar to the above focused on insert/update/delete operations of different different data types.

   To run the test suite:
      cd INSTALL_DIR/mysql-test
      run: perl ./mysql-test-run.pl --suite=engines/iuds --mysqld=--default-storage-engine=<engine>

3) 'rr_trx' suite (transactional engines only)
   --------------
   A scenario of multiple client connections verifying transactions with repeatable read isolation level

   To run the test suite with innodb:
      cd INSTALL_DIR/mysql-test
      run: perl ./suite/engines/rr_trx/run_stress_tx_rr.pl --engine=<engine> [--duration=<nn>]
                                                          [--threads=<nn>] [--try] [--help] 

   This test is can be run against any transactional engine. However scripts need to be modified in order
   to support such engines (current scripts support only InnoDB).
   In order to add support for a new engine, you will need to modify scripts as follows:
   1) cd to INSTALL_DIR/mysql-test/suite/engines/rr_trx
   2) Modify the 'run_stress_rr.pl' file by adding an 'elsif' section for your engine and have it
      include specific values required to be passed as startup parameters to the MySQL server by
      specifying them using "--mysqld" options (see InnoDB example).
   3) Copy the 'init_innodb.txt' file to 'init_<engine>.txt file and change its content to be "init_<engine>".
   4) In the 't' directory copy the "init_innodb.test" file to "init_<engine>.test" and change the value of
      the '$engine' variable to <engine>.
   5) In the 'r' directory copy "the init_innodb.result" file to "init_<engine>.result" and change refrences
      to 'InnoDB' to <engine>.


Known Issues
------------
1) The folowing tests in the 'iuds' suite:
     - delete_decimal
     - insert_decimal 
     - update_decimal
   will return a 'Warning 1264 - Out of range value...' warning if run in a 32-bit environment.
   Add the '--force' option to prevent the test run from aborting.

2) The following tests in the 'funcs' suite will fail when run against the innodb_plugin:
   - crash_manycolumns_string (bug 50495) 
   - ix_unique_lob (bug 52056, masked by an 'Out of memory error' on some 32-bit platforms)
   - ix_unique_string_length (bug 52056, masked by an 'Out of memory error' on some 32-bit platforms)
   Add the '--force' option to prevent the test run from aborting.

3) Some of the rpl_xxx tests in the 'funcs' suite require a secific binlog_forat setting and will be
   skipped otherwise.
 
4) Some of the rpl_xxx tests in the 'funcs' suite will report a 'Statement unsafe for replication' warning 
   when run againsr a server configured to use statement based replication.