mariadb/mysql-test/suite/engines
Dmitry Shulga 408a637b87 MDEV-29344: engines/iuds.insert_time cannot run with PS protocol (syntax error)
The syntax error produced on running the test engines/iuds.insert_time
in PS-mode was caused by presence of the C-Style comment containing
the single quote at the end of SQL statement, something like
the following one:
  /* doesn't throw error */;
Presence of the single quote was interpreted by mysqltest utility as
indication of real string literal, that resulted in consuming every
characters following that mark as a literal, including the delimiter
character ';'. It led to concatenation of lines into a single
multi-statement that was sent from mysqltest to MariaDB server for
processing. In case mysqltest is run in regular mode (that is,
not PS-mode), multi-statement is handled successfully on server side,
but in case PS-mode is on, multi-statement is supplied in COM_STMT_PREPARE
that caused the parsing error since multi-statements is not supported by
statement prepare command.

To fix the issue, in case mysqltest encounters the C-Style comment
is should switch to reading next following characters without any
processing until it hit the closing C-style comment marks '*/',
with one exception if the sequence of characters '/*' followed by
the exclamation mark, that means the hint introducer has been read.
2025-03-17 18:11:51 +07:00
..
funcs Merge 10.6 into 10.11 2025-01-08 12:51:26 +02:00
iuds MDEV-29344: engines/iuds.insert_time cannot run with PS protocol (syntax error) 2025-03-17 18:11:51 +07:00
rr_trx Merge 10.4 into 10.5 2020-07-02 09:41:44 +03:00
README Fixed that storage/funcs tests works with Aria 2019-05-11 13:52:31 +03: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.

If you are an engine writer and wants to test if your engine is compatible with
other engines in MariaDB, you should instead of using this test suite use
the storage_engine test suite which is more suitable for that purpose.


The following suites are included:

1) 'funcs' suite
   -------------
   A collection of functional tests covering basic engine and server
   functionality that can be run against any 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 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 references
      to 'InnoDB' to <engine>.


Known Issues
------------
1) The following 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 specific
   binlog_format 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 against a
   server configured to use statement based replication.