summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | Add testcases for MDEV-20557, MDEV-21649Sergei Petrunia2020-07-252-0/+121
| |
* | MDEV-23221: A subquery causes crashSergei Petrunia2020-07-245-4/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix the crash: IN-to-EXISTS rewrite causes an error (and so JOIN::optimize() fails with an error, too), don't call update_used_tables(). Terminate the query execution instead. * Fix the cause of the error in the IN-to-EXISTS rewrite: don't do the rewrite if doing it will cause an error of this kind: This version of MariaDB doesn't yet support 'SUBQUERY in ROW in left expression of IN/ALL/ANY' * Fix another issue exposed by this testcase: JOIN::setup_subquery_caches() may be invoked before any select has saved its query plan, and will crash because none of the SELECTs has called create_explain_query_if_not_exists() to create the Explain Data Structure for this SELECT. TODO: When merging this to 10.2, remove the poorly-placed call to create_explain_query_if_not_exists made by fix for M_D_E_V-16153
* | mysql_install_db: help lists --defaults-file twiceDaniel Black2020-07-241-2/+1
| | | | | | | | | | | | | | Removed duplicate. Also move the --no-defaults option close to the other "default*" options.
* | MDEV-23272 Galera stack-use-after-scope error with ASAN buildTeemu Ollakka2020-07-242-18/+0
| | | | | | | | | | | | | | | | THD proc info was assigned from stack allocated temporary buffer which went out of scope immediately after assignment. Fixed by removing the use of temp buffer and assign proc info from string literal.
* | MDEV-15207: mysql_upgrade cannot create file mysql_upgrade_infoIan Gilfillan2020-07-231-1/+3
| |
* | MDEV-22903 heap-use-after-free while accessing fts cache deleted doc idsThirunarayanan Balathandayuthapani2020-07-232-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= fts_cache_append_deleted_doc_ids() holds the deleted_lock and tries to access size of deleted_doc_ids. In the meantime, fts_cache_clear() clears the sync_heap before clearing deleted_doc_ids. It leads to invalid access of deleted_doc_ids. Fix: === fts_cache_clear() should free the sync_heap after clearing deleted_doc_ids.
* | MDEV-23268 SIGSEGV on srv_monitor_event if InnoDB is read-onlyMarko Mäkelä2020-07-238-18/+26
| | | | | | | | | | | | The srv_monitor_event and the srv_monitor_thread would not be created when InnoDB is in read-only mode. Yet, some code would unconditionally invoke os_event_set(srv_monitor_event).
* | Code comment spellfixesIan Gilfillan2020-07-2241-214/+214
| |
* | MDEV-19232: Floating point precision / value comparison problemVarun Gupta2020-07-2211-30/+68
| | | | | | | | | | | | | | | | | | | | | | | | The issue occurs when the subquery_cache is enabled. When there is a cache miss the division was leading to a value with scale 9. In the case of cache hit the value returned was of scale 9 and due to the different values for the scales the where condition evaluated to FALSE, hence the output was incomplete. To fix this problem we need to round up the decimal to the limit mentioned in Item::decimals. This would make sure the values are compared with the same scale.
* | MDEV-23190 InnoDB data file extension is not crash-safeMarko Mäkelä2020-07-2024-197/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When InnoDB is extending a data file, it is updating the FSP_SIZE field in the first page of the data file. In commit 8451e09073e8b1a300f177d74a9e3a530776640a (MDEV-11556) we removed a work-around for this bug and made recovery stricter, by making it track changes to FSP_SIZE via redo log records, and extend the data files before any changes are being applied to them. It turns out that the function fsp_fill_free_list() is not crash-safe with respect to this when it is initializing the change buffer bitmap page (page 1, or generally, N*innodb_page_size+1). It uses a separate mini-transaction that is committed (and will be written to the redo log file) before the mini-transaction that actually extended the data file. Hence, recovery can observe a reference to a page that is beyond the current end of the data file. fsp_fill_free_list(): Initialize the change buffer bitmap page in the same mini-transaction. The rest of the changes are fixing a bug that the use of the separate mini-transaction was attempting to work around. Namely, we must ensure that no other thread will access the change buffer bitmap page before our mini-transaction has been committed and all page latches have been released. That is, for read-ahead as well as neighbour flushing, we must avoid accessing pages that might not yet be durably part of the tablespace. fil_space_t::committed_size: The size of the tablespace as persisted by mtr_commit(). fil_space_t::max_page_number_for_io(): Limit the highest page number for I/O batches to committed_size. MTR_MEMO_SPACE_X_LOCK: Replaces MTR_MEMO_X_LOCK for fil_space_t::latch. mtr_x_space_lock(): Replaces mtr_x_lock() for fil_space_t::latch. mtr_memo_slot_release_func(): When releasing MTR_MEMO_SPACE_X_LOCK, copy space->size to space->committed_size. In this way, read-ahead or flushing will never be invoked on pages that do not yet exist according to FSP_SIZE.
* | Cleanup: Remove fil_check_adress_in_tablespace()Marko Mäkelä2020-07-206-70/+24
| |
* | Cleanup: Remove unused AbstractCallback::m_free_limitMarko Mäkelä2020-07-202-18/+0
| |
* | Making the stat_tables_innodb test deterministicVarun Gupta2020-07-182-21/+15
| |
* | MDEV-20401: revert unnecessary changeJulius Goryavsky2020-07-161-1/+1
| |
* | MDEV-20401: Server incorrectly auto-sets lower_case_file_system valueJulius Goryavsky2020-07-162-4/+6
| | | | | | | | | | | | | | | | Server auto-sets lower_case_file_system value based on default datadir's behavior instead of instead of using the directory specified by the user through the configuration file or command line options. This patch fixes this problem.
* | check_linker_flag: use for linker flagsDaniel Black2020-07-152-1/+29
| | | | | | | | | | | | | | | | -Wl,-z,relro,-z,now are linker flags and should be checked as such. TODO: perform module, exe shared checks separately rather than a pure linker check.
* | MDEV-22851: Engine independent index statistics are incorrect for large ↵Varun Gupta2020-07-154-15/+67
| | | | | | | | | | | | | | | | | | tables on Windows An oveflow was happening on windows because on Windows sizeof(ulong) is 4 bytes while it is 8 bytes on Linux. Switched avg_frequency and avg length for column statistics to ulonglong. Switched avg_frequency for index statistics to ulonglong.
* | XtraDB 5.6.48-88.0Marko Mäkelä2020-07-143-4/+4
| | | | | | | | | | | | The only InnoDB changes between Percona XtraDB Server 5.6.47-87.0 and 5.6.48-88.0 are related to InnoDB changes between MySQL 5.6.47 and MySQL 5.6.48, which we had already applied.
* | Update the InnoDB version number to 5.6.49Marko Mäkelä2020-07-144-4/+4
| | | | | | | | There were no InnoDB changes between MySQL 5.6.48 and MySQL 5.6.49.
* | MDEV-23161 avg_count_reset may wrongly be NULL in I_S.INNODB_METRICSMarko Mäkelä2020-07-142-26/+28
| | | | | | | | | | | | | | | | | | | | | | | | This issue was originally reported by Fungo Wang, along with a fix, as MySQL Bug #98990. His suggested fix was applied as part of mysql/mysql-server@a003fc373d1adb3ccea353b5d7d83f6c4c552383 and released in MySQL 5.7.31. i_s_metrics_fill(): Add the missing call to Field::set_notnull(), and simplify some code.
* | MDEV-22765 i_s_fts_index_cache_fill_one_index() is not protect by the lockThirunarayanan Balathandayuthapani2020-07-142-0/+6
| | | | | | | | | | - i_s_fts_index_cache_fill() should take shared lock of fts cache before accessing index cache to avoid reading stale data.
* | MDEV-15662 mariabackup.huge_lsn fails sporadically with "log sequence ↵Thirunarayanan Balathandayuthapani2020-07-142-0/+12
| | | | | | | | | | | | | | | | | | number is in the future" - Problem is that test case creates iblogfile* files. So existing ibdata pages could point to future LSN. Fix is that taking the backup of data before iblogfile* creation and apply it before exiting the test case.
* | MDEV-22890 DEADLOCK of threads detected: row0sel.cc S-LOCK / btr0cur.cc ↵Thirunarayanan Balathandayuthapani2020-07-142-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | S-LOCK / row0quiesce.cc X-LOCK Problem: ======= - Read operations are always allowed to hold a secondary index leaf latch and then look up the corresponding clustered index record. Flush table operation acquires secondary index latch while holding a clustered index latch. It leads to deadlock violation. Fix: ==== - Flush table operation should acquire secondary index before taking clustered index to avoid deadlock violation with select operation.
* | MDEV-23027 symlink_wsrep_sst_rsync target built when WITH_WSREP is offVicențiu Ciorbaru2020-07-131-29/+30
| | | | | | | | Only install wsrep scripts and links if WSREP_ON is actually set
* | MDEV-23114 AUTH_PAM plugin can not be disabled when using mysql_release configVicențiu Ciorbaru2020-07-071-1/+1
| | | | | | | | | | When setting the PLUGIN_AUTH_PAM variable, mark it as a "CACHE" variable so it can be overridden by the user.
* | MDEV-22654: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'Rucha Deodhar2020-07-063-1/+42
| | | | | | | | | | | | | | | | | | failed in Diagnostics_area::set_ok_status on FUNCTION replace When there is REPLACE in the statement, sp_drop_routine_internal() returns 0 (SP_OK) on success which is then assigned to ret. So ret becomes false and the error state is lost. The expression inside DBUG_ASSERT() evaluates to false and thus the assertion failure.