summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-26650: Failed ALTER USER/GRANT statement removes the password from the ↵bb-10.4-MDEV-26650-2Oleksandr Byelkin2021-10-183-11/+69
| | | | | | | cache Starting from 10.4 AUTH is not part of ACL_USER so changes have to be done over a copy, and bring in the cache only in case of success.
* 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
| | |
* | | 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>
* | | Merge 10.3 into 10.4Marko Mäkelä2021-10-047-30/+112
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2021-10-045-26/+110
| |\ \ | | |/
| | * Fix MSVC warning with bison 3.8.2Vladislav Vaintroub2021-10-031-1/+2
| | |
| | * MDEV-24978 crash with transaction on table with no PK and long fulltext columnbb-10.2-MDEV-24978-galerasjaakola2021-09-303-24/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a table has no unique indexes, write set key information will be collected on all columns in the table. The write set key information has space only for max 3500 bytes for individual column, and if a varchar colummn of such non-primary key table is longer than this limit, currently a crash follows. The fix in this commit, is to truncate key values extracted from such long varhar columns to max 3500 bytes. This may potentially lead to false positive certification failures for transactions, which operate on separate cluster nodes, and update/insert/delete table rows, which differ only in the part of such long columns after 3500 bytes border. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * | Work around MDEV-26754 main.sp test fails for embedded serverMarko Mäkelä2021-10-042-4/+2
| | |
* | | MDEV-22708 Assertion `!mysql_bin_log.is_open() || ↵mkaruza2021-10-014-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thd.is_current_stmt_binlog_format_row()' failed in Delayed_insert::handle_inserts and in Diagnostics_area::set_eof_status Variable wsrep_forced_binlog_format has higher priority than binlog_format. In situation where STATEMENT is used and DELAYED INSERT is executing we should fall back to non-delay INSERT. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | MDEV-25883 Galera Cluster hangs while "DELETE FROM mysql.wsrep_cluster"bb-10.4-MDEV-25883-galeramkaruza2021-09-303-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using `innodb_thread_concurrency` will call `wsrep_thd_is_aborting` to check WSREP thread state. This call should be protected by taking `LOCK_thd_data` before entering function. Applier and TOI threads should no be affected with usage of `innodb_thread_concurrency` variable so returning before any checks. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | Merge 10.3 into 10.4Marko Mäkelä2021-09-303-0/+14
|\ \ \ | |/ /
| * | MDEV-20699 followup.Vladislav Vaintroub2021-09-293-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Normally we disable caching of routines in "SHOW CREATE". Introduce an exception, if debug_dbug="+d,cache_sp_in_show_create". lock_sync.test needs a way to populate the cache without side effects, or else it runs into debug_sync timeouts. So, this possibility to cache will be remain only for very special tests.
* | | Merge 10.3 into 10.4Marko Mäkelä2021-09-2926-288/+436
|\ \ \ | |/ /
| * | MDEV-20699 fixup: Re-record compat/oracle.sp-package resultMarko Mäkelä2021-09-291-0/+8
| | |
| * | Merge 10.2 into 10.3Marko Mäkelä2021-09-2915-256/+366
| |\ \ | | |/
| | * Make innodb.innodb_defrag_stats more deterministicMarko Mäkelä2021-09-292-162/+143
| | | | | | | | | | | | | | | | | | Let us mask the actual values of the defragmentation-related fields, because they may vary. Also, remove the dependency on purge, and instead delete records by a ROLLBACK of INSERT.
| | * MDEV-24454 Crash at change_item_treebb-10.2-MDEV-24454Oleksandr Byelkin2021-09-2711-44/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use in_sum_func (and so nest_level) only in LEX to which SELECT lex belong to Reduce usage of current_select (because it does not always point on the correct SELECT_LEX, for example with prepare. Change context for all classes inherited from Item_ident (was only for Item_field) in case of pushing down it to HAVING. Now name resolution context have to have SELECT_LEX reference if the context is present. Fixed feedback plugin stack usage.
| | * Remove test from galera_fulltext until MDEV-24978 is fixed.bb-10.2-jan-galeraJan Lindström2021-09-272-50/+21
| | |
| * | MDEV-26672 test fixupMarko Mäkelä2021-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Occasionally, after restart, additional transactions will have been executed, possibly related to innodb_stats_auto_recalc. We should only care that the transaction ID sequence does not go backwards.
| * | MDEV-26717 mysql_upgrade_service/mariadb-upgrade-service -avoid slow shutdownVladislav Vaintroub2021-09-291-6/+8
| | | | | | | | | | | | Apparently, slow shutdown is not necessary anymore after MDEV-15912 fix
| * | MDEV-20699 mysqldump of routines causes MariaDB to get killed by oom-killerbb-10.3-wlad-MDEV-20699Vladislav Vaintroub2021-09-276-21/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason for this behavior is that SP get cached, per connection. The stored_program_cache is size of this cache, which amounts to 256 routines by default. A compiled stored procedure can easily be several megabytes in size. Thus calling SHOW CREATE PROCEDURE for all stored procedures, like mysqldump does, can require significant amount of memory. Fixed by bypassing the cache for "SHOW CREATE". This should normally be fine also perfomance-wise, as cache is meant to be used for repeated execution, not repeated SHOW CREATEs. Added a test to verify that CREATE PROCEDURE + SHOW CREATE PROCEURE do not cache, i.e amount of allocated memory does not change. Note, there is a change in existing behavior in an edge case : If "SHOW CREATE PROCEDURE p1" called from p1, after p1 was altered, now this will now return altered code. Previour behavior - relied on caching and would return old code. The previous behavior might was not necessarily correct.
* | | MDEV-21806 : galera.galera_partition MTR failed: failed to recover from ↵bb-10.4-MDEV-20451-galeraJan Lindström2021-09-273-0/+12
| | | | | | | | | | | | | | | | | | DONOR state Add wait_condition to wait until all nodes are in cluster
* | | Add wait_condition before problematic selectJan Lindström2021-09-273-2/+25
| | |