summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying ↵bb-10.3-MDEV-7098Kentoku SHIBA2020-09-078-543/+1622
| | | | to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671
* Merge 10.2 into 10.3Marko Mäkelä2020-09-042-3/+5
|\
| * MDEV-23600 follow-up: uninitialized rec_field_is_prefixMarko Mäkelä2020-09-041-3/+2
| | | | | | | | | | | | | | | | build_template_field(): Initialize templ->rec_field_is_prefix also for indexes on virtual columns. This was caught on 10.5 by MemorySanitizer as use-of-uninitialized-value in row_search_with_covering_prefix() when running the test main.fast_prefix_index_fetch_innodb.
| * Fix a typo in the previous csetSergei Petrunia2020-09-041-1/+1
| |
| * MDEV-23661: RocksDB produces "missing initializer for member" warningsSergei Petrunia2020-09-031-0/+3
| | | | | | | | Add -Wno-missing-field-initializers for MyRocks and gcc version below 5.0
* | MDEV-23651: Fix the Windows buildMarko Mäkelä2020-09-041-8/+8
| | | | | | | | In the Microsoft environment, my_atomic requires int32.
* | MDEV-23651 InnoDB: Failing assertion: !space->referenced()Marko Mäkelä2020-09-035-118/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit de942c9f618b590a01a7960c171d7e50e435708f (MDEV-15983) introduced a race condition that we inadequately fixed in commit 93b69825adf5e55601ba44b4c89ec36ce62f8112 (MDEV-16169). Because fil_space_t::release() or fil_space_t::acquire() are not protected by fil_system.mutex like their predecessors, it is possible that stop_new_ops was set between the time a thread checked fil_space_t::is_stopping() and invoked fil_space_t::acquire(). In an execution trace, this happened in fil_system_t::keyrotate_next(), causing an assertion failure in fil_delete_tablespace() in the other thread that seeked to stop new operations. We fix this bug by merging the flag fil_space_t::stop_new_ops and the reference count fil_space_t::n_pending_ops into a single word that is only being accessed by atomic memory operations. fil_space_t::set_stopping(): Accessor for changing the state of the former stop_new_ops flag. fil_space_t::acquire(): Return whether the acquisition succeeded. It would fail between set_stopping(true) and set_stopping(false).
* | MDEV-21578 : CREATE OR REPLACE TRIGGER in Galera cluster not replicatingJan Lindström2020-09-031-3/+6
| | | | | | | | In 10.3 OR REPLACE trigger option is part of create_info.
* | Merge 10.2 into 10.3Marko Mäkelä2020-09-0367-1092/+1442
|\ \ | |/
| * Merge 10.1 into 10.2Marko Mäkelä2020-09-0311-23/+64
| |\
| | * 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
| * | Increase mariabackup SST initial timeout to avoid timeouts.Jan Lindström2020-09-021-3/+4
| | |
| * | MDEV-23470 InnoDB: Failing assertion: cmp < 0 in ↵Thirunarayanan Balathandayuthapani2020-09-023-9/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | row_ins_check_foreign_constraint During insertion of clustered index, InnoDB does the check for foreign key constraints. Problem is that it uses the clustered index entry to search indexes of referenced tables and it could lead to unexpected result when there is no foreign index. Solution: ======== Rebuild the tuple based on foreign column names before searching it on reference index when there is no foreign index.
| * | innodb: osx build failure fixDaniel Black2020-09-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build failure was: storage/innobase/os/os0proc.cc:144:3: error: use of undeclared identifier 'MEM_UNDEFINED' MEM_UNDEFINED(ptr, size); Assumed to be introduced in MDEV-20377 commit: c36834c8324974f26770d64192898f4f45d9f772
| * | Merge 10.1 into 10.2Marko Mäkelä2020-09-0117-686/+547
| |\ \ | | |/ | | | | | | This also fixes MDEV-20464.
| | * 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
| * | Cleanup: Avoid repeated calls to dict_col_t::is_virtual()Marko Mäkelä2020-09-012-23/+16
| | |
| * | Fix GCC 10.2.0 -Og -Wmaybe-uninitializedMarko Mäkelä2020-09-011-7/+9
| | |
| * | MDEV-20618 Assertion failed in row_upd_sec_index_entryNikita Malyavin2020-09-0111-59/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a proper error handling of innobase_get_computed_value results in row_upd_store_row/row_upd_store_v_row. Also add an assertion in row_vers_build_clust_v_col to fail during row purge. Add one more assertion in row_sel_sec_rec_is_for_clust_rec for possible future catches.
| * | MDEV-18366 Crash on SELECT on a table with indexed virtual columnsNikita Malyavin2020-09-0110-175/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was in improper error handling behavior in `row_upd_build_difference_binary`: `innobase_free_row_for_vcol` wasn't called. To eliminate this problem in all potential places, a refactoring has been made: * class ib_vcol_row is added. It owns VCOL_STORAGE and heap and maintains it in RAII manner * all innobase_allocate_row_for_vcol/innobase_free_row_for_vcol pairs are substituted with ib_vcol_row usage * row_merge_buf_add is only left untouched because it doesn't own vheap passed as an argument * innobase_allocate_row_for_vcol does not allocate VCOL_STORAGE anymore and accepts it as an argument -- this reduces a number of memory allocations * move rec_printer out of `#ifndef DBUG_OFF` and mark it cold
| * | MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog ↵Andrei Elkin2020-08-319-49/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --verbose (This commit is exclusively for 10.2 branch. Do not merge it to 10.3) 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, and to 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.
| * | fix clang buildEugene Kosov2020-08-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FAILED: sql/CMakeFiles/sql.dir/sql_test.cc.o /home/kevgs/bin/clang++ -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DHAVE_POOL_OF_THREADS -DMYSQL_SERVER -D_FILE_OFFSET_BITS=64 -Iinclude -I../include -I../sql -Ipcre -I../pcre -I../zlib -Izlib -I../extra/yassl/include -I../extra/yassl/taocrypt/include -Isql -I../wsrep -O2 -fdiagnostics-color=always -fno-omit-frame-pointer -gsplit-dwarf -march=native -mtune=native -fPIC -fno-rtti -g -DENABLED_DEBUG_SYNC -ggdb3 -DSAFE_MUTEX -Wall -Wdeclaration-after-statement -Wextra -Wformat-security -Wno-init-self -Wno-null-conversion -Wno-unused-parameter -Wno-unused-private-field -Woverloaded-virtual -Wvla -Wwrite-strings -Werror -DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED -MD -MT sql/CMakeFiles/sql.dir/sql_test.cc.o -MF sql/CMakeFiles/sql.dir/sql_test.cc.o.d -o sql/CMakeFiles/sql.dir/sql_test.cc.o -c ../sql/sql_test.cc ../sql/sql_test.cc:390:20: error: '::' and '*' tokens forming pointer to member type are separated by whitespace [-Werror,-Wcompound-token-split-by-space] Item* (List<Item>:: *dbug_list_item_elem_ptr)(int)= &List<Item>::elem; ~~^~ ../sql/sql_test.cc:391:32: error: '::' and '*' tokens forming pointer to member type are separated by whitespace [-Werror,-Wcompound-token-split-by-space] Item_equal* (List<Item_equal>:: *dbug_list_item_equal_elem_ptr)(int)= ~~^~ ../sql/sql_test.cc:393:32: error: '::' and '*' tokens forming pointer to member type are separated by whitespace [-Werror,-Wcompound-token-split-by-space] TABLE_LIST* (List<TABLE_LIST>:: *dbug_list_table_list_elem_ptr)(int) = ~~^~ 3 errors generated.
| * | MDEV-21578 : CREATE OR REPLACE TRIGGER in Galera cluster not replicatingJan Lindström2020-08-283-1/+74
| | | | | | | | | | | | | | | While doing TOI buffer OR REPLACE option was not added to replicated string.
| * | MDEV-23557 Galera heap-buffer-overflow in wsrep_rec_get_foreign_keybb-10.2-MDEV-23557sjaakola2020-08-285-17/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains a fix and extended test case for a ASAN failure reported during galera.fk mtr testing. The reported heap buffer overflow happens in test case where a cascading foreign key constraint is defined for a column of varchar type, and galera.fk.test has such vulnerable test scenario. Troubleshoting revealed that erlier fix for MDEV-19660 has made a fix for cascading delete handling to append wsrep keys from pcur->old_rec, in row_ins_foreign_check_on_constraint(). And, the ASAN failuer comes from later scanning of this old_rec reference. The fix in this commit, moves the call for wsrep_append_foreign_key() to happen somewhat earlier, and inside ongoing mtr, and using clust_rec which is set earlier in the same mtr for both update and delete cascade operations. for wsrep key populating, it does not matter when the keys are populated, all keys just have to be appended before wsrep transaction replicates. Note that I also tried similar fix for earlier wsrep key append, but using the old implementation with pcur->old_rec (instead of clust_rec), and same ASAN failure was reported. So it appears that pcur->old_rec is not properly set, to be used for wsrep key appending. galera.galera_fk_cascade_delete test has been extended by two new test scenarios: * FK cascade on varchar column. This test case reproduces same scenario as galera.fk, and this test scenario will also trigger ASAN failure with non fixed MariaDB versions. * multi-master conflict with FK cascading. this scenario causes a conflict between a replicated FK cascading transaction and local transaction trying to modify the cascaded child table row. Local transaction should be aborted and get deadlock error. This test scenario is passing both with old MariaDB version and with this commit as well.
| * | Update galera and galera_3nodes disabled.def file after fixes.Jan Lindström2020-08-282-6/+1
| | |
| * | Update galera_3nodes suite global ignore list.Jan Lindström2020-08-271-3/+26
| | |
| * | MDEV-23587 : galera_3nodes.galera_var_dirty_reads2 MTR failed: 1047: WSREP ↵Jan Lindström2020-08-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | has not yet prepared node for application use Add wait_condition to make sure insert has been replicated and after cluster restore wait until node is ready before continuing.
| * | MDEV-23580 : galera_3nodes.galera_ipv6_rsync_section MTR failed: WSREP_SST: ↵Jan Lindström2020-08-271-0/+1
| | | | | | | | | | | | | | | | | | [ERROR] rsync daemon port '16008' has been taken Add force_restart to free rsync daemon port.
| * | MDEV-23581 : galera_3nodes.galera_ipv6_rsync MTR failed: WSREP_SST: [ERROR] ↵Jan Lindström2020-08-271-0/+1
| | | | | | | | | | | | | | | | | | rsync daemon port '16008' has been taken Add force_restart to free rsync daemon port.
| * | MDEV-23576 : galera_3nodes.galera_ipv6_mysqldump MTR failed: WSREP_SST: ↵Jan Lindström2020-08-271-0/+1
| | | | | | | | | | | | | | | | | | [ERROR] rsync daemon port '16008' has been taken Add force_restart to clean up rsync daemon port.
| * | MDEV-23574 : galera_3nodes.galera_ipv6_mariabackup_section MTR failed: Could ↵Jan Lindström2020-08-272-1/+7
| | | | | | | | | | | | | | | | | | not open '../galera/include/have_mariabackup.inc' Fix the include and add force_restart to stabilize.
| * | MDEV-23573 : galera_3nodes.galera_ipv6_mariabackup MTR failed: Could not ↵Jan Lindström2020-08-271-1/+2
| | | | | | | | | | | | | | | | | | open '../galera/include/have_mariabackup.inc Fix the include and add force_restart to stabilize.
| * | Remove xtrabackup and innobackupex test cases.Jan Lindström2020-08-277-211/+0
| | |
* | | travis: update osx to xcode12u in attempt to solve openssl build failureDaniel Black2020-09-021-1/+1
| | |
* | | travis: osx build time out storing cache. Ensure not CellarDaniel Black2020-09-021-2/+0
| | |
* | | MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog ↵Andrei Elkin2020-08-3110-51/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --verbose (This commit is for 10.3 and upper branches) 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, and to 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.
* | | Merge 10.2 into 10.3Marko Mäkelä2020-08-2615-133/+129
|\ \ \ | |/ /
| * | MDEV-23583 Fix up community suite/galera_3nodes/disabled.defStepan Patryshev2020-08-261-0/+19
| | |
| * | MDEV-23547 InnoDB: Failing assertion: *len in row_upd_ext_fetchMarko Mäkelä2020-08-253-85/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug was originally repeated on 10.4 after defining a UNIQUE KEY on a TEXT column, which is implemented by MDEV-371 by creating the index on a hidden virtual column. While row_vers_vc_matches_cluster() is executing in a purge thread to find out if an index entry may be removed in a secondary index that comprises a virtual column, another purge thread may process the undo log record that this check is interested in, and write a null BLOB pointer in that record. This would trip the assertion. To prevent this from occurring, we must propagate the 'missing BLOB' error up the call stack. row_upd_ext_fetch(): Return NULL when the error occurs. row_upd_index_replace_new_col_val(): Return whether the previous version was built successfully. row_upd_index_replace_new_col_vals_index_pos(): Check the error result. Yes, we would intentionally crash on this error if it occurs outside the purge thread. row_upd_index_replace_new_col_vals(): Check for the error condition, and simplify the logic. trx_undo_prev_version_build(): Check for the error condition.
| * | MDEV-22543: Remove orphan declaration of wsrep_is_sst_progressMarko Mäkelä2020-08-251-2/+0
| | |
| * | MDEV-23483: Set Galera SST thd as system threadJan Lindström2020-08-255-42/+27
| | | | | | | | | | | | | | | Revert change to MDL and set SST donor thread as a system thread. Joiner thread was already a system thread.
| * | MDEV-23554 Wrong default value for foreign_key_checks variableAleksey Midenkov2020-08-255-6/+7
| | | | | | | | | | | | Sys_var_bit::session_save_default() ignored reverse_semantics property.
| * | InnoDB: fix debug assertionEugene Kosov2020-08-241-1/+1
| | |
* | | MDEV-18335: Assertion `!error || error == 137' failed in ↵Varun Gupta2020-08-263-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subselect_rowid_merge_engine::init When duplicates are removed from a table using a hash, if the record is a duplicate it is marked as deleted. The handler API check if the record is deleted and send an error flag HA_ERR_RECORD_DELETED. When we scan over the table if the thread is not killed then we skip the records marked as HA_ERR_RECORD_DELETED. The issue here is when a query is aborted by a user (this is happening when the LIMIT for ROWS EXAMINED is exceeded), the scan over the table does not skip the records for which HA_ERR_RECORD_DELETED is sent. It just returns an error flag HA_ERR_ABORTED_BY_USER. This error flag is not checked at the upper level and hence we hit the assert. If the query is aborted by the user we should just skip reading rows and return control to the upper levels of execution.
* | | part_records() signature fixAleksey Midenkov2020-08-251-2/+1
| | |