- 17 Dec, 2023 2 commits
-
-
Sergei Golubchik authored
use signal_ddl_recovery_done callback for that. also make the server to call signal_ddl_recovery_done() when loading plugins at run-time (so that plugins would't need to detect that on their own)
-
Sergei Golubchik authored
-
- 15 Dec, 2023 1 commit
-
-
Thirunarayanan Balathandayuthapani authored
-
- 14 Dec, 2023 3 commits
-
-
Marko Mäkelä authored
row_ins_clust_index_entry_low(): Invoke btr_set_instant() in the same mini-transaction that has successfully inserted the metadata record. In this way, if inserting the metadata record fails before any undo log record was written for it, the index root page will remain consistent. innobase_instant_try(): Remove the btr_set_instant() call. This is a 10.6 version of c17aca2f. Tested by: Matthias Leich Reviewed by: Thirunarayanan Balathandayuthapani
-
Marko Mäkelä authored
During mariadb-backup --backup, a table could be renamed, created and dropped. We could have both oldname.ibd and oldname.new, and one of the files would be deleted before the InnoDB recovery starts. The desired end result would be that we will recover both oldname.ibd and newname.ibd. During normal crash recovery, at most one file operation (create, rename, delete) may require to be replayed from the write-ahead log before the DDL recovery starts. deferred_spaces.create(): In mariadb-backup --prepare, try to create the file in case it does not exist. fil_name_process(): Display a message about not found files not only if innodb_force_recovery is set, but also in mariadb-backup --prepare. If we are processing a FILE_RENAME for a tablespace whose recovery is deferred, suppress the message and adjust the file name in case fil_ibd_load() returns FIL_LOAD_NOT_FOUND or FIL_LOAD_DEFER. fil_ibd_load(): Remove a redundant file name comparison. The caller already compared that the file names are different. We used to wrongly return FIL_LOAD_OK instead of FIL_LOAD_ID_CHANGED if only the schema name differed, such as a/t1.ibd and b/t1.ibd. Tested by: Matthias Leich Reviewed by: Thirunarayanan Balathandayuthapani
-
Marko Mäkelä authored
-
- 13 Dec, 2023 1 commit
-
-
Daniel Black authored
opt_kill_long_query_type being an enum could be 0 corresponding to ALL. When ALL is specified, the CONNECTION ADMIN is still required. Also check REPLICA MONITOR privilege and make the tests find the results by recording stderr. Noticed thanks to bug report by Tim van Dijen. Fixes: 79b58f1c
-
- 12 Dec, 2023 9 commits
-
-
Sergei Golubchik authored
fixes the failure of ./mtr --ps sys_vars.gtid_slave_pos_grant sysschema.v_session_ssl_status safe_mutex: Found wrong usage of mutex 'LOCK_thd_data' and 'LOCK_active_mi'
-
Sergei Golubchik authored
calculate auto-inc value even if long duplicate check fails - this is what the engine does for normal uniques. auto-inc value is needed if it's a REPLACE
-
Sergei Golubchik authored
removed dead code
-
Sergei Golubchik authored
-
Sergei Golubchik authored
* treat FUNC/ARRAY variables as SESSION (otherwise they won't be shown) * allow SHOW_SIMPLE_FUNC everywhere where SHOW_FUNC is * increase row buffer size to avoid "too short" assert
-
Sergei Golubchik authored
-
Sergei Golubchik authored
test uses +d,getnameinfo_fake_long_host to return a fake long hostname in ip_to_hostname(). But this dbug keyword is only checked after the lookup in the hostname cache. the test has to flush the hostname cache in case previous tests had it populated with fake ip addresses (perfschema tests do that) also, remove redundant `connection` directives
-
Sergei Golubchik authored
* restore old ENUM values order, in case someone used SET @@s3_protocol_version=1 * restore old behavior for Original and Amazon protocol values, they behave as "Auto" and do not force a specific protocol version Approved by Andrew Hutchings <andrew@mariadb.org>
-
Yuchen Pei authored
The merge was 13dd7875
-
- 11 Dec, 2023 5 commits
-
-
Kristian Nielsen authored
Make sure the old binlog dump thread is not still running when manipulating binlog files; otherwise there is a small chance it will see an invalid partial file and report an I/O error. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
-
Marko Mäkelä authored
Let us remove a test that frequently fails with a result difference. This test had been added in fc279d7e to cover a bug in thd_destructor_proxy(), which was replaced with simpler logic in 5e62b6a5 (MDEV-16264).
-
Dmitry Shulga authored
MDEV-31296: Crash in Item_func::fix_fields when prepared statement with subqueries and window function is executed with sql_mode = ONLY_FULL_GROUP_BY Crash was caused by referencing a null pointer on getting the number of the nesting levels of the set function for the current select_lex at the method Item_field::fix_fields. The current select for processing is taken from Name_resolution_context that filled in at the function set_new_item_local_context() and where initialization of the data member Name_resolution_context was mistakenly removed by the commit d6ee351b (Revert "MDEV-24454 Crash at change_item_tree") To fix the issue, correct initialization of data member Name_resolution_context::select_lex that was removed by the commit d6ee351b is restored.
-
Alexander Barkov authored
This problem was earlier fixed by: commit 55b27888 Adding MTR tests only.
-
Alexander Barkov authored
Enable unusable key notes for non-equality predicates: <, <=, =>, >, BETWEEN, IN, LIKE Note, in some scenarios it displays duplicate notes, e.g. for queries with ORDER BY: SELECT * FROM t1 WHERE indexed_string_column >= 10 ORDER BY indexed_string_column LIMIT 5; This should be tolarable. Getting rid of the diplicate note completely would need a much more complex patch, which is not desiable in 10.6. Details: - Changing RANGE_OPT_PARAM::note_unusable_keys from bool to a new data type Item_func::Bitmap, so the caller can choose with a better granuality which predicates should raise unusable key notes inside the range optimizer: a. all predicates (=, <=>, <, <=, =>, >, BETWEEN, IN, LIKE) b. all predicates except equality (=, <=>) c. none of the predicates "b." is needed because in some scenarios equality predicates (=, <=>) send unusable key notes at an earlier stage, before the range optimizer, during update_ref_and_keys(). Calling the range optimizer with "all predicates" would produce duplicate notes for = and <=> in such cases. - Fixing get_quick_record_count() to call the range optimizer with "all predicates except equality" instead of "none of the predicates". Before this change the range optimizer suppressed all notes for non-equality predicates: <, <=, =>, >, BETWEEN, IN, LIKE. This actually fixes the reported problem. - Fixing JOIN::make_range_rowid_filters() to call the range optimizer with "all predicates except equality" instead of "all predicates". Before this change the range optimizer produced duplicate notes for = and <=> during a rowid_filter optimization. - Cleanup: Adding the op_collation argument to Field::raise_note_cannot_use_key_part() and displaying the operation collation rather than the argument collation in the unusable key note. This is important for operations with more than two arguments: BETWEEN and IN, e.g.: SELECT * FROM t1 WHERE column_utf8mb3_general_ci BETWEEN 'a' AND 'b' COLLATE utf8mb3_unicode_ci; SELECT * FROM t1 WHERE column_utf8mb3_general_ci IN ('a', 'b' COLLATE utf8mb3_unicode_ci); The note for 'a' now prints utf8mb3_unicode_ci as the collation. which is the collation of the entire operation: Cannot use key key1 part[0] for lookup: "`column_utf8mb3_general_ci`" of collation `utf8mb3_general_ci` >= "'a'" of collation `utf8mb3_unicode_ci` Before this change it printed the collation of 'a', so the note was confusing: Cannot use key key1 part[0] for lookup: "`column_utf8mb3_general_ci`" of collation `utf8mb3_general_ci` >= "'a'" of collation `utf8mb3_general_ci`"
-
- 10 Dec, 2023 1 commit
-
-
Alexander Barkov authored
It's not used in 10.5+
-
- 08 Dec, 2023 3 commits
-
-
Marko Mäkelä authored
recv_recovery_from_checkpoint_start(): Relax a too strict debug assertion that occasionally fails in the test encryption.innodb-redo-nokeys when fil_ibd_load() returns FIL_LOAD_INVALID due to missing crypt_info. This assertion had been removed in MariaDB Server 10.8 as part of commit 685d958e (MDEV-14425).
-
Marko Mäkelä authored
buf_flush_page_cleaner(): Pass pct_lwm=srv_max_dirty_pages_pct_lwm (innodb_max_dirty_pages_pct_lwm) to page_cleaner_flush_pages_recommendation() unless the dirty page ratio of the buffer pool is below that. Starting with commit d4265fbd we used to always pass pct_lwm=0.0, which was not intended. Reviewed by: Vladislav Vaintroub
-
Yuchen Pei authored
-
- 07 Dec, 2023 15 commits
-
-
Brandon Nesterenko authored
Because --delete-master-logs immediately purges logs after flushing, it is possible the binlog dump thread would still be using the old log when the purge executes, disallowing the file from being deleted. This patch institutes a work-around in the test as follows: 1) temporarily stop the slave so there is no chance the old binlog is still being referenced. 2) set master_use_gtid=Slave_pos so the slave can still appear up-to-date on the master after the master flushes/purges its logs (while the slave is offline). Otherwise (i.e. if using binlog file/pos), the slave would point to a purged log file, and receive an error immediately upon connecting to the master. Reviewed By ============ Andrei Elkin <andrei.elkin@mariadb.com>
-
Andrew Hutchings authored
The previous commit for MDEV-32884 fixed the s3_protocol_version option, which was previous only using "Auto", no matter what it was set to. This patch does several things to keep the old behaviour whilst correcting for new behaviour and laying the groundwork for the future. This includes: * `Original` now means v2 protocol, which it would have been due to the option not working, so upgrades will stil work. * A new `Legacy` option has been added to mean v1 protocol. * Options `Path` and `Domain` have been added, these will be the only two options apart from `Auto` in a future release, and are more aligned with what this variable means. * Fixed the s3.debug test so that it works with v2 protocol. * Fixed the s3.amazon test so that it works with region subdomains. * Added additional modes to the s3.amazon test. * Added s3.not_amazon test for the remaining modes. This replaces PR #2902.
-
Thirunarayanan Balathandayuthapani authored
- Split the doublewrite test into two test (doublewrite, doublewrite_debug) to reduce the execution time of the test - Removed big_test tag for the newly added test case - Made doublewrite test as non-debug test - Added search pattern to make sure that InnoDB uses doublewrite buffer - Replaced all kill_mysqld.inc with shutdown_mysqld.inc and zero shutdown timeout - Removed the case where fsp_flags got corrupted. Because from commit 3da5d047 (MDEV-31851) onwards, doublewrite buffer removes the conversion the fsp flags from buggy 10.1 format Thanks to Marko Mäkelä for providing the non-debug test
-
Yuchen Pei authored
-
Yuchen Pei authored
-
Yuchen Pei authored
Remove ORACLE from the (session) sql_mode in connections made with sql service to run init queries The connection is new and the global variable value takes effect rather than the session value from the caller of spider_db_init.
-
Sergei Golubchik authored
specify algorithm/lock explicitly, don't depend on server settings
-
Yuchen Pei authored
-
Yuchen Pei authored
This should fix certain CI builds where the spider suite test files and the main suite test files do not follow the same relative paths relations as the mariadb source.
-
Yuchen Pei authored
$MYSQLD_CMD uses .1 as the defaults-group-suffix, which could cause the use of the default port (3306) or socket, which will fail in environment where these defaults are already in use by another server. Adding an extra --defaults-group-suffix=.1.1 does not help, because the first flag wins. So we use $MYSQLD_LAST_CMD instead, which uses the correct suffix. The extra innodb buffer pool warning is irrelevant to the goal of the test (running --wsrep-recover with --plug-load-add=ha_spider should not cause hang)
-
Yuchen Pei authored
Fix spider init bugs (MDEV-22979, MDEV-27233, MDEV-28218) while preventing regression on old ones (MDEV-30370, MDEV-29904) Two things are changed: First, Spider initialisation is made fully synchronous, i.e. it no longer happens in a background thread. Adapted from the original fix by nayuta for MDEV-27233. This change itself would cause failure when spider is initialised early, by plugin-load-add, due to dependency on Aria and udf function creation, which are fixed in the second and third parts below. Requires SQL Service, thus porting earlier versions requires MDEV-27595 Second, if spider is initialised before udf_init(), create udf by inserting into `mysql.func`, otherwise do it by `CREATE FUNCTION` as usual. This change may be generalised in MDEV-31401. Also factor out some clean-up queries from deinit_spider.inc for use of spider init tests. A minor caveat is that early spider initialisation will fail if the server is bootstrapped for the first time, due to missing `mysql` database which needs to be created by the bootstrap script.
-
Yuchen Pei authored
Removing procedures that were created and dropped during init. This also fixes a race condition where mtr test with plugin-load-add=ha_spider.so causes post test check to fail as it expects the procedures to still be there.
-
Yuchen Pei authored
There are several plugins in ha_spider: spider, spider_alloc_mem, spider_wrapper_protocols, spider_rewrite etc. INSTALL PLUGIN foo SONAME ha_spider causes all the other ones to be installed by the init queries where foo is any of the plugins. This introduces unnecessary complexiy. For example it reads mysql.plugins to find all other plugins, causing the hack of moving spider plugin init to a separate thread. To install all spider related plugins, install soname ha_spider should be used instead. This also fixes spurious rows in mysql.plugin when installing say only the spider plugin with `plugin-load-add=SPIDER=ha_spider.so`: select * from mysql.plugin; name dl spider_alloc_mem ha_spider.so # should not be here spider_wrapper_protocols ha_spider.so # should not be here Adapted from part of the reverted commit c160a115.
-
Julius Goryavsky authored
This commit fixes a bug where IST could be rejected in favor of SST when ssl-mode=VERIFY_CA and when mariabackup is used. It also contains a test and small code simplifications that will make it easier to find bugs in the future.
-
Yuchen Pei authored
We do this in 10.4 at the same place where in 10.5+ dml_init() is called which does the same thing, among other things.
-