Commit graph

180815 commits

Author SHA1 Message Date
Oleksandr Byelkin
28f08d3753 Merge branch '10.1' into 10.2 2018-09-14 08:47:22 +02:00
Jacob Mathew
3866589308 MDEV-16912: Spider Order By column[datatime] limit 5 returns 3 rows
The problem occurs in 10.2 and earlier releases of MariaDB Server because the
Partition Engine was not pushing the engine conditions to the underlying
storage engine of each partition.  This caused Spider to return the first 5
rows in the table with the data provided by the customer.  2 of the 5 rows
did not qualify the WHERE clause, so they were removed from the result set by
the server.

To fix the problem, I have back-ported support for engine condition pushdown
in the Partition Engine from MariaDB Server 10.3.

Author:
  Jacob Mathew.

Reviewer:
  Kentoku Shiba.

Merged:
  Commit eb2ca3d on branch bb-10.2-MDEV-16912
2018-09-13 11:41:55 -07:00
Oleksandr Byelkin
8e68876477 Fix of the test which has debug version 2018-09-13 15:06:44 +02:00
Sergei Petrunia
d85a7220dc MDEV-17188: rocksdb.2pc_group_commit fails intermittently in BB
When counter increment is not within the expected range, print the number
instead of just FAIL.

This doesnt solve the bug but will help with the diagnostics.
2018-09-13 15:00:13 +03:00
Alexey Botchkov
f54485eadb MDEV-17001 JSON_MERGE returns nullwhen merging empty array.
Don't add the comma if nothing appended to the array.
2018-09-13 13:42:09 +04:00
Oleksandr Byelkin
2b46dca5d7 Merge remote-tracking branch 'connect/10.2' into 10.2 2018-09-13 10:09:28 +02:00
Alexey Botchkov
a93363022c MDEV-17018 JSON_SEARCH and User-Defined Variables.
Item_func_json_search needs a member to store the path.
2018-09-12 21:57:28 +04:00
Jacob Mathew
eb2ca3d445 MDEV-16912: Spider Order By column[datatime] limit 5 returns 3 rows
The problem occurs in 10.2 and earlier releases of MariaDB Server because the
Partition Engine was not pushing the engine conditions to the underlying
storage engine of each partition.  This caused Spider to return the first 5
rows in the table with the data provided by the customer.  2 of the 5 rows
did not qualify the WHERE clause, so they were removed from the result set by
the server.

To fix the problem, I have back-ported support for engine condition pushdown
in the Partition Engine from MariaDB Server 10.3.

Author:
  Jacob Mathew.

Reviewer:
  Kentoku Shiba.
2018-09-11 16:29:44 -07:00
Vladislav Vaintroub
c3124174c3 MDEV-17168 mariabackup reports "failed to open bitmap directory"
MariaDB does not support changed page tracking, since 10.2. Remove bitmap
initialization
2018-09-11 15:24:35 +01:00
Alexey Botchkov
c8bb43a938 MDEV-17121 JSON_ARRAY_APPEND.
Extra comma added to the result when an json array is empty.
2018-09-11 14:37:45 +04:00
mkaruza
4d9ec7cb6c MDEV-16052 galera mtr galera_certification_double_failure fails with deadlock
There was change in error reporting from my_error to my_message so new recording is required.
2018-09-11 13:55:40 +03:00
Sergey Vojtovich
e76c4c06f1 MDEV-16773 - Assertion failed in tdc_remove_table
This assertion fails in thread that removes all table instances for
particular table from table cache (e.g. "DROP TABLE") while another
thread evicts table instance of the same table from table cache
concurrently.

After "MDEV-10296 - Multi-instance table cache" there is a gap in
eviction code of tc_add_table() between removing table from free_tables
and all_tables not protected by any mutexes.

This is now valid table cache state, however assertion wasn't amended
along with original patch. Moved assertion down, after waiting for such
table instances to get closed.
2018-09-10 18:31:14 +04:00
Daniel Bartholomew
f1bcfbb437 bump the VERSION 2018-09-08 11:34:22 -04:00
Jan Lindström
f01c4a10d7 Add one more wait for truncate in MW-44. 2018-09-08 08:12:55 +03:00
Igor Babaev
4d991abd4f MDEV-17024 Crash on large query
This problem manifested itself when a join query used two or more
materialized CTE such that each of them employed the same recursive CTE.
The bug caused a crash. The crash happened because the cleanup()
function was performed premature for recursive CTE. This clean up was
induced by the cleanup of the first CTE referenced the recusrsive CTE.
This cleanup destroyed the structures that would allow to read from the
temporary table containing the rows of the recursive CTE and an attempt to read
these rows for the second CTE referencing the recursive CTE triggered a
crash.
The clean up for a recursive CTE R should be performed after the cleanup
of the last materialized CTE that uses R.
2018-09-07 20:10:45 -07:00
Marko Mäkelä
59950df533 Remove some debug-only global status variables 2018-09-07 22:06:20 +03:00
Marko Mäkelä
0927332961 Make some declarations private
recv_addr_state, recv_addr_t: Define in log0recv.cc only.
2018-09-07 22:06:20 +03:00
Marko Mäkelä
93ed717b3d Relax debug assertions for undo tablespace recovery 2018-09-07 22:06:20 +03:00
Marko Mäkelä
9f6a0d291f row_purge_parse_undo_rec(): Deduplicate some code 2018-09-07 22:06:20 +03:00
Marko Mäkelä
68466bb485 innobase_init(): Remove an unnecessary condition
Because innodb_file_per_table can be enabled at runtime after it
was disabled at startup, it is better to always register the same
innobase_hton->tablefile_extensions. Besides,
innodb_file_per_table=OFF does not prevent loading tables that may
have been created earlier with the .ibd file extension.
2018-09-07 22:06:20 +03:00
Sergei Golubchik
908ac40bdb Merge branch 'bb-10.1-release' into 10.1 2018-09-07 20:24:49 +02:00
Sergei Golubchik
0254be96f7 remove doubly-installed file 2018-09-07 20:24:32 +02:00
Vladislav Vaintroub
58389c71c2 MDEV-16671 - crash in mariabackup with my.cnf with plugin-load=ha_rocksdb
Remove plugin-load option from mariabackup. It does not needed to be an
option (we only need to store the plugin-load value during backup phase,
and reuse the same value during --prepare).

Fix is to read plugin-load from backup-my.cnf during prepare.
2018-09-07 18:18:49 +01:00
Elena Stepanova
b1d72f1722 Updated list of unstable tests for 10.1.36 release 2018-09-07 16:49:39 +03:00
Sergei Golubchik
db947b7599 Merge branch '10.0-galera' into 10.1 2018-09-07 15:25:27 +02:00
Jan Lindström
edb3a32c6c MDEV-17143: Galera test failure on galera.MW-44
Test changes only.
2018-09-07 15:58:59 +03:00
Sergei Golubchik
f95d26b4d3 Merge branch '10.1' into bb-10.1-release 2018-09-07 11:52:05 +02:00
Jan Lindström
285969e1c6 Fix result file for wsrep.variables, for some reason had too new
galera library used.
2018-09-07 11:27:15 +03:00
Oleksandr Byelkin
62dbf4f18d post merge 2018-09-07 01:35:09 +02:00
Sergei Golubchik
727324c1e9 Merge tag 'mariadb-10.2.17' into 10.2 2018-09-07 01:14:19 +02:00
Oleksandr Byelkin
31081593aa Merge branch '11.0' into 10.1 2018-09-06 22:45:19 +02:00
Sergei Golubchik
3a4242fd57 TokuDB: Don't free P_S instrumented mutexes after exit()
don't create static objects that destroy mutexes from destructors,
and don't destroy mutexes from .so destructor (on-unload) function.

if it happens after exit(), P_S will be long gone by that time

this fixes tokudb tests crashing on quantal-amd64
2018-09-06 21:06:31 +02:00
Oleksandr Byelkin
d527bf5390 Merge branch 'merge-tokudb-5.6' into 10.0 2018-09-06 21:04:56 +02:00
Jan Lindström
b0026e33af Disable failing galera test for now. 2018-09-06 18:55:57 +03:00
Vladislav Vaintroub
a0631e7221 MDEV-17149 mariabackup hangs if innodb is not started
Fix exit condition for the log copying thread.
2018-09-06 15:31:29 +01:00
Jan Lindström
fba683c069 MDEV-17062: Test failure on galera.MW-336
MDEV-17058: Test failure on wsrep.variables
MDEV-17060: Test failure on galera.galera_var_slave_threads

Fix incorrect calculation of increased applier (slave) threads.
Note that increase change takes effect "immediately" but we should
use proper wait condition to wait it. Reducing the number of
slave threads is not immediate as thread will only exit after a
replication event.
2018-09-06 16:05:31 +03:00
Jan Lindström
653038ccad
Merge pull request #855 from tempesta-tech/sysprg/10.1-MDEV-10756
MDEV-10756: wsrep_sst_xtrabackup-v2 does not support innodb_data_home_dir
2018-09-06 14:10:29 +03:00
Sergei Golubchik
0ccba62db3 MDEV-16465 Invalid (old?) table or database name or hang in ha_innobase::delete_table and log semaphore wait upon concurrent DDL with foreign keys
lowercase db and table names before prelocking.

Post-fix for 9180e8666b

This fixes failures on main.lowercase_table4 on Windows
2018-09-06 01:30:10 +02:00
Vladislav Vaintroub
67b87e1d76 Rocksdb, Windows - better fix for broken WIN32_LEAN_AND_MEAN
(https://github.com/facebook/rocksdb/issues/4344)
Also, disable /permissive- flag if set, it breaks rocksdb compilation
in 10.3 on older versions of Windows 8.1 SDK.
2018-09-05 19:32:31 +01:00
Sergey Vojtovich
4cf75706b3 MDEV-16757 Memory leak after adding manually min/max statistical data
for blob column

Moved delete_stat_values_for_table_share() call to proper place.
2018-09-05 17:14:20 +04:00
Jan Lindström
6695fcead3 Galera test case cleanups. 2018-09-05 10:34:36 +03:00
Jan Lindström
b44b9f71bd MDEV-15436: If log_bin and log_bin_index is different SST with rsync fails.
Problem was that in SST log_bin_index name and directory was not
handled and passed to rsync SST script.

wsrep_sst_common.sh
	Read binlog index dirname and filename if --binlog-index
	parameter is provided. Read binlog filenames from that file
	from donor and write transfered binlog filenames to that
	file in joiner.

mysqld.cc, mysqld.h
	Moved opt_binlog_index_name from static to global and added
	it to extern.

wsrep_sst.cc

generate_binlog_index_opt_val
	New function to generate binlog index name if opt_binlog_index_name is
	given on configuration.

sst_prepare_other
	Add binlog index configuration to SST command.

wsrep_sst.h
	Add new SST parameter --binlog-index

Add test case.
2018-09-05 10:34:36 +03:00
Marko Mäkelä
4caf3e08a8 Add MDEV-11080, MDEV-16709 tests for the MDEV-13333 fix
The regression that was introduced in
commit 723f87e9d3
was fixed as part of MDEV-13333
(commit 3b37edee1a)
without a test case, because the MDEV-13333 test case
is even less deterministic than these ones.
2018-09-04 20:21:57 +03:00
Sergei Golubchik
09bc99fac9 cleanup: remove extra/rpl_tests/rpl_foreign_key.test 2018-09-04 09:49:53 +02:00
Sergei Golubchik
d831cefb43 MDEV-16465 Invalid (old?) table or database name or hang in ha_innobase::delete_table and log semaphore wait upon concurrent DDL with foreign keys
Disable "Invalid (old?) table or database name" warning when
converting table names in InnoDB's get_foreign_key_info().

Because a name can be a temporary table name during the ALTER TABLE,
and some other thread can do SHOW CREATE TABLE for the other table
in the FK relationships _anytime_.
2018-09-04 09:49:53 +02:00
Sergei Golubchik
9180e8666b MDEV-16465 Invalid (old?) table or database name or hang in ha_innobase::delete_table and log semaphore wait upon concurrent DDL with foreign keys
ALTER TABLE locks the table with TL_READ_NO_INSERT, to prevent the
source table modifications while it's being copied. But there's an
indirect way of modifying a table, via cascade FK actions.

After previous commits, an attempt to modify an FK parent table
will cause FK children to be prelocked, so the table-being-altered
cannot be modified by a cascade FK action, because ALTER holds a
lock and prelocking will wait.

But if a new FK is being added by this very ALTER, then the target
table is not locked yet (it's a temporary table). So, we have to
lock FK parents explicitly.
2018-09-04 09:49:53 +02:00
Sergei Golubchik
e81f101dac create a reusable function that tells what FK actions can write
Backport of 794f71cbc4
2018-09-04 09:49:52 +02:00
Sergei Golubchik
dd74332d2c MDEV-12669 Circular foreign keys cause a loop and OOM upon LOCK TABLE
table_already_fk_prelocked() was looking for a table in the wrong
list (not the complete list of prelocked tables, but only in its tail,
starting from the current table - which is always empty for the last
added table), so for circular FKs it kept adding same tables to the list
indefinitely.

Backport of d6d7e169fb
2018-09-04 09:49:52 +02:00
Sergei Golubchik
710093ccb0 compilation failure 2018-09-04 09:49:52 +02:00
Sergei Golubchik
a6246cab16 fix failures of innodb_plugin tests in --embedded
Post-fix for 7e8ed15b95

Also, apply the same innodb fix to xtradb.
2018-09-04 09:19:50 +02:00