Commit graph

180326 commits

Author SHA1 Message Date
Aleksey Midenkov
ab5ec0f346 SQL: disable truncate history on partitioned [fixes #399] 2017-12-14 19:11:02 +03:00
Aleksey Midenkov
f96815fe97 SQL: unit resolution Item_field not yet accessible [fixes #398] 2017-12-14 18:42:53 +03:00
Aleksey Midenkov
1668efb722 MDEV-14645: AS OF TIMESTAMP is misused as TRX_ID [fixes #396] 2017-12-14 18:14:21 +03:00
Eugene Kosov
765569602d System Versioning 1.0 pre4
Merge branch '10.3' into trunk
2017-12-14 17:52:08 +03:00
Eugene Kosov
5d5ae2f4fe Tests: fix encryption.debug_key_management [#387] 2017-12-14 15:50:02 +03:00
Eugene Kosov
f14f04838b Tests: fix encryption.encrypt_and_grep [#387] 2017-12-14 15:38:52 +03:00
Aleksey Midenkov
2e3b580ba4 SQL: inner/outer system_time consistency [fixes #384] 2017-12-14 13:43:37 +03:00
Aleksey Midenkov
eab471260b Paritioning: better error for disabled IB engine 2017-12-13 23:51:30 +03:00
Aleksey Midenkov
8e8363bb75 SQL: VIEW system fields propagation removed [fixes #393] 2017-12-13 18:23:32 +03:00
Eugene Kosov
a83fcbaa3b
MDEV-14632 Assertion `!((new_col->prtype ^ col->prtype) & ~256U)' failed in row_log_table_apply_convert_mrec
SQL: add exclusive lock to ADD/DROP SYSTEM VERSIONING clauses

This is needed because Online DDL is not working yet for such queries.
2017-12-13 17:58:36 +03:00
Aleksey Midenkov
bc4a86699d SQL: recursive CTE inner derived vers_conditions [fix #385] 2017-12-13 15:31:46 +03:00
Aleksey Midenkov
22f45062de Cleanup: unwrapped large block in vers_setup_conds() 2017-12-13 12:16:49 +03:00
Sergey Vojtovich
159a6c2e60 MDEV-14505 - Threads_running becomes scalability bottleneck
Instead of updating global counter, calculate Threads_running on the fly.
All threads having command != COM_SLEEP are included.

Behaviour changes:

Previously SHOW STATUS and SHOW GLOBAL STATUS returned the same values
representing global status. Now SHOW STATUS always returns 1 indicating that
current session has 1 thread running.

Previously only threads that were executing dispatch_command() or running events
were accounted by Threads_running. Now it is rough equivalent of
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE state!='Sleep'
2017-12-13 12:46:33 +04:00
Eugene Kosov
717f274b87 MDEV-14631 Assertion `!sys_trx_start && !sys_trx_end' failed in crete_tmp_table
SQL: remove unneeded assertion
SQL: disallow set sys_trx fields in INSERT ... SELECT

Fixes by @midenok.
2017-12-12 22:33:49 +03:00
Eugene Kosov
c66a20b494 SQL: better check for partition engine [#366]
Cleaned up by @midenok.
2017-12-12 22:01:39 +03:00
Jacob Mathew
751e0f6b1e Merge remote-tracking branch 'origin/bb-10.3-MDEV-14568' into 10.3 2017-12-12 10:58:39 -08:00
Eugene Kosov
74cc9ec142 Tests: regenerate funcs_1.is_columns_mysql_embedded [#387] 2017-12-12 21:40:13 +03:00
Aleksey Midenkov
459f40a232
SQL: create..select revisited [closes #370] 2017-12-12 21:30:49 +03:00
Aleksey Midenkov
a0e137c4a9 SQL: RIGHT JOIN in derived [fix #383] 2017-12-12 20:39:44 +03:00
Aleksey Midenkov
364f42d091 Scripts: --tail-lines option for mtr (#493) 2017-12-12 19:03:42 +02:00
Monty
d4a4185451 MDEV Assertion `partition_id == m_extra_cache_part_id' failed in ha_partition::late_extra_no_cache
The problem was that multi_range_read_info_const() called
multi_range_key_create_key() which changed m_part_spec.start_part,
while there was an activ table scan ongoing.

Fixed by copying and restoring m_part_spec around
multi_range_key_create_calls()
2017-12-12 15:10:53 +02:00
Eugene Kosov
cb4657e3b4
MDEV-14627 SQL: disallow ADD SYSTEM VERSIONING for system-versioned tables
SQL: disallow ADD SYSTEM VERSIONING for system-versioned tables
2017-12-12 14:56:28 +03:00
Marko Mäkelä
0edd395e8d Merge bb-10.2-ext into 10.3 2017-12-12 13:32:49 +02:00
Marko Mäkelä
0628123617 Merge 10.2 into bb-10.2-ext 2017-12-12 13:27:35 +02:00
Marko Mäkelä
ccf22b8025 Post-merge fix: Adjust message codes in results 2017-12-12 13:27:16 +02:00
Sergei Petrunia
86c69263a4 MDEV-14389: MyRocks and NOPAD collations
Part #2: Take into accont the fact that three binary collations that
we handle are technically NOPAD collations
2017-12-12 13:31:41 +03:00
Marko Mäkelä
c2c4c1952d Remove an unused error code 2017-12-12 09:57:40 +02:00
Marko Mäkelä
34841d2305 Merge bb-10.2-ext into 10.3 2017-12-12 09:57:17 +02:00
Marko Mäkelä
a285e68018 Merge 10.2 into bb-10.2-ext 2017-12-12 09:15:17 +02:00
Varun Gupta
62eaf7b657 MDEV-14573: Upgrade from previous versions is broken for procedures 2017-12-12 12:09:52 +05:30
Sergei Petrunia
e12f77a7e3 MDEV-14389: MyRocks and NOPAD collations
Disallow use of NOPAD collations in indexed columns.
2017-12-12 01:33:03 +03:00
Eugene Kosov
9c718de2ed Tests: versioning.derived fix for buildbot 2017-12-12 01:04:07 +03:00
Vladislav Vaintroub
70d6c944cb MDEV-14113 Use abortive TCP close, in case server closes the connection
first, and we do not not care whether client has received all data.

This is a TCP optimization to avoid TIME_WAIT in TCP connection teardown.

This patch would abort connection on timeout, which usually happens when
client reads a large result set, at slower pace then the server can
write.

The patch also cleans up socket timeout handling, so that Windows
is consistent with another platforms (using nonblocking socket IO
 + waiting in poll/select on single socket, rather than setsockopt).
This makes identifying timeouts easier.


Also removed the superficial shutdown() before closesocket() in a few
places where it was used, because it  was never needed , and
reportedly breaks SO_LINGER on Windows.
2017-12-11 14:54:17 +00:00
Marko Mäkelä
8695c816e7 Wrap __atomic_compare_exchange_n() as valid C 2017-12-11 15:57:51 +02:00
Marko Mäkelä
e312a407b8 Merge 10.2 into bb-10.2-ext 2017-12-11 15:06:11 +02:00
Aleksey Midenkov
79dd77e6ae System Versioning 1.0 pre3
Merge branch '10.3' into trunk
2017-12-11 15:43:41 +03:00
Marko Mäkelä
13b9ec651a MDEV-14589 InnoDB should not lock a delete-marked record
When the transaction isolation level is SERIALIZABLE, or when
a locking read is performed in the REPEATABLE READ isolation level,
InnoDB must lock delete-marked records in order to prevent another
transaction from inserting something.

However, at READ UNCOMMITTED or READ COMMITTED isolation level or
when the parameter innodb_locks_unsafe_for_binlog is set, the
repeatability of the reads does not matter, and there is no need
to lock any records.

row_search_mvcc(): Skip locks on delete-marked committed records upfront,
instead of invoking row_unlock_for_mysql() afterwards. The unlocking
never worked for secondary index records.
2017-12-11 14:39:53 +02:00
Marko Mäkelä
434c9e6f0e MDEV-14614 InnoDB: Failing assertion in dict_stats_rename_table()
dict_stats_rename_table(): After DB_LOCK_WAIT_TIMEOUT
or DB_DUPLICATE_KEY, reset the trx->error_state before retrying.
Also, properly treat DB_DEADLOCK as a hard error.
2017-12-11 13:56:50 +02:00
Marko Mäkelä
1e6ac94451 Correct the comment of row_vers_impl_x_locked() 2017-12-11 13:56:36 +02:00
Sergei Petrunia
bdeb27a000 MDEV-14123: .rocksdb folder may break workflow which re-create data directory
Part #2: Adjust other parts of testsuite to take into account
that RocksDB files are in "#rocksdb" now.
2017-12-11 12:31:59 +03:00
Sergei Petrunia
ddc1d6904a MDEV-14123: .rocksdb folder may break workflow which re-create data directory
Part2: make MyRocks add its directory into @@ignore_db_dirs when starting.

This is necessary because apparently not everybody are using plugin's my.cnf
So load ha_rocksdb.{so,dll} manually and then hit MDEV-12451, MDEV-14461
etc.
2017-12-11 12:31:58 +03:00
Sergei Petrunia
b8a0373ed2 MDEV-14123: ".rocksdb folder may break workflow", and other MDEVs
Rename  Use '#rocksdb' instead of '.rocksdb' as subdirectory for RocksDB
datadir.
2017-12-11 12:31:58 +03:00
Marko Mäkelä
40eee1da17 MDEV-14614 InnoDB: Failing assertion: trx->error_state == DB_SUCCESS or lock wait timeout upon saving statistics
The assertion failure was caused by
MDEV-14511 Use fewer transactions for updating InnoDB persistent statistics

We are reusing a transaction object after commit, and sometimes,
even after a successful operation, the trx_t::error_state may be
something else than DB_SUCCESS. Reset the field when needed.
2017-12-11 10:12:14 +02:00
Marko Mäkelä
86beb08774 Remove an unnecessary dependency on persistent statistics 2017-12-11 09:31:28 +02:00
Aleksey Midenkov
b7cd182896 SQL: DEFAULT value for system fields [closes #376] 2017-12-10 23:52:51 +03:00
Varun Gupta
8f581e8bf1 Removing files sql/item_sum.cc.orig and sql/item_sum.h.orig added by
commit 6d63a03490
    MDEV-11297: Add support for LIMIT clause in GROUP_CONCAT()
2017-12-10 23:10:43 +05:30
Vesa Pentti
99bcec295d MDEV-12501 -- set --maturity-level by default
* Note: breaking change; since this commit, a plugin that has
    worked so far might get rejected due to plugin maturity
  * mariabackup is not affected (allows all plugins)
  * VERSION file defines SERVER_MATURITY, which defines the
    corresponding numeric value as SERVER_MATURITY_LEVEL in
    include/mysql_version.h
  * The default value for 'plugin_maturity' is SERVER_MATURITY_LEVEL - 1
  * Logs a warning if a plugin has maturity lower than
    SERVER_MATURITY_LEVEL
  * Tests suppress the plugin maturity warning
  * Tests use --plugin-maturity=unknown by default so as not to fail
    due to the stricter plugin maturity handling
2017-12-09 23:34:43 +00:00
Sergey Vojtovich
927dd9f355 Fixed LF_BACKOFF calls 2017-12-08 21:35:29 +04:00
Eugene Kosov
2968543f8d IB: NULL instead of autodecrement [closes #373] 2017-12-08 19:37:24 +03:00
Aleksey Midenkov
947aa0bab9 SQL: vers_setup_select() misc refactoring
Renamed to SELECT_LEX::vers_setup_conds().
Moved optimized fields check to JOIN::vers_check_items().
2017-12-08 19:37:24 +03:00