Some tests are skipped by checks in suite.pm. It is redundant to
have an sql-level run-time check in the .inc file itself.
In some cases it's not only redundant, but dangerous.
After one bug in 10.2 innodb.create_isl_with_direct failed
to start InnoDB, but the server started fine (just without InnoDB)
and instead of failing, the test was skipped by run-time check in
have_innodb.inc.
# Conflicts:
# mysql-test/include/not_embedded.inc
# mysql-test/r/change_user_notembedded.result
# mysql-test/suite.pm
# mysql-test/t/change_user_notembedded.test
mysql-test-run auto-disables all optional plugins.
mysql-test/include/default_client.cnf:
no @OPT.plugindir anymore
mysql-test/include/default_mysqld.cnf:
don't disable plugins manually - mtr can do it better
mysql-test/suite/innodb/t/innodb_bug47167.test:
mtr now uses suite-dir as an include path
mysql-test/suite/innodb/t/innodb_file_format.test:
mtr now uses suite-dir as an include path
mysql-test/t/partition_binlog.test:
this test uses partitions
storage/example/mysql-test/mtr/t/source.result:
update results. as mysqltest includes the correct overlayed include
storage/innobase/handler/ha_innodb.cc:
the assert is wrong
Won't be pushed as is - separate email sent for internal review.
WL#1717 "binlog-innodb consistency".
Now when mysqld starts, if InnoDB does a crash recovery, we use the binlog name
and position retrieved from InnoDB (corresponding to the last transaction
successfully committed by InnoDB) to cut any rolled back transaction from
the binary log. This is triggered by the --innodb-safe-binlog option.
Provided you configure mysqld to fsync() InnoDB at every commit (using
flush_log_at_trx_commit) and to fsync() the binlog at every write
(using --sync-binlog=1), this behaviour guarantees that a master always has
consistency between binlog and InnoDB, whenever the crash happens.
6 tests to verify that it works.
client/mysqltest.c:
New command require_os (only "unix" accepted for now).
innobase/include/trx0sys.h:
when InnoDB does crash recovery, we now save the binlog coords it prints, into variables for later use.
innobase/trx/trx0sys.c:
when InnoDB does crash recovery, we now save the binlog coords it prints, into variables for later use.
mysql-test/mysql-test-run.sh:
The tests which check that the binlog is cut at restart, need to not delete those binlogs, of course.
And not delete replication info, so that we can test that the slave does not receive anything
wrong from the cut binlog.
sql/ha_innodb.cc:
methods to read from InnoDB the binlog coords stored into it
sql/ha_innodb.h:
ethods to read from InnoDB the binlog coords stored into it
sql/log.cc:
Added my_sync() when we create a binlog (my_sync of the binlog and of the index file);
this is always done, whether --sync-binlog or not (binlog creation is rare, so no speed
problem, and I like to have the existence of the binlog always reliably recorded, even if
later content is not).
If --crash-binlog-innodb, crash between the binlog write and the InnoDB commit.
New methods:
- report_pos_in_innodb() to store the binlog name and position into InnoDB (used only when
we create a new binlog: at startup and at FLUSH LOGS)
- cut_spurious_tail() to possibly cut the tail of a binlog based on the info we read
from InnoDB (does something only if InnoDB has just done a crash recovery).
sql/mysql_priv.h:
new option, to crash (use for testing only)
sql/mysqld.cc:
New option --innodb-safe-binlog and --crash-binlog-innodb (the latter is for testing, it makes mysqld crash).
Just after opening the logs and opening the storage engines, cut any wrong statement from the binlog, based
on info read from InnoDB.
sql/sql_class.h:
new methods for MYSQL_LOG.
for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table
BitKeeper/deleted/.del-synchronization-master.opt~265be23ead00949:
Delete: mysql-test/t/synchronization-master.opt
BitKeeper/deleted/.del-have_debug.require~d981522532c711b2:
Delete: mysql-test/r/have_debug.require
BitKeeper/deleted/.del-have_debug.inc~f4dc5160b9912226:
Delete: mysql-test/include/have_debug.inc
mysql-test/r/synchronization.result:
fixed the test for
Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table
mysql-test/t/synchronization.test:
fixed the test for
Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table
sql/sql_table.cc:
deleted test sleep from mysql_create_like_table
(
fixed BUG #2385 CREATE TABLE LIKE lacks locking on source and destination table
and added tests for it
)
sql/mysql_priv.h:
added code TEST_SYNCHRONIZATION for --exit-info option
sql/mysqld.cc:
fixed -debug prefix
sql/sql_table.cc:
added synchronization in mysql_create_like_table
(fixed BUG #2385 CREATE TABLE LIKE lacks locking on source and destination table)