Commit graph

191114 commits

Author SHA1 Message Date
Oleksandr Byelkin
8e1e2856f2 Merge branch '10.4' into 10.5 2020-11-01 14:26:15 +01:00
Oleksandr Byelkin
80c951ce28 Merge branch '10.3' into 10.4 2020-10-31 21:06:49 +01:00
Marko Mäkelä
b0ff791618 MDEV-24054 Assertion in_LRU_list failed in buf_flush_try_neighbors()
buf_flush_try_neighbors(): Before invoking buf_page_t::ready_for_flush(),
check that the freshly looked up buf_pool.page_hash entry actually is
a buffer page and not a buf_pool.watch[] sentinel for purge buffering.

This race condition was introduced in MDEV-15053
(commit b1ab211dee).
It is rather hard to hit this bug, because
buf_flush_check_neighbors() already checked the condition.
The problem exists if buf_pool.watch_set() was invoked for
a page in the range after the check in buf_flush_check_neighbor()
had been finished.
2020-10-30 19:06:50 +02:00
Oleksandr Byelkin
794f665139 Merge branch '10.2' into 10.3 2020-10-30 17:23:53 +01:00
Marko Mäkelä
03357ded17 Merge 10.4 into 10.5 2020-10-30 13:53:10 +02:00
Marko Mäkelä
1fddccf676 Update Connector/C 2020-10-30 13:47:56 +02:00
Marko Mäkelä
5b3be9e1c6 Try to stabilize main.innodb_ext_key,off
Thanks to Varun Gupta for suggesting this. This seems to
make main.innodb_ext_key,off more stable.
2020-10-30 13:47:56 +02:00
Marko Mäkelä
cb253b8687 MDEV-22387: Static_binary_string::q_append() invokes memcpy on NULL
Invoking memcpy() on a NULL pointer is undefined behaviour
(even if the length is 0) and gives the compiler permission to
assume that the pointer is nonnull. Recent versions of GCC
(starting with version 8) are more aggressively optimizing away
checks for NULL pointers. This undefined behaviour would cause
a SIGSEGV in the test main.func_encrypt on an optimized debug build
on GCC 10.2.0.
2020-10-30 13:07:42 +02:00
Marko Mäkelä
72eea39d4c MDEV-23991 fixup: Initialize the memory
This regression was introduced in
commit afc9d00c66.
This is a partial backport of
commit 199863d72b from 10.4.
2020-10-30 12:58:16 +02:00
Sergei Golubchik
066773e2f0 after-merge fix: update the test to pass in --ps 2020-10-30 11:46:12 +01:00
Marko Mäkelä
fbcd7c0c06 Update Connector/C 2020-10-30 12:22:23 +02:00
Varun Gupta
5a0c34e4c2 MDEV-24033: SIGSEGV in __memcmp_avx2_movbe from queue_insert | SIGSEGV in __memcmp_avx2_movbe from native_compare
The issue here was the system variable max_sort_length was being applied
to decimals and it was truncating the value for decimals to the number
of bytes set by max_sort_length.
This was leading to a buffer overflow as the values were written
to the buffer without truncation and then we moved the offset to
the number of bytes(set by max_sort_length), that are needed for comparison.

The fix is to not apply max_sort_length for fixed size types like INT,
DECIMALS and only apply max_sort_length for CHAR, VARCHARS, TEXT and
BLOBS.
2020-10-30 12:22:01 +02:00
Marko Mäkelä
898521e2dd Merge 10.4 into 10.5 2020-10-30 11:15:30 +02:00
Marko Mäkelä
199863d72b MDEV-23991 fixup: Initialize the memory
Also, revert the work-around for the test that was attempted in
commit 85613a3247.

This issue was caught by MemorySanitizer as well as on the
Microsoft Windows debug builds, thanks to /MD being used
starting with 10.4.

The code fix will also be applied to 10.2 because the regression
was introduced in commit afc9d00c66.
2020-10-30 11:04:16 +02:00
Jan Lindström
5482d62760 Fix sporadic test failure on galera_parallel_apply_3nodes.
Test itself is not deterministic.
2020-10-30 09:19:29 +02:00
Jan Lindström
9936235985 MDEV-23659: Update Galera disabled.def file
Disable galera_var_replicate_myisam until fixed on 10.4
2020-10-30 08:54:05 +02:00
Jan Lindström
5485671474 Remove test that does not apply for 10.4. 2020-10-30 08:52:10 +02:00
Daniel Black
571bcf9aaa deb: logrotate - fix my_print_defaults arg
Corrects: 7803601dcb
2020-10-30 15:09:25 +11:00
Oleksandr Byelkin
a90b15837c MDEV-19838: fix of error messages 2020-10-29 22:20:21 +01:00
Oleksandr Byelkin
f9b0ee07ef MDEV-19838: followup, fix for PS & embedded
Use 9 byte (min length packet)
2020-10-29 22:19:32 +01:00
Monty
eb38e7ef60 MDEV-22879 SIGSEGV (or hang) in free/my_free
This bug was already fixed in a previous commit.
Added test case from the MDEV to prove it's fixed.
2020-10-29 19:20:10 +02:00
Monty
14d43f4fa6 MDEV-23222 SIGSEG in maria_create() because of double free
The crash happens because a double free in the case CREATE TABLE fails
because there is a conflicting tables on disk.

Fixed by ensuring that the double free can't happen.
2020-10-29 18:34:26 +02:00
Monty
4c99e3e948 Fixed bug in detection of getgrouplist parameters.
On my system, OpenSuse, I got a compilation error that some arguments
to getgrouplist() where not initialized
2020-10-29 17:36:49 +02:00
Marko Mäkelä
85613a3247 After-merge fix: main,innodb_ext_key,off
For some reason, in the test main,innodb_ext_key,off
we frequently get unexpected EXPLAIN output, in particular
on Microsoft Windows debug builders. Let us comment out that
EXPLAIN statement for now.
2020-10-29 16:27:04 +02:00
Monty
14798d3cd1 MDEV-23159 Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2'...
The problem was that opt_sum_query() was, as part of MIN/MAX optimization,
doing read operations on constant tables that where already closed

Fixed by ensuring we don't try to read from tables that are closed.
2020-10-29 16:22:30 +02:00
Oleksandr Byelkin
2e5450af05 Merge branch '10.1' into 10.2 2020-10-29 15:16:53 +01:00
Marko Mäkelä
6d3356c12e MDEV-24053 MSAN use-of-uninitialized-value in tpool::simulated_aio::simulated_aio_callback()
Starting with commit ef3f71fa74
MemorySanitizer would complain that we are writing uninitialized
data via the doublewrite buffer.

buf_dblwr_t::add_to_batch(): Zero out any unused part of the
doublewrite buffer, for PAGE_COMPRESSED and ROW_FORMAT=COMPRESSED
tables.

Reviewed by: Eugene Kosov
2020-10-29 15:55:07 +02:00
Vicențiu Ciorbaru
8cfdddac71 MYSQL_JSON: Update test case to omit .so or .dll extension 2020-10-29 15:01:33 +02:00
Vicențiu Ciorbaru
8b2800d076 Fix decimals to 0 for MySQL JSON
This prevents the clash between NOT_FIXED_DEC differing between server
and plugins if MYSQL_SERVER is not defined during plugin compilation.
2020-10-29 15:01:33 +02:00
Vicențiu Ciorbaru
f3c5a92490 Add type_mysql_json.so to debian packages 2020-10-29 15:01:33 +02:00
Vicențiu Ciorbaru
a041b94032 Move vers_type_timestamp within the CC file
It's a virtual method and it can't be inlined anyway. This allows type
plugins (mysql_json in particular) to use Type_handler_blob and / or
subclass it, without needing to explicitly expose the
vers_type_timestamp object.
2020-10-29 15:01:33 +02:00
Vicențiu Ciorbaru
76fabe816f Expose utf8mb4_bin charset for plugins
Cleanup other linker errors
2020-10-29 15:01:33 +02:00
Vicențiu Ciorbaru
17ec6d6ce1 Skip MYSQL_JSON related tests if the plugin is not compiled 2020-10-29 15:01:33 +02:00
Marko Mäkelä
7b2bb67113 Merge 10.3 into 10.4 2020-10-29 13:38:38 +02:00
Aleksey Midenkov
27b762e23d MDEV-22805 SIGSEGV in check_fields on UPDATE
Additional case for PS protocol: UPDATE is converted to multi-update
in mysql_multi_update_prepare().
2020-10-29 13:47:50 +03:00
Sergei Golubchik
9a4398b048 update columnstore 2020-10-29 10:06:32 +01:00
Sergei Golubchik
05bd281697 SPIDER storage engine plugin -> Stable 2020-10-29 10:03:15 +01:00
Sergei Golubchik
17cf27f5b6 remove non-working debug assert
and restore the test modified in the same commit
(the non-replication related deadlock will be reported separately)
2020-10-29 09:35:39 +01:00
Sergei Golubchik
d6302c9a47 MDEV-23702 calculating(auto rounding) issue
Implement a different fix for
"MDEV-19232: Floating point precision / value comparison problem"

Instead of truncating decimal values after every division,
truncate them for comparison purposes.

This reverts commit 62d73df6b2 but keeps the test.
2020-10-29 09:27:56 +01:00
Sergei Golubchik
313cf9de2c update result files after backport
followup for 3e807d255e and eae10a87ff
2020-10-29 09:27:05 +01:00
Oleksandr Byelkin
eae10a87ff Move result files at the correct place. 2020-10-29 08:29:03 +01:00
Marko Mäkelä
7f04686a2a MDEV-24049 InnoDB: Failing assertion: node->is_open() in fil_space_t::flush_low
As part of MDEV-23855, we eliminated fil_system.LRU
and changed the way how InnoDB data files are opened.
We are also enforcing the innodb_open_files limit when new
data files are created.

The function fil_space_t::flush() would be invoked by
row_quiesce_table_start(). If the table was already in clean state,
it is possible that the data file is not open.

fil_space_t::flush_low(): If the data file is not open,
check with a debug assertion that there are no unflushed changes,
and carry on.

Reviewed by: Eugene Kosov and Thirunarayanan Balathandayuthapani
2020-10-29 09:15:35 +02:00
Lawrin Novitsky
4b854d4795 MDEV-19838 Wrong direxec param data caused crash
In case of direct execution(stmtid=-1, mariadb_stmt_execute_direct in C
API) application is in control of how many parameters client sends to
the server. In case this number is not equal to actual query parameters
number, the server may start to interprete packet data incorrectly, e.g.
starting from the size of null bitmap. And that could cause it to crash
at some point. The commit introduces some additional COM_STMT_EXECUTE
packet sanity checks:
- checking that "types sent" byte is set, and the value is equal to 1.
  if it's not direct execution, then that value is 0 or 1.
- checking that parameter type value is a valid type, and parameter
  flags value is 0 or only "unsigned" bit is set
- added more checks that read does not go beyond the end of the packet
2020-10-29 08:04:32 +01:00
Vlad Lesin
6cb88685c4 MDEV-24026: InnoDB: Failing assertion: os_total_large_mem_allocated >= size upon incremental backup
mariabackup deallocated uninitialized
write_filt_ctxt.u.wf_incremental_ctxt in xtrabackup_copy_datafile() when
some table should be skipped due to parsed DDL redo log record.
2020-10-29 07:39:43 +01:00
Oleksandr Byelkin
9e3e4c0e04 new CC 2020-10-29 07:39:43 +01:00
Marko Mäkelä
e33d452b4d Fix bogus -Wmaybe-uninitialized in GCC 10.2.0 -Og
If and only if read_variable_length() returns true, the variable
blob_length will be uninitialized and not used. For some reason,
GCC 10.2.0 -Og debug builds would issue a warning.
2020-10-29 08:16:44 +02:00
Marko Mäkelä
1e778a3b56 MDEV-21201 fixup: GCC 10.2.0 -Wparentheses
An assertion inadvertently contained an assignment and an implicit
comparison to zero. The intention was to test equality.
2020-10-29 08:02:33 +02:00
Marko Mäkelä
dee6902922 After-merge fix: sys_vars.sysvars_innodb,32bit 2020-10-28 18:48:14 +02:00
Vladislav Vaintroub
e451145aa9 MDEV-24040 Named pipe permission issue
Tighten access control - deny FILE_CREATE_PIPE_INSTANCE permission to
everyone except current user (the one that runs mysqld)
2020-10-28 14:24:10 +01:00
Vladislav Vaintroub
cb04c1bc64 MDEV-24040 - fix appveyor build
Old SDK is missing #define SECURITY_MAX_SID_STRING_CHARACTERS
2020-10-28 13:37:49 +01:00