Commit graph

183597 commits

Author SHA1 Message Date
Sergei Golubchik
1fc5a6f30c Merge branch '10.0' into 10.1 2018-09-23 12:58:11 +02:00
Jan Lindström
87dc4e98dd MDEV-17276: Adjust Galera tests after Galera library 25.3.24 2018-09-23 13:53:57 +03:00
Sergei Petrunia
2b45eb77f7 MDEV-17261: sysbench oltp read only too slow for MyRocks
An error in "group commit with MariaDB's binlog" code: we would flush
the WAL even when the transaction did not do any writes (and so the logic
in myrocks::Rdb_transaction::commit caused it to rollback).
2018-09-23 13:41:08 +03:00
Jan Lindström
eefaf4fdc9 Adjust disabled Galera tests. 2018-09-23 13:26:25 +03:00
Jan Lindström
428669fa83 MDEV-15805: Test failure on galera.query_cache
Reset query cache after every test case and add wait after
load infile.
2018-09-23 13:26:10 +03:00
Sergei Golubchik
1144acbcbd tokudb: create and destroy TOKUDB_SHARE::_open_tables_mutex dynamically
to guarantee that it's destroyed when plugin deinit is called, not after
2018-09-22 20:18:17 +02:00
Sergei Golubchik
7aba6f8f88 fix galera_sst_rsync_data_dir again
(already fixed in 10.2. bad merge?)
2018-09-22 15:36:27 +02:00
Sergei Golubchik
3a9276bad3 sanitize tokudb locking macros 2018-09-22 15:19:40 +02:00
Sergei Golubchik
61a6f4bd96 MDEV-14560 Extra engines enabled through additional config are not loaded on first installation
Use RedHat-recommended /var/lib/rpm-state/mariadb/ for restart flag.
This also fixes SUSE where /var/lib/rpm-state doesn't necessarily exist.
2018-09-22 00:20:25 +02:00
Sergei Golubchik
e7d152293d MDEV-13089 identifier quoting in partitioning
cover ALTER TABLE
2018-09-21 20:22:14 +02:00
Sergei Golubchik
e4b466aa3d MDEV-16792 Assertion `m_status == DA_ERROR' failed in Diagnostics_area::sql_errno or wrong result upon SHOW TABLE STATUS after adding partition under ANSI_QUOTES
if opening a table fails with a syntax error, the error shouldn't
be suppressed completely as if it didn't happen at all.
2018-09-21 19:56:55 +02:00
Alexander Barkov
a4131c51f5 Merge remote-tracking branch 'origin/5.5' into bb-10.0-bar 2018-09-21 18:17:32 +04:00
Alexander Barkov
fc70f21e0a Fixing the comment not to mention the removed class Item_copy_int. 2018-09-21 18:04:56 +04:00
Alexander Barkov
b514a5f9e8 A cleanup for MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result
Unary minus operation for the smallest possible signed long long value
(LONLONG_MIN) is undefined in C++. Because of this, func_time.test
failed on ppc64 buildbot machines.

Fixing the code to avod using undefined operations.

This is fix is similar to "MDEV-7973 bigint fail with gcc 5.0"
2018-09-21 18:03:23 +04:00
Sergei Golubchik
5f654c2e91 comments and dbug keywords 2018-09-21 15:05:55 +02:00
Nikita Malyavin
c16a54c02e MDEV-16429: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' fails upon attempt to update virtual column on partitioned versioned table
When using buffered sort in `UPDATE`, keyread is used. In this case,
`TABLE::update_virtual_field` should be aborted, but it actually isn't,
because it is called not with a top-level handler, but with the one that
is actually going to access the disk. Here the problemm is issued with
partitioning, so the solution is to recursively mark for keyread all the
underlying partition handlers.

* ha_partition: update keyread state for child partitions

Closes #800
2018-09-21 15:05:54 +02:00
Sergei Golubchik
8893d199ef MDEV-17009 PIE issue on FreeBSD after 10.3.9 update
Followup for 96b8909062. Only link mysqld with
${INTERFACE_LIBS} using LINK_PUBLIC, everything else should be
using LINK_PRIVATE. This restores pre-96b8909062c behavior.

Also fixes
MDEV-17010 Multiple definition issue on FreeBSD after 10.3.9 update
2018-09-21 15:05:54 +02:00
Sergei Golubchik
27235eed67 Revert "MDEV-16768: fix blob key length"
This reverts commit 87609324e0

RocksDB was making invalid assumption about Field_blob::make_sort_key,
and the commit 87609324e0 changed Field_blob::make_sort_key to match
RocksDB assumptions.

It also unintentionaly broke sys_vars.max_sort_length_func
2018-09-21 15:05:54 +02:00
Marko Mäkelä
acc97298e5 Merge 5.5 into 10.0 2018-09-21 14:41:11 +03:00
Sergei Golubchik
1ebec10375 InnoDB: fix compilation with -DDBUG_OFF 2018-09-21 13:31:37 +02:00
Sergei Golubchik
21d157abaa MDEV-14560 Extra engines enabled through additional config are not loaded on first installation
RPM solution:

Make all server plugins to restart the server when installed.
To avoid multiple server restarts, do it only once in posttrans scriptlet.
Add support for CPACK_RPM_<component>_POST_TRANS_SCRIPT_FILE
2018-09-21 13:31:37 +02:00
Sergei Golubchik
5c83305c4c RPM: generate per-plugin.cnf files where git will ignore them 2018-09-21 13:31:37 +02:00
Marko Mäkelä
948e888097 Pull request #868: MDEV-17248 Improve ASAN memory pool instrumentation 2018-09-21 12:03:21 +03:00
Marko Mäkelä
8b6b2c3ea1 Fix mariabackup leaks (except my_load_defaults) 2018-09-21 11:18:59 +03:00
Marko Mäkelä
82675100d1 Remove an unused variable 2018-09-21 10:24:15 +03:00
Eugene Kosov
5b25dc6fa4 MDEV-17248 Improve ASAN memory pool instrumentation
alloc_root(): unpoison only requested amount of bytes instead of a
possible bigger aligned-sized buffer.
2018-09-21 10:17:37 +03:00
Marko Mäkelä
bc7d40d032 Clean up some SPATIAL INDEX code
Clarify some comments about accessing an externally stored column
on which a spatial index has been defined. Add a TODO comment that
we should actually write the minimum bounding rectangle (MBR) to
the undo log record, so that we can avoid fetching BLOBs and recomputing
MBR.

row_build_spatial_index_key(): Split from row_build_index_entry_low().
2018-09-21 09:27:06 +03:00
Alexander Barkov
d533f6d58b After-merge cleanup: adjust the test to work in 10.0
For the original test in 10.0 it was not really important if
find_user_wild() or find_user_exact() is used in sp_grant_privileges().
sp-security.test passed with either of them.

Fixing the test so it reliably fails with find_user_wild()
and pass with find_user_exact().
2018-09-21 09:32:17 +04:00
Alexander Barkov
80bcb05b24 Merge remote-tracking branch 'origin/5.5' into 10.0 2018-09-21 08:37:42 +04:00
Vladislav Vaintroub
c139dc6d38 Windows : Fix application verifier errors.
Make different threads that are running data_copy_thread_func()
use the same pthread_mutex for locking (not the copies of the same
pthread_mutex_t).
2018-09-20 19:27:59 +01:00
Alexander Barkov
e07118946a MDEV-17250 Remove unused Item_copy_xxx 2018-09-20 17:11:36 +04:00
Vladislav Vaintroub
0fa35ddf1f Amend fix for MDEV-17236
Simplify, and make it work with system tablespace outside of
innodb data home.

Also, do not reread TRX_SYS page  in endless loop,
if it appears to be corrupted.

Use finite number of attempts.
2018-09-20 14:08:57 +01:00
Alexander Barkov
935a163dd9 MDEV-17244 MAKETIME(900,0,0.111) returns a wrong result 2018-09-20 16:51:56 +04:00
Alexander Barkov
0c6455aa46 MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result 2018-09-20 16:02:58 +04:00
Thirunarayanan Balathandayuthapani
7e4bbd3aa6 MDEV-17236 mariabackup incorrectly tries to open ibdata1
if custom undo tablespace is defined

- In case of multiple undo tablespace, mariabackup have to open system
tablespace to find the list of undo tablespace present in TRX_SYS page.
For opening system tablespace, mariabackup should fetch the file name
from already initialized system tablespace object.
2018-09-20 17:13:12 +05:30
Marko Mäkelä
90b292ce31 Follow-up to MDEV-16328: ALTER TABLE…page_compression_level should not rebuild table
Allow combination of non-instant, non-rebuilding operations with
changes of table options that do not require a rebuild.

For example, DROP INDEX or ADD INDEX can be performed with
ALGORITHM=NOCOPY together with changing such table options.
Changing the table options alone would be allowed with ALGORITHM=INSTANT.

INNOBASE_ALTER_NOCREATE: A new set of flags, for operations that
are refused for ALGORITHM=INSTANT and do not involve creating
index trees.

Move ALTER_RENAME_INDEX to the proper place (INNOBASE_ALTER_INSTANT).

innobase_need_rebuild(): Do not require a rebuild if
INNOBASE_ALTER_NOREBUILD operations are combined with ALTER_OPTIONS.

ha_innobase::prepare_inplace_alter_table(),
ha_innobase::inplace_alter_table(): Use the fast path if
ALTER_OPTIONS is combined with INNOBASE_ALTER_NOCREATE.
In this case, the actual changes would be deferred to
ha_innobase::commit_inplace_alter_table().
2018-09-19 17:29:25 +03:00
Jan Lindström
3177d26627 MDEV-13873: galera.galera_suspend_slave failed in buildbot with wrong error code
Add wsrep_sync_wait as we want INSERT to fail.
2018-09-19 13:10:54 +03:00
Jan Lindström
45712a9a1f MDEV-13871: galera.galera_unicode_identifiers failed in buildbot with 'Unknown database'
Wait in second node until tables with databases are created.
2018-09-19 12:19:30 +03:00
Jan Lindström
82524239c4 MDEV-17208: Test failure on galera.MW-286
Test changes only.
2018-09-19 11:42:43 +03:00
Jan Lindström
654b587999 MDEV-17208: Test failure on galera.MW-286
Test changes only.
2018-09-19 11:33:22 +03:00
Igor Babaev
cd363fecbf Removed duplicate tests. 2018-09-19 01:24:46 -07:00
Marko Mäkelä
28ae79650d Terminology: 'metadata' not 'default rec'
This follows up to commit 755187c853.

TRX_UNDO_INSERT_METADATA: Renamed from TRX_UNDO_INSERT_DEFAULT

trx_undo_metadata: Renamed from trx_undo_default_rec
2018-09-19 09:12:58 +03:00
Marko Mäkelä
755187c853 Terminology: 'metadata record' instead of 'default row'
For instant ALTER TABLE, we store a hidden metadata record at the
start of the clustered index, to indicate how the format of the
records differs from the latest table definition.

The term 'default row' is too specific, because it applies to
instant ADD COLUMN only, and we will be supporting more classes
of instant ALTER TABLE later on. For instant ADD COLUMN, we
store the initial default values in the metadata record.
2018-09-19 07:21:24 +03:00
Vladislav Vaintroub
4a026596f5 MDEV-15088 Lighter version of Windows Zip distributions
Added forgotten code signing command.
2018-09-18 21:30:03 +01:00
Marko Mäkelä
043639f9b0 Simplify innobase_add_instant_try()
Remove some code duplication and dead code. If no 'default row'
record exists, the root page must be in the conventional format.
Should the page type already be FIL_PAGE_TYPE_INSTANT, we would
necessarily hit a debug assertion failure in page_set_instant().
2018-09-18 21:25:24 +03:00
Jacob Mathew
159b41b869 MDEV-17144: Sample of spider_direct_sql cause crash
The crash occurs when the Spider node server attempts to create an error
message stating that the temporary table is not found.  The function to
create the error message is called with incorrect parameters.

I fixed the crash by correcting the incorrect parameter values.

Author:
  Jacob Mathew.

Reviewer:
  Kentoku Shiba.

Merged:
  Commit e339616 branch bb-10.3-mdev-17144
2018-09-18 10:49:03 -07:00
Sergey Vojtovich
327b271721 MDEV-14410 - Assertion `table->pos_in_locked_tables == __null ||
table->pos_in_locked_tables->table == table'
             failed in mark_used_tables_as_free_for_reuse

Assertion failure can be triggered by some DDL executed under LOCK TABLES
that holds lock for DDL target table multiple times (either explicitly or
implcitly).

When closing all table instances for given table (e.g. when preparing for
table removal during CREATE OR REPLACE), only one instance was removed
from m_locked_tables list.

Later we attempt to re-insert one of the instances in mysql_create_table()/
add_back_last_deleted_lock(), which wasn't actually removed. This leads
to m_locks_tables corruption, specifically loss of all following elements.

Then UNLOCK TABLE won't reset some table instances properly (specifically
pos_in_locked_tables), since they're not present in m_locked_tables.

Eventually such table instance gets released to table cache and then
re-used by subsequent statement, which triggers this assertion failure.
2018-09-18 16:24:09 +04:00
Vladislav Vaintroub
09f8941a91 Merge branch 'bb-10.2-wlad-release' into 10.2 2018-09-18 09:05:26 +01:00
Igor Babaev
6858d5346c MDEV-17201 dropped anchor rows with non-null recursion query
The function st_select_lex_unit::exec_recursive() missed resetting of
select_limit_cnt and offset_limit_cnt before execution of union parts.
As a result recursive CTEs specified by UNIONs whose SELECTs contained
LIMIT/OFFSET could return wrong sets of records.
2018-09-17 23:15:56 -07:00
Marko Mäkelä
65474d92f5 Follow-up to "Fixed wrong printf in mariabackup"
This amends commit 4dc20ff687.

Starting with MariaDB 10.2, InnoDB defines
typedef size_t ulint;

The standard format for size_t uses the z modifier, for example,
"%zu" as in the macro ULINTPF.

"%lu" is wrong for size_t, because sizeof(unsigned long) can be
something else than sizeof(size_t). On Windows, the former would
always be 4 bytes, while size_t would be 4 or 8 bytes.
2018-09-18 06:23:25 +03:00