summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fix!bb-10.3-mdev-26544_2Nayuta Yanagisawa2021-10-152-13/+25
|
* fNayuta Yanagisawa2021-10-151-6/+3
|
* MDEV-26544 Assertion `part_share->auto_inc_initialized' failed in ↵Nayuta Yanagisawa2021-10-144-3/+63
| | | | ha_partition::get_auto_increment on INSERT
* 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
* | 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-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.
* | 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.
* | Merge 10.2 into 10.3Marko Mäkelä2021-09-248-146/+124
|\ \ | |/
| * Revert MDEV-25114Marko Mäkelä2021-09-2418-766/+230
| | | | | | | | | | | | Revert 88a4be75a5f3b8d59ac8f6347ff2c197813c05dc and 9d97f92febc89941784d17d59c60275e21140ce0, which had been prematurely pushed by accident.
| * Update libmariadbMarko Mäkelä2021-09-241-0/+0
| |
| * MDEV-26360: Using hostnames breaks certificate validationbb-10.2-MDEV-26360-galeraJulius Goryavsky2021-09-244-59/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed flaws with overly strict or, conversely, overly soft verification of certificates in some scenarios: 1. Removed the check that the 'commonname' (CN) in the certificate matches the 'localhost' value on the side of the joiner node, which was performed earlier, even if the address was received by the script only as an argument (out of the exchange via the Galera protocol) - since for the joining node this argument always contains its own local address, not the address of the remote host, so it is always treated as 'localhost', which is not necessarily true (outside of mtr testing); 2. Removed checking the domain name or IP-address of the peer node in the encrypt=2 mode; 3. Fixed checking of compliance of certificates when rsync SST is used; 4. Added the ability to specify CA not only as a file, but also as a path to the directory where the certificates are stored. To do this, the user just needs to specify the path to this directory as the value ssl-ca or tca parameter, ending with the '/' character.
| * MDEV-26612 Two different ways to start MariaDB service can cause data corruptionbb-10.2-MDEV-26612Alexey Bychko2021-09-241-8/+7
| | | | | | | | | | | | | | RedHat systems have both files for lsb and init functions. Old code was written as if/else, so second file (RedHat-specific) was not processed. So, systemd redirect didn't work, because its logic is described in RedHat-specific functions file
| * Revert "MDEV-24978 : SIGABRT in __libc_message"bb-10.2-MDEV-24978-fJan Lindström2021-09-243-94/+21
| | | | | | | | This reverts commit 30dea4599e44e3008fb9bc5fe79ab5747841f21f.
| * MDEV-25114 Crash: WSREP: invalid state ROLLED_BACK (FATAL)sjaakola2021-09-2418-151/+725
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is the plan D variant for fixing potetial mutex locking order exercised by BF aborting and KILL command execution. In this approach, KILL command is replicated as TOI operation. This guarantees total isolation for the KILL command execution in the first node: there is no concurrent replication applying and no concurrent DDL executing. Therefore there is no risk of BF aborting to happen in parallel with KILL command execution either. Potential mutex deadlocks between the different mutex access paths with KILL command execution and BF aborting cannot therefore happen. TOI replication is used, in this approach, purely as means to provide isolated KILL command execution in the first node. KILL command should not (and must not) be applied in secondary nodes. In this patch, we make this sure by skipping KILL execution in secondary nodes, in applying phase, where we bail out if applier thread is trying to execute KILL command. This is effective, but skipping the applying of KILL command could happen much earlier as well. This patch also fixes mutex locking order and unprotected THD member accesses on bf aborting case. We try to hold THD::LOCK_thd_data during bf aborting. Only case where it is not possible is at wsrep_abort_transaction before call wsrep_innobase_kill_one_trx where we take InnoDB mutexes first and then THD::LOCK_thd_data. This will also fix possible race condition during close_connection and while wsrep is disconnecting connections. Added wsrep_bf_kill_debug test case Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * Revert "MDEV-23328 Server hang due to Galera lock conflict resolution" andJan Lindström2021-09-242-112/+74
| | | | | | | | | | | | | | Revert "MDEV-24873 galera.galera_as_slave_ctas MTR failed:..." This reverts commit 29bbcac0ee841faaa68eeb09c86ff825eabbe6b6 and later commit 5ecaf52d42a1e464c71515f35be97855072bcafe.
* | Fixup "Windows, mysqltest : cleanup, remove dead code USE_CYGWIN"Vladislav Vaintroub2021-09-241-0/+8
| | | | | | | | | | last commit 8221708e389728aef799046eef3c49b1eec2e400 removed too much, mtr is failing
* | Windows, mysqltest : cleanup, remove dead code USE_CYGWINVladislav Vaintroub2021-09-241-54/+0
| |
* | MDEV-11499 mysqltest, Windows : improve diagnostics if server fails to shutdownVladislav Vaintroub2021-09-246-117/+193
| | | | | | | | | | | | | | | | | | | | | | Create minidump when server fails to shutdown. If process is being debugged, cause a debug break. Moves some code which is part of safe_kill into mysys, as both safe_kill, and mysqltest produce minidumps on different timeouts. Small cleanup in wait_until_dead() - replace inefficient loop with a single wait.
* | MDEV-26672 innodb_undo_log_truncate may reset transaction ID sequenceMarko Mäkelä2021-09-248-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | trx_rseg_header_create(): Add a parameter for the value that is to be written to TRX_RSEG_MAX_TRX_ID. If we omit this write, then the updated test innodb.undo_truncate will fail for the 4k, 8k, 16k page sizes. This was broken ever since commit 947efe17ed8188ca4feef6deb0c2831a246b5c8f (MDEV-15158) removed the writes of transaction identifiers to the TRX_SYS page. srv_do_purge(): Truncate undo tablespaces also during slow shutdown (innodb_fast_shutdown=0). Thanks to Krunal Bauskar for noticing this problem.
* | Merge 10.2 into 10.3Marko Mäkelä2021-09-2227-575/+311
|\ \ | |/
| * MDEV-26450: Corruption due to innodb_undo_log_truncatebb-10.2-MDEV-26450Marko Mäkelä2021-09-229-123/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least since commit 055a3334adc004bd3a897990c2f93178e6bb5f90 (MDEV-13564) the undo log truncation in InnoDB did not work correctly. The main issue is that during the execution of trx_purge_truncate_history() some pages of the newly truncated undo tablespace could be discarded. fsp_try_extend_data_file(): Apply the peculiar rounding of fil_space_t::size_in_header only to the system tablespace, whose size can be expressed in megabytes in a configuration parameter. Other files may freely grow by a number of pages. fseg_alloc_free_page_low(): Do allow the extension of undo tablespaces, and mention the file name in the error message. mtr_t::commit_shrink(): Implement crash-safe shrinking of a tablespace file. First, durably write the log, then shrink the file, and finally release the page latches of the rebuilt tablespace. Refactored from trx_purge_truncate_history(). log_write_and_flush_prepare(), log_write_and_flush(): New functions to durably write log during mtr_t::commit_shrink().