- 07 Dec, 2023 7 commits
-
-
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.
-
- 06 Dec, 2023 2 commits
-
-
Oleg Smirnov authored
When QUICK_GROUP_MIN_MAX_SELECT is initialized or being reset it stores the prefix of the last group of the index chosen for retrieving data (last_value). Later, when looping through records at get_next() method, the server checks whether the retrieved group is the last, and if so, it finishes processing. At the same time, it looks like there is no need for that additional check since method next_prefix() returns HA_ERR_KEY_NOT_FOUND or HA_ERR_END_OF_FILE when there are no more satisfying records. If we do not perform the check, we do not need to retrieve and store last_value either. This commit removes using of last_value from QUICK_GROUP_MIN_MAX_SELECT. Reviewer: Sergei Petrunia <sergey@mariadb.com>
-
Thirunarayanan Balathandayuthapani authored
Problem: ======== - InnoDB should have two keys on the same column for the self referencing foreign key relation. Solution: ========= - Allow self referential foreign key relation to work with one key.
-
- 05 Dec, 2023 6 commits
-
-
Brandon Nesterenko authored
The binlog.flashback test tries to run using the stmt and mix binlog_format combinations (because it includes have_log_bin.inc), yet are meaningless tests because the server starts with the --flashback option, forcing binlog_format=row. This patch optimizes test time by removing the stmt and mix format combinations from running. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
-
Sergei Petrunia authored
InnoDB could return off-by-1 estimates for the involved tables. This would cause off-by-many difference in join output cardinality for the top-level SELECT, and so different query plan for the subquery. The fix: Introduce mysql-test/include/innodb_stable_estimates.{inc,opt} which disables InnoDB's background statistics collection, and use it.
-
Daniele Sciascia authored
This test happens to fail if it runs after test galera_inject_bf_long_wait. And the reason is that galera_bf_lock_wait greps for message "BF lock wait long" in the error log, and expects that grep matches no lines. Whereas galera_inject_bf_long_wait intentionally causes the message to appear in the log. The fix consists in using assert_grep.inc with option assert_only_after, such that galera_bf_lock_wait is limited to grep only those lines that appeared in the log after it started to execute. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
-
Denis Protivensky authored
Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
-
Julius Goryavsky authored
-
Yuchen Pei authored
-
- 04 Dec, 2023 1 commit
-
-
Vladislav Vaintroub authored
- Do not suppress mysql_install_db.exe output in case of error - Add --verbose-bootstrap to get errors coming from mysqld --boostrap
-
- 02 Dec, 2023 1 commit
-
-
Gulshan Kumar Prasad authored
Extending the rpl_mysqldump_slave.test to incorporate the delete-master-logs option, and this options is alias of get binlogs: show master status -> flush logs -> purge binary logs to <new_binlog> sequence and this test is derived using the same pattern. also we measure the pre and post log state on the master following the mysqldump process. Introducing assertions to validate the correct state.
-
- 30 Nov, 2023 2 commits
-
-
Sergei Golubchik authored
followup for 5bb31bc8
-
Daniel Black authored
Using mysql.slow_log was a test table would generate more than one row if there was more than one row in the table. Replace this table with a empty table with PK. Reviewer: Rex Johnston
-
- 29 Nov, 2023 4 commits
-
-
Marko Mäkelä authored
row_upd_clust_rec_by_insert(): If we are resuming from a lock wait, reset the 'disowned' flag of the BLOB pointers in 'entry' that we copied from 'rec' on which we had invoked btr_cur_disown_inherited_fields() before the lock wait started. In this way, the inserted record with the updated PRIMARY KEY value will have the BLOB ownership associated with itself, like it is supposed to be. Note: If the lock wait had been aborted, then rollback would have invoked btr_cur_unmark_extern_fields() and no corruption would be possible. Reviewed by: Vladislav Lesin Tested by: Matthias Leich
-
Thirunarayanan Balathandayuthapani authored
- Added the parameter stats_persistent=0 for InnoDB engine. - Before printing metadata_lock_info query, make sure that InnoDB does complete purging. Reviewed by: Marko Mäkelä
-
Marko Mäkelä authored
trx_t::commit_in_memory(): Empty the detailed_error string, so that FOREIGN KEY error messages from an earlier transaction will not be wrongly reused in ha_innobase::get_error_message(). Reviewed by: Thirunarayanan Balathandayuthapani
-
Daniel Black authored
It may be the case that for some reason, -Werror deprecated for instance, that mallinfo isn't detected. In this case the malloc.h headers won't be included which defined the mallinfo2 function and its structure. Re-organise so that either function pulls in the header.
-
- 28 Nov, 2023 9 commits
-
-
Kristian Nielsen authored
The problem is that background statistics can race with statistics update during INSERT and cause slightly inaccurate `Rows` count in table statistics (this is deliberate to avoid excessive locking overhead). This was seen as occasional .result difference in the test. Mask out the unstable `Rows` column from SHOW TABLE STATUS; the value is not related to what is being tested in this part of the test case. Run ANALYZE TABLE before SHOW EXPLAIN to get stable row count in output. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
-
Kristian Nielsen authored
Fix some random test failures following MDEV-32168 push. Don't blindly set $rpl_only_running_threads in many places. Instead explicit stop only the IO or SQL thread, as appropriate. Setting it interfered with rpl_end.inc in some cases. Rather than clearing it afterwards, better to not set it at all when it is not needed, removing ambiguity in the test about the state of the replication threads. Don't fail the test if include/stop_slave_io.inc finds an error in the IO thread after stop. Such errors can be simply because slave stop happened in the middle of the IO thread's initial communication with the master. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
-
Monty authored
debug_sync.h was wrongly combined with replication
-
Monty authored
This was a bug in my previous commit, found by buildbot
-
Thirunarayanan Balathandayuthapani authored
MDEV-29913 Assertion `thd->stmt_arena != thd->progress.arena' failed in thd_progress_init upon bulk load - Commit fc31e311(MDEV-8179) doesn't report the progress of inplace alter completely. It just does only in row_merge_sort(). Removing the progress report function completely
-
Thirunarayanan Balathandayuthapani authored
MDEV-32890 LeakSanitizer errors in mem_heap_create_block_func upon query from I_S.INNODB_SYS_TABLES with LIMIT ROWS EXAMINED - innodb_sys_tables query fails to free the object which contains sys_tables information in case of error.
-
Faustin Lammler authored
-
Faustin Lammler authored
See: https://mariadb.org/mailing-lists/
-
Yuchen Pei authored
This avoids the scenario in MDEV-32849, when the unlock happens after the connection has been freed, say in rollback. This is done in 10.5+ after the commit a26700cc. It may or may not prevent potential other scenarios where spider has locked something, then for some reason the statement needs to be rolled back and spider frees the connection, and then spider proceeds to use the freed connection. But at least we fix the regression introduced by MDEV-30014 to 10.4 and bring 10.4 closer in parity with 10.5+.
-
- 27 Nov, 2023 7 commits
-
-
Monty authored
Other things: - Added DBUG_EXECUTE_IF("print_allocated_thread_memory") at end of query to easier find not freed memory allocated by THD - Removed free_root() from plugin_init() that did nothing.
-
Monty authored
The problem was that table->vcol_cleanup_expr() was not called in case of error in open_table().
-
Monty authored
The leaks are all 40 bytes and happens in this call stack when running mtr vcol.vcol_syntax: alloc_root() ... Virtual_column_info::fix_and_check_exp() ... Delayed_insert::get_local_table() The problem was that one copied a MEM_ROOT from THD to a TABLE without taking into account that new blocks would be allocated through the TABLE memroot (and would thus be leaked). In general, one should NEVER copy MEM_ROOT from one object to another without clearing the copied memroot! Fixed by, at end of get_local_table(), copy all new allocated objects to client_thd->mem_root. Other things: - Removed references to MEM_ROOT::total_alloc that was wrongly left after a previous commit
-
Monty authored
This will enable safemalloc to resolve symbols when compiled with __PIE__
-
Monty authored
The reason for this change are the following: - If we call set_killed() from one thread to kill another thread with a message, there may be concurrent usage of the MEM_ROOT which is not supported (this could cause memory corruption). We do not currently have code that does this, but the API allows this and it is better to be fix the issue before it happens. - The per thread memory tracking does not work if one thread uses another threads MEM_ROOT. - set_killed() can be called if a MEM_ROOT allocation fails. In this case it is not good to try to allocate more memory from potentially the same MEM_ROOT. Fix is to use my_malloc() instead of mem_root for killed messages.
-
Monty authored
The stack function trace for this bug is: libc my_free free_root acl_reload The crash happens because acl_memroot gets corrupted. The issue was that during FLUSH PRIVILEGES we discard the old privileges and create new ones. We have protection in place that no one can accesses the privileges during this time. However one short piece of code called during login of a new user, or change password, was not properly protected, which could in some very rare circumstances case a memory overwrite of a MEMROOT object if at the same time another thread calls FLUSH PRIVILEGES. This it issue is fixed by adding protection around set_user_salt(). I also added asserts to other code that is using the acl_memroot to ensure that it is properly proteced everywhere.
-
Anel Husakovic authored
- Record unrecorded tests from `rpl` suite to `engines/funcs` suite (done by d8e448ba): 1) Record test `rpl_row_until` from commit d95fa7e3 2) Record test `rpl_slave_status` from commit a7d186a1 - Stop only running threads for `engines/funcs.rpl_server_id1.test` that is not the same as `rpl.rpl_server_id1.test` - Reviewer: <knielsen@knielsen-hq.org> <andrei.elkin@mariadb.com>
-
- 26 Nov, 2023 1 commit
-
-
Thirunarayanan Balathandayuthapani authored
mysql_prepare_alter_table(): Alter table should check whether foreign key exists when it expected to exists and report the error in early stage dict_foreign_parse_drop_constraints(): Don't throw error if the foreign key constraints doesn't exist when if exists is given in the statement.
-