Commit graph

12890 commits

Author SHA1 Message Date
Jan Lindström
044d0ffcf3 Disable MW-329 (badly written test case). 2019-07-05 10:25:55 +03:00
Jan Lindström
7d56bddfcf Galera test fixes
Changes to be committed:
	modified:   suite/galera/disabled.def
	modified:   suite/galera/r/MW-329.result
	modified:   suite/galera/r/galera_var_notify_cmd.result
	modified:   suite/galera/t/MW-329.test
	modified:   suite/galera/t/galera_binlog_stmt_autoinc.test
	modified:   suite/galera/t/galera_var_notify_cmd.test
2019-07-05 06:51:29 +03:00
Jan Lindström
fee61edd44 MDEV-19939: Galera test failure on galera_toi_ddl_fk_insert
Add sync wait to make sure selects see correct consistent db.
2019-07-04 19:42:55 +03:00
Jan Lindström
24aa723a28 Update Galera failing test list and record correct results
for passing ones.

Changes to be committed:
	new file:   mysql-test/std_data/galera-cert.pem
	new file:   mysql-test/std_data/galera-key.pem
	new file:   mysql-test/std_data/galera-upgrade-ca-cert.pem
	new file:   mysql-test/std_data/galera-upgrade-server-cert.pem
	new file:   mysql-test/std_data/galera-upgrade-server-key.pem
	modified:   mysql-test/suite/galera/disabled.def
	modified:   mysql-test/suite/galera/r/MW-416.result
	modified:   mysql-test/suite/galera/r/MW-44.result
	modified:   mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff
	modified:   mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result
	modified:   mysql-test/suite/galera/t/MW-416.test
	modified:   mysql-test/suite/galera/t/galera_kill_applier.test
2019-07-04 19:42:30 +03:00
Jan Lindström
69e1d65cce Update Galera failing test list. 2019-07-03 15:16:37 +03:00
Marko Mäkelä
1d45b3b055 Merge 10.2 into 10.3 2019-07-02 21:41:40 +03:00
Marko Mäkelä
0c6514eece MDEV-19781: Skip the test for embedded server 2019-07-02 21:33:54 +03:00
Marko Mäkelä
e82fe21e3a Merge 10.2 into 10.3 2019-07-02 17:46:22 +03:00
Marko Mäkelä
7f1e1309bb MDEV-12626: Import innodb_buffer_pool_dump_pct adjusted for MDEV-11454 2019-07-02 15:24:23 +03:00
Marko Mäkelä
6bb922e58e MDEV-13626: Import and adjust innodb.blob-crash 2019-07-02 15:18:12 +03:00
Marko Mäkelä
0e1ba364a1 MDEV-19916 Corruption after instant ADD/DROP and shrinking the tree
btr_lift_page_up(): Correct the incorrect condition.

page_validate(): Validate the page type.
2019-07-01 18:24:54 +03:00
Marko Mäkelä
685b527f0c MDEV-16060: Speed up the test by 1 second 2019-07-01 18:17:29 +03:00
Thirunarayanan Balathandayuthapani
85d0a1955f MDEV-19914 Server startup fails while dropping garbage encrypted tablespace if innodb_encryption_threads > 0
- Avoiding accessing encryption thread mutex before initiating
the encryption threads
2019-07-01 15:21:17 +05:30
Thirunarayanan Balathandayuthapani
ed6da51f3e MDEV-19869 Port innodb_fts.fulltext2 from mysql to mariadb.
- Ported mysql Bug#20597981 test case to mariadb-10.2
- InnoDB never used fts_doc_id_in_read_set. Basically it tells
innodb to read the fts_doc_id from the index record itself.
2019-07-01 13:46:56 +05:30
Sachin
85f1022410 Fix galera_log_bin
Cleanup the nodes before and after test run
2019-06-29 01:08:30 +05:30
Sujatha
49ec78ab70 MDEV-19370: rpl.kill_race_condition failed in buildbot with Wrong value for slave parameter
Problem:
=======
Executing test with following options will result in test failure.

./mtr rpl.kill_race_condition{,,,,,,,,,,} --repeat=10 --par 12 --mem

Fix:
====
Test simulates applier thread kill scenario while applying a row event.  But it
doesn't wait for applier to catch the error stop.

Added :wait_for_slave_sql_error.inc to catch the error.

Test uses START SLAVE as a final step and doesn't wait for both threads to
start.

Added: start_slave.inc
2019-06-28 19:54:15 +03:00
Andrei Elkin
5c1f51835a MDEV-19904 poradic buildbot failures in rpl.rpl_semi_sync_uninstall_plugin
The test allowed non-deterministic execution thanks to unresetable status
var of Slave_connections.

Fixed with expecting a correct value for Slaves_connected.
2019-06-28 18:34:58 +03:00
Thirunarayanan Balathandayuthapani
723a4b1d78 MDEV-17228 Encrypted temporary tables are not encrypted
- Introduce a new variable called innodb_encrypt_temporary_tables which is
a boolean variable. It decides whether to encrypt the temporary tablespace.
- Encrypts the temporary tablespace based on full checksum format.
- Introduced a new counter to track encrypted and decrypted temporary
tablespace pages.
- Warnings issued if temporary table creation has conflict value with
innodb_encrypt_temporary_tables
- Added a new test case which reads and writes the pages from/to temporary
tablespace.
2019-06-28 19:07:59 +05:30
Thirunarayanan Balathandayuthapani
e4a0dbfb4a MDEV-19781 Add page id matching check in innochecksum tool
Added the condition in innochecksum tool to check page id mismatch.
This could catch the write corruption caused by InnoDB.

Added the debug insert inside fil_io() to check whether it writes
the page to wrong offset.
2019-06-28 18:58:52 +05:30
Monty
f7a4a8719b MDEV-14996 kill during FLUSH TABLES FOR EXPORT causes assert 2019-06-27 20:57:25 +03:00
Marko Mäkelä
92feac53a6 MDEV-19886 InnoDB returns misleading ER_NO_SUCH_TABLE_IN_ENGINE
A fix in MySQL 5.7.6 was not completely merged to MariaDB:
Bug#19419026 WHEN A TABLESPACE IS NOT FOUND, DO NOT REPORT "TABLE NOT FOUND"
2019-06-27 15:39:04 +03:00
Sachin
354b14e718 Fix galera_as_slave_gtid.test galera_var_gtid_domain_id galera.mdev_10518.test
Clean the binlog on nodes after test is complete
2019-06-27 15:08:20 +05:30
Sachin
6bc782a233 Fix galera_sync_wait_show.test
Since the purpose of event is just to see on second node whether it is
created or not And we are not goint to execute the event also. So instead
of setting GLOBAL event_scheduler=ON and then turning it off,  we can just
disable the warning.
2019-06-27 15:07:59 +05:30
Sachin
7f2cfa8f47 MDEV-8874 Replication filters configured in my.cnf are ignored if slave reset and reconfigured
Don't delete the rpl_filter on RESET SLAVE.
2019-06-27 09:54:20 +05:30
Sachin
aa55d93cde Fix galera_log_output_csv.test
Truncate the mysql.slow_log table after test is complete.
2019-06-26 15:06:34 +05:30
Monty
7a2958f456 MDEV-17576 Assertion in maria_extra upon ALTER on table with triggers and locks
The problem was that the code in maria_extra assumed that there could be
only one table open when doing maria_extra(MA_FORCE_REOPEN)
However in the case of triggers, there can be multiple copies of
the table open.

Fixed by removing assert.
2019-06-25 16:17:29 +03:00
Marko Mäkelä
41e02d149e Remove the stray test innodb_zip.16k
This was accidentally broken in the parent commit.
2019-06-25 15:55:55 +03:00
Marko Mäkelä
a12fb5d0eb Replace innodb_zip.16k with innodb_zip.page_size
Also, move part of the test back to innodb.innodb_mysql
and another part to a new test innodb.purge.

Last but not least, merge the tests innodb_zip.4k and innodb_zip.8k
to innodb_zip.page_size.
2019-06-24 17:07:20 +03:00
Jan Lindström
c631bd7f10 Disable galera.MW-388. 2019-06-19 11:22:36 +03:00
Marko Mäkelä
192aa295b4 Merge 10.2 into 10.3 2019-06-19 08:56:10 +03:00
Michael Widenius
8acbf9c1f9 MDEV-19595 fixed
The test cases for the MDEV found several independent bugs
in MariaDB server and Aria:
- If a temporary table was marked as crashed, it could never
  be deleted.
- Opening of a crashed temporary table gave an error message
  but the error was never forwarded to the caller which caused
  an assert() in my_ok()
- init_read_record() did mmap of all temporary tables, which is
  probably not a good idea as this area can potentially be
  very big. Changed code to only mmap internal temporary tables.
- mmap-ed tables where not unmapped in case of repair/optimize
  which caused bad data in table and crashes if the original
  table files where replaced with new ones (as the old mmap
  was still in place). Fixed by removing the mmap in case
  of repair.
- Cleaned up usage of code that disabled mmap in Aria
2019-06-19 00:35:44 +03:00
Alexander Barkov
5352e9687a MDEV-17363 - Compressed columns cannot be restored from dump
In collaboration with Sergey Vojtovich <svoj@mariadb.org>

The COMPRESSED clause is now a part of the data type and goes immediately
after the data type and length, but before the CHARACTER SET clause,
and before column attributes such as DEFAULT, COLLATE, ON UPDATE,
SYSTEM VERSIONING, engine specific column attributes.

In the old reduction, the COMPRESSED clause was a column attribute.

New syntax:
  <varchar or text data type> <length> <compression> <character set> <column attributes>
  <varbinary or blob data type> <length> <compression> <column attributes>

New syntax examples:
  VARCHAR(1000) COMPRESSED CHARACTER SET latin1 DEFAULT ''
  BLOB COMPRESSED DEFAULT ''

Deprecate syntax examples:
  VARCHAR(1000) CHARACTER SET latin1 COMPRESSED DEFAULT ''
  TEXT          CHARACTER SET latin1 DEFAULT '' COMPRESSED
  VARBINARY(1000) DEFAULT '' COMPRESSED

As a side effect:
- COMPRESSED is not valid as an SP label name in SQL/PSM routines any more
  (but it's still valid as an SP label name in sql_mode=ORACLE)

- COMPRESSED is now allowed in combination with GENERATED ALWAYS AS:

  TEXT COMPRESSED GENERATED ALWAYS AS REPEAT('a',1000)
2019-06-18 07:48:08 +04:00
Michael Widenius
c8b5fa4afc MDEV-19055 Failures with temporary tables and Aria
There was two separate problems:
- Aria pagecache didn't properly handle re-reading of blocks
  that have given errors before (this triggered an assert)
- temporary tables that where opened several times where
  not properly closed in ALTER, REPAIR or OPTIMIZE table

Other things
- Added a couple of asserts that will make it easier to
  find problems like this in the future.
2019-06-17 17:50:08 +03:00
Sergei Petrunia
2b0eb352b3 Trivial test result update after fix for MDEV-19771 2019-06-16 12:12:00 +03:00
Sergei Golubchik
95d783af62 fix versioning.simple for embedded 2019-06-15 22:32:09 +02:00
Michael Widenius
c02d6164fb MDEV-19771 REPLACE on table with virtual_field can cause crash
Fixes also MDEV-17837

Problem was that we did not ignore warnings from virtual fields when
updated virtual fields for to-be-replaced row.
2019-06-15 14:54:21 +03:00
Aleksey Midenkov
2e73561c6c MDEV-16804 SYSTEM VERSIONING columns not showing as GENERATED
Closes #830
2019-06-14 11:12:18 +02:00
Oleksandr Byelkin
4a3d51c76c Merge branch '10.2' into 10.3 2019-06-14 07:36:47 +02:00
Thirunarayanan Balathandayuthapani
e9145aab44 MDEV-19435 buf_fix_count > 0 for corrupted page when it exits the LRU list
Problem:
=========
One of the purge thread access the corrupted page and tries to remove from
LRU list. In the mean time, other purge threads are waiting for same page
in buf_wait_for_read(). Assertion(buf_fix_count == 0) fails for the
purge thread which tries to remove the page from LRU list.

Solution:
========
- Set the page id as FIL_NULL to indicate the page is corrupted before
removing the block from LRU list. Acquire hash lock for the particular
page id and wait for the other threads to release buf_fix_count
for the block.

- Added the error check for btr_cur_open() in row_search_on_row_ref().
2019-06-13 16:13:51 +03:00
Jan Lindström
371a8a6615 Galera test cleanup. 2019-06-13 13:18:54 +03:00
Marko Mäkelä
06be8cd38f Clean up the test innodb.innodb-64k-crash
Before killing the server, ensure that the incomplete state of
the transaction will be made durable and will be applied and
rolled back on recovery, so that each time, roughly the same
amount of work will be done.

Remove DML statements after the recovery, and execute
CHECK TABLE instead.
2019-06-12 19:18:47 +03:00
Marko Mäkelä
1d31bed212 Merge 10.1 into 10.2 2019-06-12 19:12:00 +03:00
Marko Mäkelä
56c60b2fc5 MDEV-16111 encryption.innodb_lotoftables failed in buildbot with wrong result
Remove the test, because it easily fails with a result difference.
Analysis by Thirunarayanan Balathandayuthapani:

By default, innodb_encrypt_tables=0.
1) Test case creates 100 tables in innodb_encrypt_1.
2) creates another 100 unencrypted tables (encryption=off) in innodb_encrypt_2
3) creates another 100 encrypted tables (encryption=on) in innodb_encrypt_3
4) enabling innodb_encrypt_tables=1 and checking that only
100 encrypted tables exist. (already we have 100 in dictionary)
5) opening all tables again (no idea why)
6) After that, set innodb_encrypt_tables=0 and wait for 100 tables
to be decrypted (already we have 100 unencrypted tables)
7) dropping all databases

Sporadic failure happens because after step 4, it could encrypt the
normal table too, because innodb_encryption_threads=4.

This test was added in MDEV-9931, which was about InnoDB startup being
slow due to all .ibd files being opened. There have been a number of
later fixes to this problem. Currently the latest one is
commit cad56fbaba, in which some tests
(in particular the test innodb.alter_kill) could fail if all InnoDB
.ibd files are read during startup. That could make this test redundant.

Let us remove the test, because it is big, slow, unreliable, and
does not seem to reliably catch the problem that all files are being
read on InnoDB startup.
2019-06-12 19:08:49 +03:00
Marko Mäkelä
4bbd8be482 Merge 10.1 into 10.2 2019-06-12 10:30:01 +03:00
Jan Lindström
cf78b8c699 Merge 10.2 into 10.3 2019-06-12 08:26:32 +03:00
Jan Lindström
34b38ad726 MDEV-19736: Galera test failure on
Remove unneeded select to provider name. Provider can have different
names and can be located on different directory on different
environments.
2019-06-12 08:24:30 +03:00
Marko Mäkelä
b42dbdbccd Merge 10.2 into 10.3 2019-06-11 13:00:18 +03:00
Thirunarayanan Balathandayuthapani
bb5d04c9b8 MDEV-19695 Import tablespace doesn't work with ROW_FORMAT=COMPRESSED encrypted tablespace
Problem:
=======
fil_iterate() writes imported tablespace page0 as it is to discarded
tablespace. Space id wasn't even changed. While opening the tablespace,
tablespace fails with space id mismatch error.

Fix:
====
fil_iterate() copies the page0 with discarded space id to imported
tablespace.
2019-06-06 12:54:34 +05:30
Zicheng Huang
d7c8423a3d fix MDEV-18750: failed to flashback large-size binlog file
fix MDEV-18750: failed to flashback large-size binlog file

fix mysqlbinlog flashback failure caused by reading io_cache without MY_FULL_IO flag

fix MDEV-18750: mysqlbinlog flashback failure on large binlog
2019-06-05 13:56:27 +02:00
Sergei Petrunia
f7579518e2 MDEV-19600: The optimizer should be able to produce rows=1 estimate for unique index with NULLable columns
Modify best_access_path() to produce rows=1 estimate for null-rejecting
lookups on unique NULL keys.
2019-06-05 14:00:45 +03:00