summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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().
| * Silence a warning about unused Bison labelMarko Mäkelä2021-09-221-0/+3
| |
| * MDEV-26545 Spider does not correctly handle UDF and stored function in where ↵Daniel Ye2021-09-225-1/+418
| | | | | | | | | | | | conds - Handle stored function conditions correctly, with the same logic as with UDFs. - When running queries on Spider SE, by default, we do not push down WHERE conditions containing usage of UDFs/stored functions to remote data nodes, unless the user demands (by setting spider_use_pushdown_udf).
| * MDEV-26441: Linux-dependent construct in SST scriptsbb-10.2-MDEV-26441-galeraJulius Goryavsky2021-09-203-3/+9
| | | | | | | | | | | | | | | | | | SST scripts currently use Linux-specific construction to create a temporary directory if the path prefix for that directory is specified by the user. This does not work with FreeBSD. This commit adds support for FreeBSD. No separate test required.
| * MDEV-26636: InnoDB defragmentation statistics cause races on TEMPORARY TABLEMarko Mäkelä2021-09-183-116/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | btr_defragment_save_defrag_stats_if_needed(): Do not save defragmentation statistics for temporary tables. They are exempt of defragmentation anyway (ha_innobase::optimize() never invokes defragmentation for them), and the user-visible names are not available inside InnoDB. Furthermore, InnoDB assumes that temporary tables are never accessed by other threads than the one that handles the session with which the temporary table is associated with. Furthermore, we simplify the test innodb.innodb_defrag_stats and include a test case that demonstrates that defragmentation statistics are no longer being saved for temporary tables.
| * MDEV-15675 encryption.innodb_encryption failed in buildbot with timeoutbb-10.2-MDEV-15675Thirunarayanan Balathandayuthapani2021-09-172-3/+5
| | | | | | | | | | Test case fail to include undo tablespace while waiting for the encryption thread to encrypt all existing tablespace
| * Give less memory to get reliable error.Oleksandr Byelkin2021-09-162-3/+3
| |
| * MDEV-26622: man mysqldump - insert-ignore not insert-intoDaniel Black2021-09-161-5/+5
| | | | | | | | Thanks Karl Levik
| * MDEV-26574 An improper locking bug due to unreleased lock in the ds_xbstream.ccVladislav Vaintroub2021-09-151-3/+7
| | | | | | | | release lock in all as cases n xbstream_open, also fix the case where malloc would return NULL.
| * MDEV-26573 : A static analyzer warning about ds_archive.ccVladislav Vaintroub2021-09-154-318/+0
| | | | | | | | | | This file had not been compiled for long time. Remove this from the tree.
| * MDEV-25702 Auxiliary FTS table evicts during optimize tableThirunarayanan Balathandayuthapani2021-09-131-1/+2
| | | | | | | | | | | | | | InnoDB could evict the fts auxiliary table in row_fts_merge_insert(). So bulk insert could be dealing with garbage FTS auxiliary table.Patch should delay closing the table in row_fts_merge_insert().
* | MDEV-26545 Spider does not correctly handle UDF and stored function in where ↵Daniel Ye2021-09-227-7/+429
| | | | | | | | | | | | | | conds - Handle stored function conditions correctly, with the same logic as with UDFs. - When running queries on Spider SE, by default, we do not push down WHERE conditions containing usage of UDFs/stored functions to remote data nodes, unless the user demands (by setting spider_use_pushdown_udf). - Disable direct update/delete when a udf condition is skipped.
* | MDEV-26521 Remove mdev-504.testVladislav Vaintroub2021-09-212-104/+0
| |
* | MDEV-23506 mariadb-connector-c-devel package from standard RHEL 8 repo ↵bb-10.3-abychkoAlexey Bychko2021-09-211-0/+1
| | | | | | | | | | | | | | | | conflicts with MariaDB's packages added alternative name for MariaDB-devel package to replace mariadb-connector-c-devel from RHEL 8 distribution. this patch is for 10.3+ on RHEL/Centos 8
* | Fix Connect build with MSVC+NinjaVladislav Vaintroub2021-09-111-0/+1
| |
* | Merge branch '10.2' into 10.3Vladislav Vaintroub2021-09-113-16/+62
|\ \ | |/ | | | | | | | | # Conflicts: # cmake/os/Windows.cmake # sql/sql_yacc.yy
| * MDEV-26527 speedup appveyor build - 10.2st-10.2-wlad-appveyorVladislav Vaintroub2021-09-111-15/+24
| |
| * Bison 3.7 - fix "conversion from 'ptrdiff_t' to 'ulong', possible loss of data"Vladislav Vaintroub2021-09-112-4/+4
| |
| * Define minbuild target for 10.2Vladislav Vaintroub2021-09-111-0/+37
| |
| * Fix MYSQL_MAINTAINER_MODE=ERR, on Windows, with Ninja , in 10.2Vladislav Vaintroub2021-09-111-0/+1
| | | | | | | | | | | | | | | | | | A conversion warning 4267 that we want to disable(prior to 10.3), was suppressed with cmake VS generator for C++ and C, despite being set only for CXX flags. The fix is to disable the warning in C flags, too. In 10.2, this warning is noisy, in 10.3 it is fixed.
* | Merge 10.2 into 10.3Marko Mäkelä2021-09-116-7/+27
|\ \ | |/
| * Fix an occasional timeout in innodb.alter_partitionedMarko Mäkelä2021-09-112-0/+8
| |