summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | MDEV-26158 SIGSEGV in spider_free_mem from ha_spider::open on INSERTbb-10.5-mdev-26158Nayuta Yanagisawa2021-10-194-1/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The server crashes due to passing NULL to spider_free(). In some cases, this == pt_handler_share_handlers[0] at the label error_get_share in ha_spider::open(). In such cases, to nullify pt_handler_share_handlers[0]->wide_handler is nothing but to nullify this->wide_handler. We should not do this before freeing this->wide_handler.
* | | | MDEV-26582 SIGSEGV in spider_db_bulk_insert and spider_db_connect and ↵Nayuta Yanagisawa2021-10-184-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | spider_db_before_query, and hang in "End of update loop" / "Reset for next command" query states Spider accesses a freed connection in ha_spider::end_bulk_insert() and results in SIGSEGV. The cause of the bug is that ha_spider::is_bulk_insert_exec_period() wrongly returns TRUE when the bulk insertion has not yet started. Spider decides whether it is during the bulk insertion or not by the value of insert_pos, but the variable is not reset in a case, and this result in the bug.
* | | | MDEV-26682 Replication timeouts with XA PREPAREbb-10.5-MDEV-26682Marko Mäkelä2021-10-186-2/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of non-exclusive locks in a transaction is to guarantee that the records covered by those locks must remain in that way until the transaction is committed. (The purpose of gap locks is to ensure that a record that was nonexistent will remain that way.) Once a transaction has reached the XA PREPARE state, the only allowed further actions are XA ROLLBACK or XA COMMIT. Therefore, it can be argued that only the exclusive locks that the XA PREPARE transaction is holding are essential. Furthermore, InnoDB never preserved explicit locks across server restart. For XA PREPARE transations, we will only recover implicit exclusive locks for records that had been modified. Because of the fact that XA PREPARE followed by a server restart will cause some locks to be lost, we might as well always release all non-exclusive locks during the execution of an XA PREPARE statement. lock_release_on_prepare(): Release non-exclusive locks on XA PREPARE. trx_prepare(): Invoke lock_release_on_prepare() unless the isolation level is SERIALIZABLE or this is an internal distributed transaction with the binlog (not actual XA PREPARE statement). This has been discussed with Sergei Golubchik and Andrei Elkin. Reviewed by: Sergei Golubchik
* | | | MDEV-26539 SIGSEGV in spider_check_and_set_trx_isolation and ↵bb-10.5-mdev-26539Nayuta Yanagisawa2021-10-184-4/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I_P_List_iterator from THD::drop_temporary_table (10.5.3 opt only) on ALTER The server crashes if ALTER TABLE, which accesses physical data placed at data nodes, is performed on a Spider table. The cause of the bug is that spider_check_trx_and_get_conn() does not allocate connections if sql_command == SQLCOM_ALTER_TABLE. Some ALTER TABLE statements, like ALTER TABLE ... CHECK PARTITION, access data nodes. So, we need to allocate a new connection before performing ALTER TABLEs.
* | | | Made optional Json_writer_object / Json_writer_array consistency checkSergei Krivonos2021-10-173-0/+22
| | | |
* | | | Implemented Json_writer_array & Json_writer_object subitems name presence ↵Sergei Krivonos2021-10-163-6/+35
| | | | | | | | | | | | | | | | control
* | | | MDEV-26742 Assertion `field->type_handler() == this' failed in ↵bb-10.5-bar-MDEV-26742Alexander Barkov2021-10-146-2/+95
| | | | | | | | | | | | | | | | FixedBinTypeBundle<NATIVE_LEN, MAX_CHAR_LEN>::Type_handler_fbt::stored_field_cmp_to_item
* | | | Xcode compatibility update: pcre, mysql-test-run.plSergei Krivonos2021-10-132-9/+11
| | | |
* | | | MDEV-26707: SR transaction rolls back locally, but not in clusterbb-10.5-MDEV-26707-galeraJan Lindström2021-10-131-22/+3
| | | | | | | | | | | | | | | | Record correct result file.
* | | | MDEV-26819 SET GLOBAL innodb_max_dirty_pages_pct=0 occasionally fails to ↵Marko Mäkelä2021-10-133-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trigger writes innodb_max_dirty_pages_pct_update(), innodb_max_dirty_pages_pct_lwm_update(): Invoke buf_pool.page_cleaner_wakeup() in order to wake up buf_flush_page_cleaner. This allows the test innodb.page_cleaner to run without any occasional timeouts. The occasional hangs were introduced by commit 7b1252c03d7131754d9503560fe507b33ca1f8b4 (MDEV-24278).
* | | | MDEV-26707: SR transaction rolls back locally, but not in clusterJan Lindström2021-10-132-3/+28
| | | | | | | | | | | | | | | | Add wait_condition
* | | | MDEV-24062: : Galera test failure on galera_var_replicate_myisam_onbb-10.5-MDEV-24062-galeraJan Lindström2021-10-132-2/+8
| | | | | | | | | | | | | | | | 10.5 version
* | | | MDEV-24062: Re-disable the test after mergeMarko Mäkelä2021-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The test galera.galera_var_replicate_myisam_on would trigger an assertion failure "mode() == m_local" in wsrep-lib/src/client_state.cpp after the merge of commit 3067ffc58e2ada6591e3d823b31841ea685da6c7 enabled it.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-10-1370-327/+1083
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-10-1354-121/+754
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-10-1336-51/+358
| | |\ \ | | | |/
| | | * MDEV-26811: Assertion "log_sys->n_pending_flushes == 1" failsMarko Mäkelä2021-10-131-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 1cb218c37cc3fe01a1ff2fe9b1cbfb591e90d5ce (MDEV-26450) we introduced the function log_write_and_flush(), which may compete with log_checkpoint() invoking log_write_flush_to_disk_low() from another thread. The assertion n_pending_flushes==1 is too strict. There is no possibility of a race condition here, because fil_flush() is protected by fil_system->mutex and the rest will be protected by log_sys->mutex. log_write_flush_to_disk_low(), log_write_and_flush(): Relax the assertions to test for a nonzero count.
| | | * Xcode compatibility updateSergei Krivonos2021-10-127-16/+29
| | | |
| | | * MDEV-25925 Warning: Memory not freed: 32 on INSERT DELAYEDbb-10.2-bar-MDEV-25925Alexander Barkov2021-10-114-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also fixes MDEV-24467 Memory not freed after failed INSERT DELAYED Description: In case of an error (e.g. data truncation) during mysql_insert() handling an INSERT DELAYED, the data type specific data in fields (e.g. Field_blob::value) is not taken over by the delayed writer thread. All fields in table_list->table are freed by free_root() immediately after mysql_insert(). To avoid a memory leak, we need to free the specific data before exiting mysql_insert() on error.
| | | * MDEV-23269 SIGSEGV in ft_boolean_check_syntax_string on setting ↵bb-10.2-bar-MDEV-23269Alexander Barkov2021-10-119-6/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ft_boolean_syntax The crash happened because my_isalnum() does not support character sets with mbminlen>1. The value of "ft_boolean_syntax" is converted to utf8 in do_string_check(). So calling my_isalnum() is combination with "default_charset_info" was wrong. Adding new parameters (size_t length, CHARSET_INFO *cs) to ft_boolean_check_syntax_string() and passing self->charset(thd) as the character set.
| | | * MDEV-24742 Server crashes in Charset::numchars / String::numcharsbb-10.2-bar-MDEV-24742Alexander Barkov2021-10-113-0/+30
| | | | | | | | | | | | | | | | | | | | The crash happened because Item_aes_crypt::val_str() did not set the character set of the result.
| | | * Apple Silicon is a 64-bit platform (#1922)SergMariaDB2021-10-111-1/+1
| | | | | | | | | | | | Co-authored-by: FX Coudert <fxcoudert@gmail.com>
| | | * MDEV-18278 Misleading error message in error log upon failed table creationAleksey Midenkov2021-10-113-0/+17
| | | | | | | | | | | | | | | | | | | | If error_reported is not set upper caller open_table_from_share() throws error ER_NOT_FORM_FILE itself via open_table_error().
| | | * MDEV-14846 InnoDB: assertion on trx->state because of deadlock error ignoredAleksey Midenkov2021-10-114-17/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On deadlock transaction is rolled back (and trx->state is cleared) but SELECT continued the loop because evaluate_join_record() ignored the error status returned from lower join evaluation. val_int() does not return error status so it is checked by thd->is_error(). Test case was created by Thirunarayanan Balathandayuthapani <thiru@mariadb.com>
| | | * MDEV-24454 fixup: Fix plugins.feedback_plugin_sendMarko Mäkelä2021-10-112-3/+19
| | | | | | | | | | | | | | | | | | | | In commit 3690c549c6e72646ba74f6b4c83813ee4ac3aea4 this test was not adjusted.
| | | * Make Explain_node::children protectedSergei Petrunia2021-10-081-0/+2
| | | |
| | | * MDEV-25444: mysql --binary-mode is not able to replay some mysqlbinlog outputsbb-10.2-MDEV-25444-docsBrandon Nesterenko2021-10-072-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a documentation-only patch to refine the description of binary mode for the mariadb client. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
| | * | MDEV-22464 Server crash on UPDATE with nested subqueryAleksey Midenkov2021-10-113-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used anywhere else and is always empty). The fix would be to return back the original fields list. But this fails update_use_source.test case: --error ER_BAD_FIELD_ERROR update v1 set t1c1=2 order by 1; Actually not failing the above seems to be ok. The other fix would be to keep resolve_in_select_list false (and that keeps outer context from being resolved in Item_ref::fix_fields()). This fix is more consistent with how SELECT behaves: --error ER_SUBQUERY_NO_1_ROW select a from t1 where a= (select 2 from t1 having (a = 3)); So this patch implements this fix.
| | * | MDEV-25891 Computed default for INVISIBLE column is ignored in INSERTAleksey Midenkov2021-10-113-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two fill_record() functions (lines 8343 and 8618). First one is used when there are some explicit values, the second one is used for all implicit values. First one does update_default_fields(), the second one did not. Added update_default_fields() call to the implicit version of fill_record().
| | * | MDEV-22660 SIGSEGV on adding system versioning and modifying system columnAleksey Midenkov2021-10-113-0/+47
| | | | | | | | | | | | | | | | | | | | Second alter subcommand correctly removed VERS_ROW_END flag. We throw ER_VERS_PERIOD_COLUMNS in such case.
| | * | MDEV-22660 System versioning cleanupsAleksey Midenkov2021-10-119-67/+64
| | | | | | | | | | | | | | | | | | | | | | | | - Cleaned up Vers_parse_info::check_sys_fields(); - Renamed VERS_SYS_START_FLAG, VERS_SYS_END_FLAG to VERS_ROW_START, VERS_ROW_END.
| | * | Merge branch '10.2' into 10.3bb-10.3-25444-10.2-nullmergeBrandon Nesterenko2021-10-060-0/+0
| | |\ \ | | | |/
| | | * MDEV-25444: mysql --binary-mode is not able to replay some mysqlbinlog outputsbb-10.2-MDEV-25444Brandon Nesterenko2021-10-063-1/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: This patch backports commits 10cd281 and 1755ea4 from 10.3. 10cd281: Problem:- Some binary data is inserted into the table using Jconnector. When binlog dump of the data is applied using mysql client it gives syntax error. Reason:- After investigating it turns out to be a issue of mysql client not able to properly handle \\0 <0 in binary>. In all binary files where mysql client fails to insert these 2 bytes are common (0x5c00) Solution:- I have changed mysql.cc to include for the possibility that binary string can have \\0 in it 1755ea4: Changes on top of Sachin’s patch. Specifically: 1) Refined the parsing break condition to only change the parser’s behavior for parsing strings in binary mode (behavior of \0 outside of strings is unchanged). 2) Prefixed binary_zero_insert.test with ‘mysql_’ to more clearly associate the purpose of the test. 3) As the input of the test contains binary zeros (0x5c00), different text editors can visualize this sequence differently, and Github would not display it at all. Therefore, the input itself was consolidated into the test and created out of hex sequences to make it easier to understand what is happening. 4) Extended test to validate that the rows which correspond to the INSERTS with 0x5c00 have the correct binary zero data. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
| | * | MDEV-25444: mysql --binary-mode is not able to replay some mysqlbinlog outputsbb-10.3-25444Brandon Nesterenko2021-10-056-26/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes on top of Sachin’s patch. Specifically: 1) Refined the parsing break condition to only change the parser’s behavior for parsing strings in binary mode (behavior of \0 outside of strings is unchanged). 2) Prefixed binary_zero_insert.test with ‘mysql_’ to more clearly associate the purpose of the test. 3) As the input of the test contains binary zeros (0x5c00), different text editors can visualize this sequence differently, and Github would not display it at all. Therefore, the input itself was consolidated into the test and created out of hex sequences to make it easier to understand what is happening. 4) Extended test to validate that the rows which correspond to the INSERTS with 0x5c00 have the correct binary zero data. Reviewed By: =========== Andrei Elkin <andrei.elkin@mariadb.com>
| | * | MDEV-25444 mysql --binary-mode is not able to replay some mysqlbinlog outputsSachin Kumar2021-10-054-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem:- Some binary data is inserted into the table using Jconnector. When binlog dump of the data is applied using mysql cleint it gives syntax error. Reason:- After investigating it turns out to be a issue of mysql client not able to properly handle \\\0 <0 in binary>. In all binary files where mysql client fails to insert these 2 bytes are commom (0x5c00) Solution:- I have changed mysql.cc to include for the possibility that binary string can have \\\0 in it
| * | | MDEV-26707 SR transaction rolls back locally, but not in clusterbb-10.4-MDEV-26707-galeraDaniele Sciascia2021-10-124-0/+249
| | | | | | | | | | | | | | | | | | | | | | | | Update wsrep-lib, and add MTR test case for MDEV-26707 Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * | | Make test galera_sr_kill_slave_before_apply deterministicDaniele Sciascia2021-10-113-16/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handle the (rare) case where the ongoing transaction is aborted, if the ongoing transaction is considered orphaned. This happens if the node delivers two consecutive primary views with the * Add ignorable warning to suite.pm Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * | | MDEV-21518 : galera.galera_toi_ddl_nonconflicting MTR failed: 1213: Deadlock ↵Jan Lindström2021-10-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | found when trying to get lock Add wait condition.
| * | | Update galera disabled.defJan Lindström2021-10-075-194/+1
| | | |
| * | | MDEV-22996 : Hang on galera_toi_truncate test caseJan Lindström2021-10-072-17/+46
| | | | | | | | | | | | | | | | | | | | | | | | Actual problem was earlier fixed. This contains only test case change. We use debug_sync to force concurrent DML and TRUNCATE.
| * | | MDEV-24062 : Galera test failure on galera_var_replicate_myisam_onJan Lindström2021-10-073-7/+33
| | | | | | | | | | | | | | | | We should do after_statement only for local transactions.
| * | | Fix galera_var_reject_queries test caseJan Lindström2021-10-072-12/+5
| | | |
* | | | Deb: Sync build and runtime dependencies from downstream to upstreamOtto Kekäläinen2021-10-099-47/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Go back to using $MAJOR_VER instead of hard-coded version strings where possible. - Default to 'auto' in NUMJOBS instead of just 1. Will make mysql-test-run faster. - Unify autopkgtest with latest version in Debian, use eatmydata to make mysql-test-run faster. - Salsa-CI: Remove obsolete 'artifacts: true' as that is the default value. - Salsa-CI: Clean away obsolete temporary fixes. - Salsa-CI: Unify with salsa-ci.yml in Debian, including test upgrades from Bullseye to Debian unstable.
* | | | Deb: Correctly install test_sql_service.soOtto Kekäläinen2021-10-091-0/+1
| | | | | | | | | | | | | | | | Completes the change that was attempted in 5ca14daf (MDEV-19275).
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-10-062-2/+2
|\ \ \ \ | |/ / /
| * | | MDEV-22708 Assertion `!mysql_bin_log.is_open() || ↵mkaruza2021-10-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thd.is_current_stmt_binlog_format_row()' failed in Delayed_insert::handle_inserts and in Diagnostics_area::set_eof_status Function `upgrade_lock_type` should check global binlog_format variable instead of thread one. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | | Update libmariadbMarko Mäkelä2021-10-061-0/+0
| | | |
* | | | MDEV-26761: main.mysql_client_test fails with MemorySanitizerMarko Mäkelä2021-10-052-8/+2
| | | | | | | | | | | | | | | | Updated libmariadb and enable the test.
* | | | MDEV-26445 followup: Try to work around GCC 4.8.5 ICE on ARMv8Marko Mäkelä2021-10-051-0/+6
| | | | | | | | | | | | | | | | | | | | GCC 4.8.5 would crash when compiling trx_purge_truncate_history(). Let us try to avoid that by disabling optimizations for the function.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-10-0410-33/+144
|\ \ \ \ | |/ / /