Commit graph

185833 commits

Author SHA1 Message Date
Marko Mäkelä
bfbf0f2251 MDEV-20525: Fix the -std=c90 builds 2019-09-13 18:11:32 +03:00
Marko Mäkelä
b214264aee MDEV-20525 rocksdb debug compilation fails on Windows due to unresolved my_assert variable
MYSQL_PLUGIN_IMPORT did not work correctly for the RocksDB helper library
rocksdb_aux_lib, because that library was not compiled with
-DMYSQL_DYNAMIC_PLUGIN.

Fix DBUG such that it does not depend on exported data, only on functions
(which do not need MYSQL_PLUGIN_IMPORT decoration)

Use a "getter" function _db_my_assert() instead of DLL-exported variable.

Also, reduce object code duplication by moving more of the DBUG_ASSERT
logic inside the _db_my_assert() function, and add unlikely() and
ATTRIBUTE_COLD hints to ensure that the 'assertion failed' code will
be separated from the main control flow logic. Thus, the compiler can
move the unlikely() code to the end of the compiled function, reachable
via a forward conditional branch, which the processor's branch predictor
could assume 'not taken'.
2019-09-13 15:28:53 +03:00
Vladislav Vaintroub
41290e91b7 Fix CMake warning in spider, in Windows ninja build 2019-09-12 17:06:06 +02:00
Alexey Botchkov
9554ef0678 MDEV-19670 json escaped unicode parse error.
Fixed 4-byte length characters handled incorrectly.
2019-09-12 11:12:55 +04:00
Marko Mäkelä
0fa5ad3acf Merge 10.2 into 10.3 2019-09-11 16:42:01 +03:00
Daniel Bartholomew
40ab433ecc
bump the VERSION 2019-09-11 09:13:47 -04:00
Daniel Bartholomew
863a951731
bump the VERSION 2019-09-11 09:11:58 -04:00
Marko Mäkelä
0f950e53f0 MDEV-20562 btr_cur_open_at_rnd_pos() fails to return error for corrupted page
In mysql-server/commit@f46329044f
the InnoDB function btr_cur_open_at_rnd_pos() was corrected so that
it would return a status that indicates whether the cursor was
successfully positioned. But this change was not correctly merged to
MariaDB in 2e814d4702.

btr_cur_open_at_rnd_pos(): In the code path that was introduced in
MDEV-8588, properly return failure status.

No deterministic test case was found for this failure.
It was caught after removing the function
page_copy_rec_list_end_to_created_page() in a development branch.
As a result, the fill factor of index trees would improve, and
supposedly, so would the probability of btr_cur_open_at_rnd_pos()
reaching the intentionally corrupted page in the test
innodb.leaf_page_corrupted_during_recovery.
The wrong return value would cause
btr_estimate_number_of_different_key_vals() to wrongly invoke
btr_rec_get_externally_stored_len() on a non-leaf page and
trigger an assertion failure at the start of that function.
2019-09-11 15:30:19 +03:00
Thirunarayanan Balathandayuthapani
df4dee4b84 MDEV-17939 Assertion `++loop_count < 2' failed in trx_undo_report_rename
- During trx_undo_report_rename(), InnoDB can fail to write undo log
for it if undo log doesn't fit in the undo page. In that case, InnoDB
adds one more undo log page and retry to write the rename undo log.
But the assert is wrong and it doesn't allow to fail even for one time.
2019-09-11 16:02:41 +05:30
Marko Mäkelä
c6a6830916 Merge 10.2 into 10.3 2019-09-11 10:32:24 +03:00
Alexander Barkov
f1616bacb7 Adding missing semicolons to sql_yacc_ora.yy (10.3), indentation cleanups. 2019-09-11 10:13:19 +04:00
Marko Mäkelä
f7fe51f126 Merge 10.1 into 10.2 2019-09-11 08:48:00 +03:00
Marko Mäkelä
d6f0e60a67 Merge 5.5 into 10.1
Null merge the MDEV-14383 fix; it affects 5.5 only.
2019-09-11 08:11:46 +03:00
Alexander Barkov
f1309fac33 Adding missing semicolons to sql_yacc.yy (10.3), indentation cleanups. 2019-09-11 05:12:37 +04:00
Alexander Barkov
48f8e3f3f4 Merge remote-tracking branch 'origin/10.2' into 10.3 2019-09-11 04:47:01 +04:00
Alexander Barkov
5ec4efb7b1 Adding missing semicolons to sql_yacc.yy (10.2) 2019-09-11 04:44:24 +04:00
Nikita Malyavin
acf0f2d592 MDEV-20143 innodb.innodb-virtual-columns-debug failed in buildbot with wrong result
there was a SELECT/DELETE race
2019-09-10 16:14:50 +03:00
Marko Mäkelä
ff5ecfd335 Correct the merge 0f83c8878d
Re-enable some Galera tests that should have been enabled.

Add client_ed25519.so to debian/libmariadb3.install;
merge e47a143fc0 correctly.

Remove a duplicated #include from wsrep_mysqld.cc.
2019-09-10 10:04:04 +03:00
Marko Mäkelä
da9201dd5b Merge 10.2 into 10.3 2019-09-10 09:25:20 +03:00
Nikita Malyavin
aabd1c8fcb MDEV-16490 fix versioning.partition failure 2019-09-09 22:30:53 +03:00
Vladislav Vaintroub
879c9ddce7 MDEV-20542 Windows enable/d2OptimizeHugeFunctions 2019-09-09 19:57:25 +02:00
Nikita Malyavin
f6a7730c45 MDEV-16490: It's possible to make a system versioned table without any versioning field
* do not allow versioned table to be without versioned (non-system) fields
* prohibit changing field versioning, when removing table versioning
* handle CREATE...SELECT as well
2019-09-09 20:14:47 +03:00
Marko Mäkelä
43a6e81ccb MDEV-19514 preparation: Remove innodb_change_buffering_debug=2
The setting innodb_change_buffering_debug=2 was supposed to inject
a crash during change buffer merge. There is no public test for
that functionality, and even if there were, it would be better
to use DEBUG_SYNC to halt the thread that does change buffer merge,
force a redo log flush from another thread, and finally kill the
server externally.
2019-09-09 18:18:52 +03:00
Vladislav Vaintroub
2336e0b394 MDEV-20206 : Crash inside timer_callback()[threadpool_win.cc:419]
The most likely cause of the crash is that a timer fired, after it was closed.

MSDN documents such a possibility, in the documentation for
CloseThreadpoolTimer() function, and recommends disabling the timer before
calling WaitForThreadpoolTimerCallbacks()/CloseThreadpoolTimer().

The fix follows this recommendation.

Note, that 5.5-10.1 disabled the timer before close, but this code
was lost in threadpool refactoring in 10.2
2019-09-09 13:52:30 +02:00
Vladislav Vaintroub
a895c68c58 On Windows, treat linker warnings as errors, if
MYSQL_MAINTAINER_MODE is ERR
2019-09-09 13:52:30 +02:00
Vladislav Vaintroub
d251b76884 Fix warning when compiling with OpenSSL. 2019-09-09 13:52:30 +02:00
Vladislav Vaintroub
7e7b6ec4d6 Fix connect RESTSDK support.
Remove debug output,
remove overriding of the Windows C runtime flags(linker warning)
do not add code that depends on restsdk if library is not going
to be linked.

freaking Connect
2019-09-09 13:52:30 +02:00
Vladislav Vaintroub
803bb5cdf8 Windows, cmake : Fix occasional link error when switching between debug to optimized compilation
For Visual Studio generator, use a per-config .def/.lib files with symbols
exported from mysqld.exe

Functions exported from mysqld.exe may differ between debug/optimized
compilation, e.g dbug functions are missing in release config.
2019-09-09 13:52:30 +02:00
Alexey Botchkov
031c695b8c MDEV-16594 ALTER DATA DIRECTORY in PARTITIONS of InnoDB storage does nothing silently
InnoDB intentionally (it's a documented behavior) ignores changing of
DATA DIRECTORY and INDEX DIRECTORY for partitions. Though we should
issue warning when this happens.
2019-09-09 15:39:12 +04:00
Jan Lindström
0fd5b11eb0 MDEV-20511: Galera replication of events is not consistent
After SST from master node (the one where event is ENABLED) - you will end up with the event enabled on two nodes, hence it's now being executed twice. It can be solved by comparing event's originator with server_id. if not equal, then change its status to 'SLAVESIDE_DISABLED'

Changes to be committed:
	new file:   mysql-test/suite/galera/r/galera_events2.result
	new file:   mysql-test/suite/galera/t/galera_events2.test
	modified:   sql/events.cc
2019-09-09 14:23:59 +03:00
Jan Lindström
efbfded563 Move MW-328B to big test to avoid test timeout. 2019-09-09 14:23:59 +03:00
Jan Lindström
caa7bb62f6 MDEV-20485: Galera test failure on galera.galera_var_node_address
Test changes only.
2019-09-09 14:23:59 +03:00
Jan Lindström
b8b4b6594e MDEV-19926: Galera SST tests fail
Enable after SST script changes.
2019-09-09 14:23:59 +03:00
Marko Mäkelä
7591a24fa6 MDEV-20531: innodb.temporary_table_optimisation fails
Try to use more deterministic floating-point operations.
Apparently, 2.2 > 2.2 wrongly holds on many platforms, but
not ppc64le on the compiler used on Red Had Enterprise Linux 8.
The reason could be an infinite binary presentation:
2.2 = 0b10.001100110011…

With t1_f = 2.5 = 0b10.1, t1_f > 2.5 would no longer hold on AMD64.
Let us replace the 2.2 with 2.5 and compare t1_f >= 2.5 in order to
get more consistent results across all platforms.
2019-09-09 13:06:33 +03:00
Elena Stepanova
604f80e77c List of unstable tests for 10.3.18 release 2019-09-08 19:49:40 +03:00
Elena Stepanova
f9f968557f List of unstable tests for 10.2.27 release 2019-09-08 16:21:48 +03:00
Alexander Barkov
8750df43ab MDEV-20517 Assertion `!is_expensive()' failed in Item::value_depends_on_sql_mode_const_item 2019-09-07 07:44:54 +04:00
Sergei Golubchik
f80e02e043 Merge branch '10.2' into 10.3 2019-09-06 16:58:39 +02:00
Sergei Golubchik
39e5b76ef1 use a shorter name for sources in debuginfo rpms
have the same path as in source rpms, don't build them differently
2019-09-06 16:35:56 +02:00
Sergei Golubchik
5a9e2b77d4 Part3: MDEV-18156 Assertion 0' failed or btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with PAD_CHAR_TO_FULL_LENGTH
Don't break compatibility in GA releases.
Warn the user, but don't refuse to create a table until 10.5
2019-09-06 16:35:56 +02:00
Sergei Golubchik
2480f6b7ff don't run RocksDB suites by default 2019-09-06 16:35:56 +02:00
Marko Mäkelä
292e2649d4 MDEV-12121: Avoid unused variable
With cmake -DWITH_INNODB_AHI=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo
the variable 'i' in fseg_free_extent() was declared but not used.
2019-09-06 12:50:53 +03:00
Vlad Lesin
16e9943d89 MDEV-20421: big_innodb_log reliably fails on buildbot Windows
The test fails because it reuses mysqltest perl code to copy directory
tree, and this code contains Windows-specific piece which outputs some
diagnostic information.

The patch introduces new parameter for that Windows-specific perl code to
have the ability to suppress diagnostic output on the corresponding
mysqltest perl module initialization.
2019-09-06 12:05:20 +03:00
Sergei Petrunia
41e351f608 MDEV-20490: rocksdb.ttl_primary_read_filtering fails in BB
Make the test stable: after DROP TABLE, make sure the compaction is
run and finishes.

If we don't do this, the post-drop compaction may run during the next
testcase. It will cause a record from the next testcase to be compacted
away when the test logic doesn't expect it and the test will fail
2019-09-05 17:43:13 +03:00
Marko Mäkelä
2842c36985 MDEV-20425: Enable a test for debug builds 2019-09-05 16:37:32 +03:00
Marko Mäkelä
67e2252ba1 Simplify trx_state_eq() 2019-09-05 15:59:21 +03:00
Marko Mäkelä
2c9e75ccfe MDEV-15326 after-merge fixes
trx_t::is_recovered: Revert most of the changes that were made by the
merge of MDEV-15326 from 10.2. The trx_sys.rw_trx_hash and the recovery
of transactions at startup is quite different in 10.3.

trx_free_at_shutdown(): Avoid excessive mutex protection. Reading fields
that can only be modified by the current thread (owning the transaction)
can be done outside mutex.

trx_t::commit_state(): Restore a tighter assertion.

trx_rollback_recovered(): Clarify why there is no potential race condition
with other transactions.

lock_trx_release_locks(): Merge with trx_t::release_locks(),
and avoid holding lock_sys.mutex unnecessarily long.

rw_trx_hash_t::find(): Remove redundant code, and avoid starving the
committer by checking trx_t::state before trx_t::reference().
2019-09-05 15:58:31 +03:00
Marko Mäkelä
537f8594a6 Merge 10.2 into 10.3 2019-09-04 17:52:04 +03:00
Sergei Golubchik
f605ce08b5 more tests for DEFAULT and DEFAULT(column) in INSERT
this is not ideal and needs to be fixed eventually,
but it's consistent over all forms of INSERT.
2019-09-04 15:37:23 +02:00
Sergei Golubchik
8dca4cf53f MDEV-20403 Assertion 0' or Assertion btr_validate_index(index, 0)' failed in row_upd_sec_index_entry or error code 126: Index is corrupted upon UPDATE with TIMESTAMP..ON UPDATE
remove a special treatment of a bare DEFAULT keyword that made it
behave inconsistently and differently from DEFAULT(column).
Now all forms of the explicit assignment of a default column value
behave identically, and all count as an explicitly assigned value
(for the purpose of ON UPDATE NOW).

followup for c7c481f4d9
2019-09-04 15:37:23 +02:00