summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-24274 ALTER TABLE with CHECK CONSTRAINTS gives "Out of Memory" errorSergei Golubchik2021-02-074-32/+34
| | | | | | | | | | | partially revert 76063c2a13. Item::clone() is not an all-purpose Item copying machine, it was specifically created for pushdown of predicates into derived tables and views and it does not copy everything. In particular, it does not copy Item_func_regex. Fix the bug differently by preserving the old constraint name. But keep setting automatic_name=true to have it regenerated for cases like ALTER TABLE ... ADD CONSTRAINT.
* Update galera.disabled.def filebb-10.4-MDEV-24704Jan Lindström2021-01-271-0/+4
|
* MDEV-24522 Assertion `inited==NONE' fails upon UPDATE on versioned table ↵Aleksey Midenkov2021-01-264-1/+43
| | | | | | | | | | | with unique blob Cause: no table->update_handler cloned at the moment of vers_insert_history_row(). update_handler is needed because there can't be several inited indexes at once in the same handler. First index is inited by QUICK_RANGE_SELECT::reset(). Then when history row is inserted check_duplicate_long_entry_key() is done and it requires another index.
* MDEV-24653 fixup: Make the test deterministicMarko Mäkelä2021-01-251-0/+1
|
* Merge 10.3 into 10.4Marko Mäkelä2021-01-251-0/+1
|\
| * MDEV-24653 fixup: Make the test deterministicMarko Mäkelä2021-01-251-0/+1
| |
* | instant_alter_debug: Cover everything with innodb_instant_alter_columnMarko Mäkelä2021-01-252-9/+9
| |
* | Merge 10.3 into 10.4Marko Mäkelä2021-01-2535-201/+599
|\ \ | |/
| * MDEV-24653 Assertion block->page.id.page_no() == index->page failed in ↵Marko Mäkelä2021-01-254-10/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | innobase_add_instant_try() We may end up with an empty leaf page (containing only an ADD COLUMN metadata record) that is not the root page. innobase_add_instant_try(): Disable an optimization for a non-canonical empty table that contains a metadata record somewhere else than in the root page. btr_pcur_store_position(): Tolerate a non-canonical empty table.
| * MDEV-22351 InnoDB may recover wrong information after RESET MASTERbb-10.3-MDEV-22351Marko Mäkelä2021-01-222-29/+25
| | | | | | | | | | | | | | | | | | | | | | Ever since commit 947efe17ed8188ca4feef6deb0c2831a246b5c8f InnoDB no longer writes binlog position in one place. It will not at all be written to the TRX_SYS page, and instead it will be written to the undo log header page that changes the transaction state. trx_rseg_mem_restore(): Recover the information from the latest written page.
| * MDEV-24593 Signal 11 when group by primary key of table joined to ↵Sergei Golubchik2021-01-227-53/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | information_schema.columns I_S tables were materialized too late, an attempt to use table statistics before the table was created caused a crash. Let's move table creation up. it only needs read_set to be calculated properly, this happens in JOIN::optimize_inner(), after semijoin transformation. Note that tables are not populated at that point, so most of the statistics would make no sense anyway. But at least field sizes will be correct. And it won't crash.
| * remove now-unused rdiff fileSergei Golubchik2021-01-221-11/+0
| |
| * MDEV-21153 Replica nodes crash due to indexed virtual columns and FK ↵bb-10.3-MDEV-21153sjaakola2021-01-193-1/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cascading delete Fix for MDEV-23033 fixes a problem in replication applying of transactions, which contain cascading foreign key delete for a table, which has indexed virtual column. This fix adds slave_fk_event_map flag for table, to mark when the prelocking is needed for applying of a transaction. See commit 608b0ee52ef3e854ce14a407e64e936adbbeba23 for more details. However, this fix is targeted for async replication only, Rows_log_event::do_apply_event() has condition to rule out galera replication from the fix domain, and use cases suffering from MDEV-23033 and related MDEV-21153 will fail in galera cluster. The fix in this commit removes the condition to rule out the setting of slave_fk_event_map flag from galera replication, and makes the fix in MDEV-23033 effective for galera replication as well. Finally, a mtr test for virtual column support has been added. galera.galera_virtual_column.test has as first test a scenario from MDEV-21153 Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * Merge 10.2 into 10.3Marko Mäkelä2021-01-193-0/+92
| |\
| | * MDEV-21478 Inplace ALTER fails to report error when FTS_DOC_IDThirunarayanan Balathandayuthapani2021-01-113-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with wrong data type is added Inplace alter fails to report error when fts_doc_id column with wrong data type is added. prepare_inplace_alter_table_dict(): Should check whether the column is fts_doc_id. It should be of bigint type, should accept non null data type and it should be in capital letters.
| * | MDEV-23666: Assertion `m_cpp_buf <= ptr && ptr <= m_cpp_buf + m_buf_length' ↵Dmitry Shulga2021-01-143-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | failed in Lex_input_stream::body_utf8_append On parsing statements for which a starting backtick (`) delimiter doesn't have a corresponding ending backtick, a current pointer to a position inside a pre-processed buffer could go beyond the end of the buffer. This bug report caused by the commit d4967659032b18a5504198b41dd3d0a1813d79ef "MDEV-22022 Various mangled SQL statements will crash 10.3 to 10.5 debug builds". In order to fix the issue both pointers m_ptr and m_cpp_ptr must be rolled back to previous position in raw input and pre-processed input streams correspondingly in case end of query reached during parsing.
| * | MDEV-24387: Wrong number of decimal digits in certain UNION/SubqeryRucha Deodhar2021-01-133-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constellation Analysis: The decimals is set to NOT_FIXED_DEC for Field_str even if it is NULL. Unsigned has decimals=0. So Type_std_attributes::decimals is set to 39 (maximum between 0 and 39). This results in incorrect number of decimals when we have union of unsigned and NULL type. Fix: Check if the field is created from NULL value. If yes, set decimals to 0 otherwise set it to NOT_FIXED_DEC.
| * | MDEV-23446 Missed error code fixAleksey Midenkov2021-01-121-1/+1
| | |
| * | MDEV-17227 Server crash in TABLE_SHARE::init_from_sql_statement_string upon ↵Sergei Golubchik2021-01-123-16/+25
| | | | | | | | | | | | | | | | | | | | | | | | table discovery with non-existent database * failed init_from_binary_frm_image can clear share->db_plugin, don't use it on the error path * cleanup the test a bit
| * | MDEV-16735 mysql_upgrade failedSergei Golubchik2021-01-121-0/+1
| | | | | | | | | | | | | | | force alter_algorithm=DEFAULT in mysql_system_tables_fix.sql, in case my.cnf sets it to something incompatible
| * | MDEV-20763 Table corruption or Assertion `btr_validate_index(index, 0, ↵Sergei Golubchik2021-01-123-1/+49
| | | | | | | | | | | | | | | | | | | | | false)' failed in row_upd_sec_index_entry with virtual column and EMPTY_STRING_IS_NULL SQL mode unset empty_string_is_null mode when parsing generated columns in a table, this mode affects pasring.
| * | fix sporadic failures of main.processlist_notembeddedSergei Golubchik2021-01-122-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the test was doing --replace_result $con_id con_id eval SHOW EXPLAIN FOR $con_id; with the intention of replacing the variable part of the statement in the result log. But actually replace_result replaces everything that matches. In particular, when $con_id is 100, the warning Note 1003 select sleep(100000) becomes Note con_id3 select sleep(con_id000)
| * | failing to parse an SP should not abort information_schema.routinesSergei Golubchik2021-01-123-5/+8
| | |
| * | MDEV-24524 Assertion `ls->length < 0xFFFFFFFFL && ((ls->length == 0 && ↵Sergei Golubchik2021-01-123-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | !ls->str) || ls->length == strlen(ls->str))' failed in String::append on SELECT from I_S don't expect return type of a stored function to be valid. it's read from a table, so can be messed with. it even can contain \0 bytes in the middle of the type name
| * | MDEV-20502 Queries against spider tables return wrong values for columns ↵Kentoku SHIBA2021-01-122-0/+31
| | | | | | | | | | | | | | | | | | following constant declarations. Add test cases.
| * | MDEV-20502 Queries against spider tables return wrong values for columns ↵Kentoku SHIBA2021-01-1210-4/+216
| | | | | | | | | | | | | | | | | | following constant declarations. When executing a query like "select id, 0 as const, val from ...", there are 3 columns(items) in Query->select at handlerton->create_group_by(). After that, MariaDB makes a temporary table with 2 columns. The skipped items are const item, so fixing Spider to skip const items for items at Query->select.
| * | Added the test case for MDEV-23804Varun Gupta2021-01-122-0/+83
| | |
* | | MDEV-24463 : galera.galera_sst_mysqldump_with_key MTR failed: 'INSERT ↵bb-10.4-MDEV-24463Jan Lindström2021-01-223-16/+30
| | | | | | | | | | | | | | | | | | | | | | | | failed: 1213: Deadlock found when trying to get lock We need to complete SST if both new and old start positions are not same as initial positions. If they are initial positions just set local uuid and seqno.
* | | MDEV-24596 : Assertion `state_ == s_exec || state_ == s_quitting' failed in ↵Jan Lindström2021-01-2113-36/+304
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wsrep::client_state::disable_streaming There were multiple problems here * wsrep_trx_fragment_size should not be set when wsrep is disabled or provider is not loaded * wsrep_trx_fragment_unit should not be set when wsrep is disabled or provider is not loaded * wsrep_debug has no effect if wsrep is disabled or provider is not loaded * wsrep_start_position should not be set when wsrep is disabled or provider is not loaded any other value than default * wsrep_start_position should be changed only when we are joiner or initialized * wsrep_start_position should be allowed to set only a value that exits, thus we need to add error handling to wsrep_sst_complete
* | | MDEV-21153 Replica nodes crash due to indexed virtual columns and FK ↵sjaakola2021-01-204-1/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cascading delete Fix for MDEV-23033 fixes a problem in replication applying of transactions, which contain cascading foreign key delete for a table, which has indexed virtual column. This fix adds slave_fk_event_map flag for table, to mark when the prelocking is needed for applying of a transaction. See commit 608b0ee52ef3e854ce14a407e64e936adbbeba23 for more details. However, this fix is targeted for async replication only, Rows_log_event::do_apply_event() has condition to rule out galera replication from the fix domain, and use cases suffering from MDEV-23033 and related MDEV-21153 will fail in galera cluster. The fix in this commit removes the condition to rule out the setting of slave_fk_event_map flag from galera replication, and makes the fix in MDEV-23033 effective for galera replication as well. However, the above fix has caused regressions for some galera_sr suite tests, which run tests for streaming replication. This regression can be observed e.g. by: /mtr galera_sr.galera_sr_multirow_rollback --mysqld=--slave_run_triggers_for_rbr=yes These galera_sr suite tests were failing in last phase of replication applying, where actual transaction is already applied, and streaming replication related meta data needs to be updated in wsrep system tables. Opening the wsrep system tables failed for corrupt data in THD::lex:query_tables_list. The fix in this commit uses back query table list for the duration of fragment update operation. Finally, a mtr test for virtual column support has been added. galera.galera_virtual_column.test has as first test a scenario from MDEV-21153 new fix Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | MDEV-24577: Fix warnings generated during compilation of ↵Dmitry Shulga2021-01-193-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | plugin/auth_pam/testing/pam_mariadb_mtr.c on FreeBSD Compiler warnings generated on building MariaDB server for BSD has the same reason as in case building is performed on MacOS. Both platforms do use clang as a C/C++ compiler. So, fix the compiler warnings in case the compiler is clang doesn't matter what kind of building platform do we use for building. This is a follow-up patch for the following bug reports: MDEV-23564: CMAKE failing due to deprecated Apple GSS method MDEV-23935: Fix warnings generated during compilation of plugin/auth_pam/testing/pam_mariadb_mtr.c on MacOS
* | | MDEV-22285 : Assertion `xid_seqno > wsrep_seqno' failed in ↵Jan Lindström2021-01-143-14/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trx_rseg_update_wsrep_checkpoint on SET @@global.wsrep_start_position Actual assertion mentioned on MDEV seems to be already fixed but setting seqno to -2 will trigger a different assertion mysqld: /home/jan/mysql/10.4-bugs/wsrep-lib/src/server_state.cpp:702: void wsrep::server_state::sst_received(wsrep::client_service&, int): Assertion `state_ == s_joiner || state_ == s_initialized' failed. Fixed this by not allowing user to set seqno < -1 (-1 is special seqno meaning undefined and seqno is initialized to it). MariaDB releases 10.2 and 10.3 already do not allow to set seqno < -1.
* | | MDEV-18542 : galera_sr.galera-features#56: Test failure: signal 6; ↵Jan Lindström2021-01-133-12/+9
| | | | | | | | | | | | | | | | | | mysqltest: Can't connect to local MySQL server Make test faster
* | | MDEV-21523 : galera.MDEV-16509 MTR failed: timeout after 900 seconds: Can't ↵Jan Lindström2021-01-131-1/+1
| | | | | | | | | | | | | | | | | | connect to local MySQL server Test uses Galera debug sync.
* | | MDEV-24447 : galera.galera_toi_lock_shared MTR failed: WSREP: ALTER TABLE ↵Jan Lindström2021-01-122-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | isolation failure Add wait_condition so that INSERT is replicated before ALTER and ALTER is replicated before we try to INSERT with new number of columns.
* | | MDEV-23804: Server crashes in st_select_lex::collect_grouping_fields_for_derivedbb-10.4-varunVarun Gupta2021-01-121-0/+2
| | | | | | | | | | | | | | | | | | The issue here was we were trying to push an extracted condition for a view into the underlying table value constructor inside the view. The fix would be to not push conditions into table value constructors.
* | | Merge 10.3 into 10.4Marko Mäkelä2021-01-1133-179/+1239
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3 (except MDEV-17556)Marko Mäkelä2021-01-1122-118/+996
| |\ \ | | |/ | | | | | | | | | | | | The fix of MDEV-17556 (commit e25623e78a3efde05e30070dc7362f8dc0d8c459 and commit 61a362c9493df63dc588fcb71409537ae56ab9c8) has been omitted due to conflicts and will have to be applied separately later.
| | * MDEV-24554 Do not use verisign server for authenticode timestampingVladislav Vaintroub2021-01-091-1/+1
| | |
| | * MDEV-23536 : Race condition between KILL and transaction commitJan Lindström2021-01-085-39/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A race condition may occur between the execution of transaction commit, and an execution of a KILL statement that would attempt to abort that transaction. MDEV-17092 worked around this race condition by modifying InnoDB code. After that issue was closed, Sergey Vojtovich pointed out that this race condition would better be fixed above the storage engine layer: If you look carefully into the above, you can conclude that thd->free_connection() can be called concurrently with KILL/thd->awake(). Which is the bug. And it is partially fixed in THD::~THD(), that is destructor waits for KILL completion: Fix: Add necessary mutex operations to THD::free_connection() and move WSREP specific code also there. This ensures that no one is using THD while we do free_connection(). These mutexes will also ensures that there can't be concurrent KILL/THD::awake(). innobase_kill_query We can now remove usage of trx_sys_mutex introduced on MDEV-17092. trx_t::free() Poison trx->state and trx->mysql_thd This patch is validated with an RQG run similar to the one that reproduced MDEV-17092.
| | * Cleanup: Remove unused symbol QUE_THR_PROCEDURE_WAITMarko Mäkelä2021-01-082-4/+2
| | |
| | * fixup MDEV-17556: fix mroongaNikita Malyavin2021-01-083-19/+19
| | |
| | * MDEV-19838 fixup: clang -Wunused-const-variableMarko Mäkelä2021-01-081-4/+3
| | |
| | * MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failedNikita Malyavin2021-01-0835-224/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assertion failed in handler::ha_reset upon SELECT under READ UNCOMMITTED from table with index on virtual column. This was the debug-only failure, though the problem is mush wider: * MY_BITMAP is a structure containing my_bitmap_map, the latter is a raw bitmap. * read_set, write_set and vcol_set of TABLE are the pointers to MY_BITMAP * The rest of MY_BITMAPs are stored in TABLE and TABLE_SHARE * The pointers to the stored MY_BITMAPs, like orig_read_set etc, and sometimes all_set and tmp_set, are assigned to the pointers. * Sometimes tmp_use_all_columns is used to substitute the raw bitmap directly with all_set.bitmap * Sometimes even bitmaps are directly modified, like in TABLE::update_virtual_field(): bitmap_clear_all(&tmp_set) is called. The last three bullets in the list, when used together (which is mostly always) make the program flow cumbersome and impossible to follow, notwithstanding the errors they cause, like this MDEV-17556, where tmp_set pointer was assigned to read_set, write_set and vcol_set, then its bitmap was substituted with all_set.bitmap by dbug_tmp_use_all_columns() call, and then bitmap_clear_all(&tmp_set) was applied to all this. To untangle this knot, the rule should be applied: * Never substitute bitmaps! This patch is about this. orig_*, all_set bitmaps are never substituted already. This patch changes the following function prototypes: * tmp_use_all_columns, dbug_tmp_use_all_columns to accept MY_BITMAP** and to return MY_BITMAP * instead of my_bitmap_map* * tmp_restore_column_map, dbug_tmp_restore_column_maps to accept MY_BITMAP* instead of my_bitmap_map* These functions now will substitute read_set/write_set/vcol_set directly, and won't touch underlying bitmaps.
| | * MDEV-19442 add-onAndrei Elkin2021-01-071-1/+1
| | | | | | | | | | | | fixing windows build.
| | * MDEV-24482: Added wait condition to make sure table t1 is replicated to node_2.Stepan Patryshev2021-01-041-0/+3
| | |
| | * MDEV-24465: Added wait condition to make sure table t1 is replicated to node_2.Stepan Patryshev2021-01-041-0/+3
| | |
| | * MDEV-24464: Added wait condition to make sure table t1 is replicated to node_2.Stepan Patryshev2021-01-041-0/+3
| | |
| | * MDEV-24447: Added wait condition to make sure table t1 is replicated to node_2.Stepan Patryshev2021-01-041-0/+3
| | |
| | * MDEV-24462: Added wait condition to make sure table t1 is replicated to node_2.Stepan Patryshev2021-01-041-0/+3
| | |