mariadb/mysql-test
Nirbhay Choubey 5e487124aa Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION
--FLUSH-LOG BREAKS CONSISTENCY

The transaction started by mysqldump gets committed
implicitly when flush-log is specified along with
single-transaction option, and hence can break
consistency.

This is because, COM_REFRESH is executed in order
to flush logs and starting from 5.5 this command
performs an implicit commit.

Fixed by making sure that COM_REFRESH is executed
before the transaction has started and not after it.

Note : This patch triggers following behavioral
       changes in mysqldump :

1) After this patch we no longer flush logs before
   dumping each database if --single-transaction
   option is given like it was done before (in the
   absence of --lock-all-tables and --master-data
   options).

2) Also, after this patch, we start acquiring
   FTWRL before flushing logs in cases when only
   --single-transaction and --flush-logs are given.
   It becomes safe to use mysqldump with these two
   options and without --master-data parameter for
   backups.


client/mysqldump.c:
  Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION
               --FLUSH-LOG BREAKS CONSISTENCY
  
  Added logic to make sure that, if flush-log option
  is specified, mysql_refresh() is never executed after
  the transaction has started.
  
  Added verbose messages for all the executions of
  mysql_refresh() in order to track its invocation.
mysql-test/r/mysqldump.result:
  Added test case for Bug#12809202.
mysql-test/t/mysqldump.test:
  Added test case for Bug#12809202.
2011-12-23 23:05:00 +05:30
..
collections Bug#11748572:ALLOCATING A LARGE QUERY CACHE IS NOT DETERMINISTIC 2011-11-21 10:59:28 +05:30
extra Followup test fix after 13055685: 2011-11-09 09:58:18 +01:00
include BUG#11745230 2011-12-01 00:54:54 +00:00
lib Silly mistake in gdb output: replaced print with resfile_print, 2011-10-05 15:16:20 +02:00
r Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION 2011-12-23 23:05:00 +05:30
std_data Bug#11747416 : 32228 A disk full makes binary log corrupt 2011-09-29 14:14:43 +03:00
suite Bug#13437900 - VALGRIND REPORTS A LEAK FOR REPL_IGNORE_SERVER_IDS 2011-12-14 15:33:43 +02:00
t Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION 2011-12-23 23:05:00 +05:30
CMakeLists.txt Bug #12373393 PB2 SHOULD ALLOW TO CREATE COLLECTIONS AS SUPER SET OF EXISTING COLLECTIONS 2011-09-29 10:42:23 +02:00
mtr.out-of-source
mysql-stress-test.pl Bug #11751927 42960: MTR2: NO MORE --STRESS PARAMETERS 2011-09-15 12:34:32 +02:00
mysql-test-run.pl BUG #11746897 - 29508: PLEASE IMPLEMENT MYSQL-TEST-RUN.PL --STRACE-MASTER 2011-12-01 18:54:29 +05:30
purify.supp
README
README.gcov
README.stress
valgrind.supp Bug#12856915 VALGRIND FAILURE IN FILESORT/CREATE_SORT_INDEX 2011-09-05 16:04:33 +02:00

This directory contains a test suite for the MySQL daemon. To run
the currently existing test cases, simply execute ./mysql-test-run in
this directory. It will fire up the newly built mysqld and test it.

Note that you do not have to have to do "make install", and you could
actually have a co-existing MySQL installation. The tests will not
conflict with it.

All tests must pass. If one or more of them fail on your system, please
read the following manual section for instructions on how to report the
problem:

http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html

If you want to use an already running MySQL server for specific tests,
use the --extern option to mysql-test-run. Please note that in this mode,
the test suite expects you to provide the names of the tests to run.
For example, here is the command to run the "alias" and "analyze" tests
with an external server:

mysql-test-run --extern alias analyze

To match your setup, you might also need to provide --socket, --user, and
other relevant options.

With no test cases named on the command line, mysql-test-run falls back
to the normal "non-extern" behavior. The reason for this is that some
tests cannot run with an external server.


You can create your own test cases. To create a test case, create a new
file in the t subdirectory using a text editor. The file should have a .test
extension. For example:

 xemacs t/test_case_name.test

 In the file, put a set of SQL statements that create some tables,
 load test data, and run some queries to manipulate it.

 We would appreciate it if you name your test tables t1, t2, t3 ... (to not
 conflict too much with existing tables).

 Your test should begin by dropping the tables you are going to create and
 end by dropping them again.  This ensures that you can run the test over
 and over again.
 
 If you are using mysqltest commands (like result file names) in your
 test case, you should create the result file as follows:

 mysql-test-run --record test_case_name

 or

 mysqltest --record < t/test_case_name.test

 If you only have a simple test cases consisting of SQL statements and
 comments, you can create the test case in one of the following ways:

 mysql-test-run --record test_case_name

 mysql test < t/test_case_name.test > r/test_case_name.result

 mysqltest --record --record-file=r/test_case_name.result < t/test_case_name.test

 When this is done, take a look at r/test_case_name.result
 - If the result is incorrect, you have found a bug. In this case, you should
   edit the test result to the correct results so that we can verify
   that the bug is corrected in future releases.

To submit your test case, put your .test file and .result file(s) into
a tar.gz archive, add a README that explains the problem, ftp the 
archive to ftp://support.mysql.com/pub/mysql/secret/ and send a mail
to bugs@lists.mysql.com