summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying ↵Kentoku SHIBA2020-09-077-539/+1534
| | | | | | | | | | | | to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671
* | | InnoDB, XtraDB: handle EOPNOTSUPP from posix_fallocate()xdavidwu2020-09-042-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some libc (like musl[1]), posix_fallocate() is a fallocate() syscall wrapper, and does not include fallback code like glibc does. In that case, EOPNOTSUPP is returned if underlying filesystem does not support fallocate() with mode = 0. This patch enables falling back to writing zeros when EOPNOTSUPP, fixes some cases like running on filesystem without proper fallocate support on Alpine. [1]: https://git.musl-libc.org/cgit/musl/tree/src/fcntl/posix_fallocate.c?h=v1.2.1
* | | MDEV-23535 SIGSEGV, SIGABRT and SIGILL in typeinfo for ↵Alexander Barkov2020-09-036-3/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item_func_set_collation (on optimized builds) This piece of the code in Item_func_or_sum::agg_item_set_converter: if (!conv && ((*arg)->collation.repertoire == MY_REPERTOIRE_ASCII)) conv= new (thd->mem_root) Item_func_conv_charset(thd, *arg, coll.collation, 1); was wrong because: 1. It could change Item_cache to Item_func_conv_charset (with the old Item_cache in args[0]). Such Item type change is not always supported, e.g. the code in Item_singlerow_subselect::reset() expects only Item_cache, to be able to call Item_cache::set_null(). So it erroneously reinterpreted Item_func_conv_charset to Item_cache and called a non-existing method set_null(), which crashed the server. 2. The 1 in the last parameter to Item_func_conv_charset() was also a problem. In MariaDB versions where the reported query did not crash, it erroneously returned "empty set" instead of one row, because the 1 made subselects execute too earlier and return NULL. Fix: 1. Removing the above two lines from Item_func_or_sum::agg_item_set_converter() 2. Adding the repertoire test inside the constructor of Item_func_conv_charset, so it now detects itself as "safe" in more cases than before. This is needed to avoid new "Illegal mix of collations" after removing the wrong code in various scenarios when character set conversion from pure ASCII happens, including the reported scenario. So now this sequence: Item_cache -> Item_func_concat is replaced to this compatible sequence (the top Item is still Item_cache): new Item_cache -> Item_func_conv_charset -> Item_func_concat Before the fix it was replaced to this incompatible sequence: Item_func_conv_charset -> old Item_cache -> Item_func_concat
* | | MDEV-22387: Do not pass null pointer to some memcpy()Marko Mäkelä2020-09-035-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a null pointer to a nonnull argument is not only undefined behaviour, but it also grants the compiler the permission to optimize away further checks whether the pointer is null. GCC -O2 at least starting with version 8 may do that, potentially causing SIGSEGV. These problems were caught in a WITH_UBSAN=ON build with the Bug#7024 test in main.view.
* | | MDEV-7110 follow-up fix: Do not pass NULL as nonnull parameterMarko Mäkelä2020-09-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a null pointer to the "%s" argument of a printf-like function is undefined behaviour. In the GNU libc implementation of the printf() family of functions, it happens to work. GCC 10.2.0 would diagnose this with -Wformat-overflow -Og. In -fsanitize=undefined (WITH_UBSAN=ON) builds, a runtime error would be generated. In some other builds, GCC 8 or later might infer that the parameter is nonnull and optimize away further checks whether the parameter is null, leading to SIGSEGV.
* | | MDEV-23534: SIGSEGV in sf_malloc_usable_size/my_free on SET GLOBAL ↵Sujatha2020-09-025-14/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REPLICATE_DO_TABLE Backporting fixes for: MDEV-22317: SIGSEGV in my_free/delete_dynamic in optimized builds (ARIA) Backported following commits from: 10.5.3 commit 77e1b0c39771f47bb2602530b8d1e584ac1d3731 -- Post push fix. commit 2e6b21be4a8d0bf094da288cadff866f1bb38062 MDEV-22059: MSAN report at replicate_ignore_table_grant Backported following commits from: 10.5.4 commit 840fb495ce2c0c00b20f2a9ba44b6fcc20c56118
* | | MDEV-23600 Division by 0 in row_search_with_covering_prefixMarko Mäkelä2020-09-0110-683/+439
| | | | | | | | | | | | | | | | | | | | | The InnoDB index fields store bytes, not characters. Remove some unnecessary conversions from characters to bytes. This also fixes MDEV-20422 and the wrong-result bug MDEV-12486.
* | | MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog ↵Andrei Elkin2020-08-319-24/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --verbose (This commit is exclusively for 10.1 branch, do not merge it to upper ones) In case of a pattern of non-STMT_END-marked Rows-log-event (A) followed by a STMT_END marked one (B) mysqlbinlog mixes up the base64 encoded rows events with their pseudo sql representation produced by the verbose option: BINLOG ' base64 encoded data for A ### verbose section for A base64 encoded data for B ### verbose section for B '/*!*/; In effect the produced BINLOG '...' query is not valid and is rejected with the error. Examples of this way malformed BINLOG could have been found in binlog_row_annotate.result that gets corrected with the patch. The issue is fixed with introduction an auxiliary IO_CACHE to hold on the verbose comments until the terminal STMT_END event is found. The new cache is emptied out after two pre-existing ones are done at that time. The correctly produced output now for the above case is as the following: BINLOG ' base64 encoded data for A base64 encoded data for B '/*!*/; ### verbose section for A ### verbose section for B Thanks to Alexey Midenkov for the problem recognition and attempt to tackle, Venkatesh Duggirala who produced a patch for the upstream whose idea is exploited here, as well as to MDEV-23077 reporter LukeXwang who also contributed a piece of a patch aiming at this issue. Extra: mysqlbinlog_row_minimal refined to not produce mutable numeric values into the result file.
* | | MDEV-23596: Assertion `tab->ref.use_count' failed in join_read_key_unlock_rowbb-10.1-varunVarun Gupta2020-08-273-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | The issue here was that the query was using ORDER BY LIMIT optimzation where the access method was changed from EQ_REF access to an index scan (index that would resolve the ORDER BY clause). But the parameter READ_RECORD::unlock_row was not reset to rr_unlock_row, which is used when the access method is not EQ_REF access.
* | | MDEV-23569 temporary tables can overwrite existing filesSergei Golubchik2020-08-254-6/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for internal temporary tables: don't use realpath(), and let them overwrite whatever orphan temp files might've left in the tmpdir (see main.error_simulation test). for user created temporary tables: we have to use realpath(), (see 3a726ab6e2e, remember DATA/INDEX DIRECTORY). don't allow them to overwrite existing files. This bug was reported by RACK911 LABS
* | | Revert "MDEV-21039: Server fails to start with unknown mysqld_safe options"Jan Lindström2020-08-211-16/+4
| | | | | | | | | | | | This reverts commit 5796021174fd7096267003b999e02d6cf98f555b.
* | | MDEV-23491: __bss_start breaks compilation of various platformsOleksandr Byelkin2020-08-183-107/+84
| | | | | | | | | | | | Remove __bss_start & Co, because systen call "write" check buffer address and return EFAULT if it is wrong.
* | | MDEV-21039: Server fails to start with unknown mysqld_safe optionsJulius Goryavsky2020-08-181-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding any unknown option to the "[mysqld_safe]" section makes mysqld impossible to start with mysqld_multi. For example, after adding the unknown option "numa_interleave" to the "[mysqld_safe]" section, mysqld_multi exits with the following diagnostics: [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--numa_interleave' To get rid of this behavior, this patch by default adds the "--loose-" prefix to all unknown (for mysqld_safe) options. This behavior can be enabled explicitly with the --ignore-unknown option and disabled with the --no-ignore-unknown option.
* | | MDEV-23440: mysql_tzinfo_to_sql to use transactionsDaniel Black2020-08-154-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since MDEV-18778, timezone tables get changed to innodb to allow them to be replicated to other galera nodes. Even without galera, timezone tables could be declared innodb. With the standalone innodb tables, the mysql_tzinfo_to_sql takes approximately 27 seconds. With the transactions enabled in this patch, 1.2 seconds is the approximate load time. While explicit checks for the engine of the time zone tables could be done, or checks against !opt_skip_write_binlog, non-transactional storage engines will just ignore the transactional state without even a warning so its safe to enact globally. Leap seconds are pretty much ignored as they are a single insert statement and have gone out of favour as they have caused MariaDB stalls in the past.
* | | MDEV-23463 fil_page_decompress() debug check wastes 128KiB of stackMarko Mäkelä2020-08-132-26/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fil_page_decompress(): Remove a rather useless debug check. We should have test coverage for reading page_compressed pages from files, either due to buffer pool page eviction or due to server restarts. A similar check was removed from fil_space_encrypt() in commit 0b36c27e0c06b798b7322ab07d8464b69a7b716c (MDEV-20307).
* | | MDEV-20672 Inconsistent usage message for innodb_compression_algorithmMarko Mäkelä2020-08-123-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The usage message for the innodb_compression_algorithm system variable did not list snappy, which was added as an optional compression algorithm in MariaDB 10.1.3 and might actually work since commit 90c52e5291b3ad0935df7da56ec0fcbf530733b4 (MDEV-12615) in MariaDB 10.1.24. Unfortunately, we will include also unavailable compression algorithms in the list, because ENUM parameters allow numeric values, and we do not want innodb_compression_algorithm=3 to change meaning depending on the way how the source code was compiled.
* | | MDEV-19526 heap number overflow on innodb_page_size=64kMarko Mäkelä2020-08-1210-122/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB only reserves 13 bits for the heap number in the record header, limiting the heap number to be at most 8191. But, when using innodb_page_size=64k and secondary index records of 7 bytes each, it is possible to exceed the maximum heap number. btr_cur_optimistic_insert(): Let the operation fail if the maximum number of records would be exceeded. page_mem_alloc_heap(): Move to the same compilation unit with the only caller, and let the operation fail if the maximum heap number has been allocated already.
* | | MDEV-21526: mysqld_multi no longer works with different server binariesJulius Goryavsky2020-08-114-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is caused by the fact that adding the --defaults-group-suffix option to fix MDEV-18863 causes mysqld to read all options from the appropriate sections of the config file, including options specific to mysqld_multi. Reading unknown options (which are not supported by mysqld) causes mysqld to terminate with an error. However, the MDEV-18863 problem has been completely fixed by passing options on the command line, and now there is no need to specify the --defaults-group-suffix option (we just need to give priority to options passed through the command line, so as not to break MDEV-18863).
* | | Fixing sporading builtbot test failures happening at '00:00:00' sharpAlexander Barkov2020-08-114-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | Some tests relied on the fact that DATETIME->DATE conversion always produce a truncation (with a warning). This is not the case when the SQL statement is executed at current time '00:00:00' sharp. Adding a new SET TIMESTAMP statements to make sure time is not '00:00:00'.
* | | MDEV-16115 Hang after reducing innodb_encryption_threadsMarko Mäkelä2020-08-106-374/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test encryption.create_or_replace would occasionally fail, because some fil_space_t::n_pending_ops would never be decremented. fil_crypt_find_space_to_rotate(): If rotate_thread_t::should_shutdown() holds due to innodb_encryption_threads having been reduced, do release the reference. fil_space_remove_from_keyrotation(), fil_space_next(): Declare the functions static, simplify a little, and define in the same compilation unit with the only caller, fil_crypt_find_space_to_rotate(). fil_crypt_key_mutex: Remove (unused).
* | | bump the VERSIONDaniel Bartholomew2020-08-101-1/+1
| | |
* | | Merge remote-tracking branch 'bb-10.1-release' into 10.1Oleksandr Byelkin2020-08-101-1/+1
|\ \ \ | |/ /
| * | link failure on fulltest (xenial)mariadb-10.1.46Sergei Golubchik2020-08-061-1/+1
| | | | | | | | | | | | | | | | | | depending on build config the error might be hidded, in particular liblz4.so and libjemalloc.so make it to disappear, but with -DWITH_INNODB_LZ4=NO -DWITH_JEMALLOC=NO it reappears.
* | | MDEV-23386: mtr: main.mysqld--help autosized table{-open,}-cach and ↵Daniel Black2020-08-105-31/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | max-connections Example of the failure: http://buildbot.askmonty.org/buildbot/builders/bld-p9-rhel7/builds/4417/steps/mtr/logs/stdio ``` main.mysqld--help 'unix' w17 [ fail ] Test ended at 2020-06-20 18:51:45 CURRENT_TEST: main.mysqld--help --- /opt/buildbot-slave/bld-p9-rhel7/build/mysql-test/main/mysqld--help.result 2020-06-20 16:06:49.903604179 +0300 +++ /opt/buildbot-slave/bld-p9-rhel7/build/mysql-test/main/mysqld--help.reject 2020-06-20 18:51:44.886766820 +0300 @@ -1797,10 +1797,10 @@ sync-relay-log-info 10000 sysdate-is-now FALSE system-versioning-alter-history ERROR -table-cache 421 +table-cache 2000 table-definition-cache 400 -table-open-cache 421 -table-open-cache-instances 1 +table-open-cache 2000 +table-open-cache-instances 8 tc-heuristic-recover OFF tcp-keepalive-interval 0 tcp-keepalive-probes 0 mysqltest: Result length mismatch ``` mtr: table_open_cache_basic autosized: Lets assume that >400 are available and that we can set the result back to the start value. All of these system variables are autosized and can generate MTR output differences. Closes #1527
* | | Better comment about TABLE::maybe_nullSergei Petrunia2020-08-061-3/+10
| | |
* | | MDEV-9513: Assertion `join->group_list || !join->is_in_subquery()' failed in ↵Varun Gupta2020-08-064-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | create_sort_index Removing the ORDER BY clause from the UNION when UNION is inside an IN/ALL/ANY/EXISTS subquery. The rewrites are done for subqueries but this rewrite is not done for the fake_select of the UNION.
* | | MDEV-23105 Cast number string with many leading zeros to decimal gives ↵Alexander Barkov2020-08-053-0/+84
|/ / | | | | | | | | | | unexpected result Skip leading zeros when converting a string to decimal_t.
* | Merge branch 'merge/merge-tokudb-5.6' into 10.1Sergei Golubchik2020-08-0542-100/+95
|\ \
| * | 5.6.49-89.0Sergei Golubchik2020-08-0447-148/+125
| | |
* | | MDEV-23089 rpl_parallel2 fails in 10.5Sachin2020-08-043-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem:- rpl_parallel2 was failing non-deterministically Analysis:- When FLUSH TABLES WITH READ LOCK is executed, it will allow all worker threads to complete their ongoing transactions and then it will pause them. At this state FTWRL will proceed to acquire global read lock. FTWRL first blocks threads from starting new commits, then upgrades the lock to block commit of existing transactions. Step1: FLUSH TABLES WITH READ LOCK - Blocks new commits Step2: * STOP SLAVE command enables 'force_abort=1' which unblocks workers, they continue to execute events. * T1: Waits in 'record_gtid' call to update 'gtid_slave_pos' table with its current GTID, but it is blocked becuase of Step1. * T2: Holds COMMIT lock and waits for T1 to commit. Step3: FLUSH TABLES WITH READ LOCK - Waiting to get BLOCK_COMMIT. This results in deadlock. When STOP SLAVE command allows paused workers to proceed, workers should skip the execution of all further events, similar to 'conservative' parallel mode. Solution:- We will assign 1 to skip_event_group when we are aborted in do_ftwrl_wait. rpl_parallel_entry->pause_sub_id is only reset when force_abort is off in rpl_pause_after_ftwrl.
* | | Fix the typo in fix for MDEV-21472Sergei Petrunia2020-08-031-1/+1
| | |
* | | compilation error on bintar-centos6-amd64-debugSergei Golubchik2020-08-031-2/+1
| | | | | | | | | | | | /home/buildbot/buildbot/build/storage/xtradb/mtr/mtr0mtr.cc:97:37: error: invalid access to non-static data member ‘fil_space_t::latch’ of NULL object [-Werror=invalid-offsetof]
* | | MDEV-23375 parts.partition_debug fails when it's run after another testElena Stepanova2020-08-032-0/+5
| | | | | | | | | | | | Make sure system tables aren't open, as the test kills the server
* | | List of unstable tests for 10.1.46 releaseElena Stepanova2020-08-021-120/+132
| | |
* | | improve the error message for a dropped current roleSergei Golubchik2020-07-303-5/+7
| | |
* | | MDEV-22521 Server crashes in traverse_role_graph_up or Assertion `user' ↵Sergei Golubchik2020-07-303-0/+16
| | | | | | | | | | | | fails in traverse_role_graph_impl
* | | XtraDB 5.6.49-89.0Marko Mäkelä2020-07-303-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The only change between Percona XtraDB Server 5.6.48-88.0 and 5.6.49-89.0 (apart from the version number change) was percona/percona-server@25ec24092064c2ab95752705e592e0c038ec1111 which we had already addressed in commit 7c03edf2fe66855a8ce8f2575c3aaf66af975377 and commit c0fca2863bcbd7cd231f1aa747b4f8d999e3a00e.
* | | MDEV-21472: ALTER TABLE ... ANALYZE PARTITION ... with EITS reads and locks ↵Sergei Petrunia2020-07-294-4/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | all rows Do not collect EITS statistics for this statement: ALTER TABLE t ANALYZE PARTITION p EITS stats are currently global, not per-partition. Collecting global stats when we are asked to process just one partition causes issues for DBAs.
* | | MDEV-23010 UPDATE privilege at Database and Table level fail to update with ↵Sergei Golubchik2020-07-293-3/+39
| | | | | | | | | | | | | | | | | | | | | SELECT command denied to user check both column- and table-level grants when looking for SELECT privilege on UPDATE statement.
* | | cleanup: reduce code duplicationSergei Golubchik2020-07-293-45/+21
| | |
* | | Bug #25207522: INCORRECT ORDER-BY BEHAVIOR ON A PARTITIONED TABLE WITH A ↵Sergei Golubchik2020-07-295-24/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | COMPOSITE PREFIX INDEX Fix prefix key comparison in partitioning. Comparions must take into account no more than prefix_len characters. It used to compare prefix_len*mbmaxlen bytes.
* | | bugfix: mysql_create_view() infinite loopSergei Golubchik2020-07-291-2/+3
| | | | | | | | | | | | | | | | | | if mysql_create_view() is aborted when view is linked into lex (when WSREP_TO_ISOLATION_BEGIN fails), it should not be linked there again on err:.
* | | MDEV-18496 Crash when Aria encryption is enabled but plugin not availableSergei Golubchik2020-07-293-0/+8
| | | | | | | | | | | | fix uninitialized struct member
* | | MDEV-18496 Crash when Aria encryption is enabled but plugin not availableSergei Golubchik2020-07-294-2/+24
| | | | | | | | | | | | wait_while_table_is_used() should return an error if handler::extra() fails
* | | MDEV-15961: Fix stacktraces under FreeBSD (aarch64)Karthik Kamath2020-07-284-18/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Largely based on MySQL commit https://github.com/mysql/mysql-server/commit/75271e51d60bce8683423b208cbb43b11ca6060e MySQL Ref: BUG#24566529: BACKPORT BUG#23575445 TO 5.6 (cut) Also, the PTR_SANE macro which tries to check if a pointer is invalid (used when printing pointer values in stack traces) gave false negatives on OSX/FreeBSD. On these platforms we now simply check if the pointer is non-null. This also removes a sbrk() deprecation warning when building on OS X. (It was before only disabled with building using XCode). Removed execinfo path of MySQL patch that was already included. sbrk doesn't exist on FreeBSD aarch64. Removed HAVE_BSS_START based detection and replaced with __linux__ as it doesn't exist on OSX, Solaris or Windows. __bss_start exists on mutiple Linux architectures. Tested on FreeBSD and Linux x86_64. Being in FreeBSD ports for 2 years implies a good testing there on all FreeBSD architectures there too. MySQL-8.0.21 code is functionally identical to original commit.
* | | MDEV-17076: mtr int options aren't negativeDaniel Black2020-07-281-0/+11
| | |
* | | MDEV-17076: mtr max-{core,datadir} 0 means 0Daniel Black2020-07-281-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was no ability to set the mtr arguments of: * --max-save-core; and * --max-save-datadir to 0. This is desireable in an automatied scenario where space is limited hence targeting 10.1 branch. We take away the 0 means unlimited aspect for these, however, perl can handle some big numbers so they may as well be close enough to unlimited for all meaningful purposes.
* | | MDEV-17076: increment only if saving occursTeodor Mircea Ionita2020-07-281-1/+1
| | |
* | | MDEV-23088: Change LimitNOFILE default from 16364 to 16384Daniel Black2020-07-282-2/+2
| | | | | | | | | | | | | | | | | | | | | Correct to a true 2^14 rather than some different number that was actually just a number typo. Bug report thanks to Hartmut Holzgraefe.
* | | MDEV-23282 FLOAT(53,0) badly handles out-of-range valuesAlexander Barkov2020-07-274-4/+44
| | | | | | | | | | | | | | | truncate_double() did not take into account the max_value limit in case when dec<NOT_FIXED_DEC.