Commit graph

2340 commits

Author SHA1 Message Date
Sergei Golubchik
cb1e76e4de Merge branch '10.1' into 10.2 2017-08-17 11:38:34 +02:00
Sergei Golubchik
a4885dde4c MDEV-13535 Query on MyISAM table corrupts the table
don't assume that the table always has a primary key,
head->s->primary_key might be MAX_KEY, which won't start keyread.
2017-08-16 18:44:17 +02:00
Sergei Golubchik
40eff5e097 cleanup: include/restart_mysqld.inc
let include/restart_mysqld.inc use include/start_mysqld.inc
and include/shutdown_mysqld.inc. Instead of copying their content.
2017-08-14 19:45:59 +02:00
Sergei Golubchik
8e8d42ddf0 Merge branch '10.0' into 10.1 2017-08-08 10:18:43 +02:00
Marko Mäkelä
86e0a73eaa Remove wait_innodb_all_purged.inc
The file wait_innodb_all_purged.inc waited for InnoDB purge in a way
that only worked in debug builds. The file wait_all_purged.inc
provides a better mechanism.
2017-08-08 09:44:38 +03:00
Vicențiu Ciorbaru
786ad0a158 Merge remote-tracking branch 'origin/5.5' into 10.0 2017-07-25 00:41:54 +03:00
Sachin Setiya
76f7aac8e0 MDEV-13065 rpl.rpl_mdev-11092 fails sporadically in buildbot
Problem
rpl.rpl_mdev-11092 fails in buildbot because after starting slave in
wait_for_slave_sql_error_and_skip.inc slave is started but there may be
chances that we have not skipped the last error and Last_SQL_Errno is
still not zero untill the end of rpl_end.inc , which will compare
Last_SQL_Errno to 0. So in this this case rpl_mdev-11092 fails.

Solution
After starting slave in wait_for_slave_sql_error_and_skip.inc we will wait for
Last_SQL_Errno to become 0.
2017-07-19 16:42:01 +05:30
Marko Mäkelä
d902d43ce7 Merge 10.1 into 10.2 2017-07-06 20:28:08 +03:00
Elena Stepanova
ec76945dac MDEV-13248 binlog.binlog_parallel_replication_marks_row fails in buildbot
The test did not handle correctly possible difference in system
timezone. The fix is to remove non-functional setting of local
time_zone and instead allow timestamp replacement to work with
any date/time
2017-07-06 00:45:43 +03:00
Sergei Golubchik
f6633bf058 Merge branch '10.1' into 10.2 2017-07-05 19:08:55 +02:00
Kristian Nielsen
228479a28c MDEV-8075: DROP TEMPORARY TABLE not marked as ddl, causing optimistic parallel replication to fail
CREATE/DROP TEMPORARY TABLE are not safe to optimistically replicate in
parallel with other transactions, so they need to be marked as "ddl" in the
binlog.

This was already done for stand-alone CREATE/DROP TEMPORARY. But temporary
tables can also be created and dropped inside a BEGIN...END transaction, and
such transactions were not marked as ddl. Nor was the DROP TEMPORARY TABLE
statement emitted implicitly when a client connection is closed.

So this patch adds such ddl mark for the missing cases.

The difference to Kristian's original patch is mainly a fix in
mysql_trans_commit_alter_copy_data() to remember the unsafe_rollback_flags
over the temporary commit.
2017-07-03 11:16:13 +03:00
Sachin Setiya
de3201df3f Fix MDEV-12758 2017-06-29 23:03:30 +05:30
Sachin Setiya
629c60973d MDEV-12758 wrep.pool_of_threads failed in buildbot with WSREP ...
Problem:- While running tests from wsrep suite , we include file have_wsrep.inc
or have_wsrep_enabled.inc , these file test wsrep plugin is ACTIVE or 'wsrep_on'
is ON. These select does not ensure that whether 'wsrep_ready' is ON , So that
we can process SQL queries. So sometimes we will get error like this
mysqltest: At line 81: query 'call mtr.check_testcase()' failed: 1047: WSREP has
not yet prepared node for application use  not ok

Solution:- In file have_wsrep.inc and have_wsrep_enabled.inc we will include
wait_until_ready.inc , which will wait untill 'wsrep_on' is on
2017-06-29 18:31:42 +05:30
Marko Mäkelä
2d8fdfbde5 Merge 10.1 into 10.2
Replace have_innodb_zip.inc with innodb_page_size_small.inc.
2017-06-08 12:45:08 +03:00
Marko Mäkelä
30df297c2f Merge 10.0 into 10.1
Rewrite the test encryption.innodb-checksum-algorithm not to
require any restarts or re-bootstrapping, and to cover all
innodb_page_size combinations.

Test innodb.101_compatibility with all innodb_page_size combinations.
2017-06-06 10:59:54 +03:00
Marko Mäkelä
d8d39721df Follow-up to MDEV-12042 (test innodb_page_size variants)
innodb_page_size_small: A new set of combinations, for
innodb_page_size up to 16k. In MariaDB 10.0, this does not
make a difference, but in 10.1 and later, innodb_page_size
would cover 32k and 64k, for which ROW_FORMAT=COMPRESSED
is not available.

Enable these combinations in a few InnoDB tests.
2017-06-06 09:34:09 +03:00
Elena Stepanova
ab62b7538f MDEV-12042 Re-bootstrap the server if InnoDB options are incompatible 2017-06-02 01:46:25 +03:00
Monty
f7dab76aa2 MDEV-12756 rpl.rpl_killed_ddl fails in buildbot with 'Can't find record'
The issue was that my_errno was not set properly when a repair was killed,
which confused the rpl_killed_ddl script.

I also added an extra test line in varchar.inc to ensure we don't give
duplicate error rows.
2017-05-17 00:00:27 +03:00
Georg Richter
f8866f8f66 MDEV-10332 support for OpenSSL 1.1 and LibreSSL
Initial support

tested against OpenSSL 1.0.1, 1.0.2, 1.1.0, Yassl and LibreSSL
not working on Windows with native SChannel support, due to wrong cipher
mapping: Latter one requires push of CONC-241 fixes.
Please note that OpenSSL 0.9.8 and OpenSSL 1.1.0 will not work: Even if
the build succeeds, test cases will fail with various errors, especially
when using different tls libraries or versions for client and server.
2017-05-09 18:53:10 +02:00
Marko Mäkelä
14c6f00a9f Merge 10.1 into 10.2
Also, include fixes by Vladislav Vaintroub to the
aws_key_management plugin. The AWS C++ SDK specifically depends on
OPENSSL_LIBRARIES, not generic SSL_LIBRARIES (such as YaSSL).
2017-05-06 14:36:46 +03:00
Marko Mäkelä
f740d23ce6 Merge 10.1 into 10.2 2017-04-28 12:22:32 +03:00
Sergei Golubchik
b8c8405008 cleanup: simplify setting of ssl* options in my.cnf templates
magic--
2017-04-27 19:12:44 +02:00
Vladislav Vaintroub
ec68f764f6 MDEV-9566 prepare mysqltest for mariabackup
- Do not throw output of exec command, if disable_result_log is set
save and dump it if exec fails. Need tha to meaningfully analyze
errors from mariabackup.

- rmdir now removes the entire tree. need that because xtrabackup tests
clean the whole directory.

- all filesystem modifying commands now require the argument to
  be under MYSQLTEST_VARDIR or MYSQL_TMP_DIR.
2017-04-27 19:12:38 +02:00
Marko Mäkelä
ce3ffefc45 Adapt the innodb_undo tests from MySQL 5.7
Simplify the tests that are present in MySQL 5.7. Make the table
smaller while generating enough undo log. Do not unnecessarily
drop tables.

trx_purge_initiate_truncate(): Remove two crash injection points
(before and after normal redo log checkpoint), because they are
not adding any value. Clarify some messages.

trx_sys_create_rsegs(): Display the number of active undo tablespaces.

srv_undo_tablespaces_init(): When initializing the data files, do not
leave srv_undo_tablespaces_active at 0.
Do not display that number; let trx_sys_create_rsegs() display it once
the final number is known.

innodb_params_adjust(): Adjust parameters after startup.

innobase_init(): Do not allow innodb_max_undo_size to be less
than SRV_UNDO_TABLESPACE_SIZE_IN_PAGES. This avoids unnecessary
repeated truncation of undo tablespaces when using
innodb_page_size=32k or innodb_page_size=64k.
2017-04-26 23:03:28 +03:00
Sachin Setiya
2e889de34a Fix test cases in galera suite
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-04-06 15:41:54 +05:30
Sachin Setiya
5866c4d084 Fix test cases
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-04-06 15:41:54 +05:30
Sachin Setiya
70ae1dbac0 Galera MTR tests: Make the mysqlhotcopy tests pass on Ubuntu 16.04
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-04-06 15:41:54 +05:30
Sachin Setiya
f369942d90 Galera MTR Tests: stability fixes
* remove part of galera_var_cluster_address.test that can not be tested reliably
 * reduce running time for galera_gcache_recover_manytrx.test
 * Additional wait_conditions for GAL-401.test

Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-04-06 15:41:54 +05:30
Sergei Petrunia
20d9fbcf9a MDEV-12424: binlog_encryption.encrypted_* tests fail with Can't locate autodie.pm error
Don't use Perl autodie module as there are platforms where it is not present
2017-04-02 12:18:23 +03:00
Sergei Golubchik
b2865a437f search_pattern_in_file.inc changes
1. Special mode to search in error logs: if SEARCH_RANGE is not set,
   the file is considered an error log and the search is performed
   since the last CURRENT_TEST: line
2. Number of matches is printed too. "FOUND 5 /foo/ in bar".
   Use greedy .* at the end of the pattern if number of matches
   isn't stable. If nothing is found it's still "NOT FOUND",
   not "FOUND 0".
3. SEARCH_ABORT specifies the prefix of the output.
   Can be "NOT FOUND" or "FOUND" as before,
   but also "FOUND 5 " if needed.
2017-03-31 19:28:58 +02:00
Sergei Golubchik
d6d994bf42 remove two redundant *.inc files to restart a server
namely, restart_mysqld_with_option.inc and kill_and_restart_mysqld.inc -
use restart_mysqld.inc instead.

Also remove innodb_wl6501_crash_stripped.inc that wasn't used anywhere.
2017-03-31 19:28:58 +02:00
Sergei Petrunia
5210c69e71 Merge 10.2 into bb-10.2-mariarocks 2017-03-31 01:14:00 +03:00
Sergei Golubchik
da4d71d10d Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
Sergei Golubchik
386ef08704 MDEV-12233 main.mysql_upgrade_noengine fails in buildbot on ppc64le
verify that tests don't leave mysql_upgrade_info in datadir
2017-03-21 11:37:24 +01:00
Sergei Petrunia
5b30c7896e Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mariarocks 2017-03-11 20:12:15 +00:00
Marko Mäkelä
ad0c218a44 Merge 10.0 into 10.1
Also, implement MDEV-11027 a little differently from 5.5 and 10.0:

recv_apply_hashed_log_recs(): Change the return type back to void
(DB_SUCCESS was always returned).

Report progress also via systemd using sd_notifyf().
2017-03-09 08:53:08 +02:00
Vicențiu Ciorbaru
97041acf7f Fix tokudb.gap_lock_error test
TokuDB testsuite makes use of includes not found in our default 10.0.
Cherry pick them from Percona Server's include directory.
2017-03-05 15:18:26 +02:00
Marko Mäkelä
ff0530ef68 MDEV-12121: Revert test adjustments for -DWITH_INNODB_AHI=OFF
Because the default build configuration of the server will remain
at -DWITH_INNODB_AHI=ON, we want to test the instrumentation.

We make and revert the test adjustments in separate commits on purpose,
so that this commit can be easily reverted later if the default
build configuration is changed to -DWITH_INNODB_AHI=OFF.
2017-03-03 17:08:06 +02:00
Marko Mäkelä
27b9989d31 MDEV-12121 Introduce build option WITH_INNODB_AHI to disable innodb_adaptive_hash_index
The InnoDB adaptive hash index is sometimes degrading the performance of
InnoDB, and it is sometimes disabled to get more consistent performance.
We should have a compile-time option to disable the adaptive hash index.

Let us introduce two options:

OPTION(WITH_INNODB_AHI "Include innodb_adaptive_hash_index" ON)
OPTION(WITH_INNODB_ROOT_GUESS "Cache index root block descriptors" ON)

where WITH_INNODB_AHI always implies WITH_INNODB_ROOT_GUESS.

As part of this change, the misleadingly named function
trx_search_latch_release_if_reserved(trx) will be replaced with the macro
trx_assert_no_search_latch(trx) that will be empty unless
BTR_CUR_HASH_ADAPT is defined (cmake -DWITH_INNODB_AHI=ON).

We will also remove the unused column
INFORMATION_SCHEMA.INNODB_TRX.TRX_ADAPTIVE_HASH_TIMEOUT.
In MariaDB Server 10.1, it used to reflect the value of
trx_t::search_latch_timeout which could be adjusted during
row_search_for_mysql(). In 10.2, there is no such field.

Other than the removal of the unused column TRX_ADAPTIVE_HASH_TIMEOUT,
this is an almost non-functional change to the server when using the
default build options.

Some tests are adjusted so that they will work with both
-DWITH_INNODB_AHI=ON and -DWITH_INNODB_AHI=OFF. The test
innodb.innodb_monitor has been renamed to innodb.monitor
in order to track MySQL 5.7, and the duplicate tests
sys_vars.innodb_monitor_* are removed.
2017-03-03 16:55:50 +02:00
Marko Mäkelä
cc4b2b185d MDEV-11802 preparation: Clean up the purge tests.
Revert the MDEV-4396 tweak to innodb.innodb_bug14676111.
We must fix the root cause instead.

Allow gcol.innodb_virtual_purge to run on a non-debug build
(If wait_innodb_all_purged.inc is used in a non-debug test,
it will have no effect.)

Add the test innodb.index_merge_threshold from MySQL 5.7.
2017-02-19 14:51:19 +02:00
Sergei Golubchik
f3914d10b6 Merge branch 'bb-10.2-serg-merge' into 10.2 2017-02-11 09:45:34 +01:00
Sergei Golubchik
2195bb4e41 Merge branch '10.1' into 10.2 2017-02-10 17:01:45 +01:00
Nirbhay Choubey
8b2e642aa2 MDEV-7635: Update tests to adapt to the new default sql_mode 2017-02-10 06:30:42 -05:00
Nirbhay Choubey
3435e8a515 MDEV-7635: Part 1
innodb_autoinc_lock_mode            = 2
innodb_buffer_pool_dump_at_shutdown = ON
innodb_buffer_pool_dump_pct         = 25
innodb_buffer_pool_load_at_startup  = ON
innodb_checksum_algorithm           = CRC32
innodb_file_format                  = Barracuda
innodb_large_prefix                 = ON
innodb_log_compressed_pages         = ON
innodb_purge_threads                = 4
innodb_strict_mode                  = ON
binlog_annotate_row_events          = ON
binlog_format                       = MIXED
binlog-row-event-max-size           = 8192
group_concat_max_len                = 1M
lock_wait_timeout                   = 86400
log_slow_admin_statements           = ON
log_slow_slave_statements           = ON
log_warnings                        = 2
max_allowed_packet                  = 16M
replicate_annotate_row_events       = ON
slave_net_timeout                   = 60
sync_binlog                         = 1
aria_recover                        = BACKUP,QUICK
myisam_recover_options              = BACKUP,QUICK
2017-02-10 06:30:42 -05:00
Marko Mäkelä
2e67e66c3a Merge 10.0 into 10.1 2017-02-08 08:53:34 +02:00
Marko Mäkelä
e174d923d9 innodb.innodb-get-fk: Actually test --innodb-read-only. 2017-02-03 19:33:09 +02:00
Marko Mäkelä
650ffcd3a0 Extend the innodb.log_corruption test.
Remove the dependency on unzip. Instead, generate the InnoDB files
with perl.

log_block_checksum_is_ok(): Correct the error message.

recv_scan_log_recs(): Remove the duplicated error message for
log block checksum mismatch.

innobase_start_or_create_for_mysql(): If the server is in read-only
mode or if innodb_force_recovery>=3, do not try to modify the system
tablespace. (If the doublewrite buffer or the non-core system tables
do not exist, do not try to create them.)

innodb_shutdown(): Relax a debug assertion. If the system tablespace
did not contain a doublewrite buffer and if we started up in
innodb_read_only mode or with innodb_force_recovery>=3, it will not
be created.

dict_create_or_check_sys_tablespace(): Set the flag
srv_sys_tablespaces_open when the tables exist.
2017-02-02 10:20:22 +02:00
Elena Stepanova
1d725c8176 Flush suppressions table to prevent corruption when server is killed 2017-02-01 02:16:01 +02:00
Sergei Golubchik
a7d6271cbf skip innodb.log_corruption test if no unzip executable is found
also move *.zip files from t/ to std_data/
2017-01-29 13:50:30 +01:00
Marko Mäkelä
f1f8ebc325 Merge 10.0 into 10.1 2017-01-26 23:40:11 +02:00