- 11 Apr, 2022 3 commits
-
-
Marko Mäkelä authored
dict_acquire_mdl_shared(): Invoke the correct variant dict_table_t::parse_name<true>() also when trylock=true, that is, we are being called from fts_optimize_sync_table(). Ever since commit 82b7c561 (MDEV-24258) this code was prone to a hang. If another thread requested an exclusive dict_sys.latch between the time dict_acquire_mdl_shared<trylock=true>() acquired a shared dict_sys.latch and dict_table_t::parse_name<false>() was trying to acquire another shared dict_sys.latch, InnoDB would get into an infinite livelock of threads, because the futex-based srw-lock implementation prioritizes exclusive latch requests. dict_table_t::parse_name(): Rename the template parameter dict_locked into dict_frozen.
-
Marko Mäkelä authored
buf_page_t::set_state(): Relax a debug assertion. It is fine to update a read-fixed block descriptor to be both read-fixed and buffer-fixed. buf_pool_t::watch_unset(): Fix some incorrect logic that was implemented in commit e9e6db93. Thanks to Elena Stepanova for the test case.
-
Vladislav Vaintroub authored
The implementation calls SetServiceStatus() with updated SERVICE_STATUS::dwHint and SERVICE_STATUS::dwCheckpoint
-
- 10 Apr, 2022 1 commit
-
-
Alexander Barkov authored
10.6 tests for MDEV-26507 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed The patch for MDEV-27673 (in 10.3) fixed MDEV-26507 as well. This patch only adds 10.6 specific MTR tests for MDEV-26507.
-
- 09 Apr, 2022 1 commit
-
-
Marko Mäkelä authored
Noticed by Monty
-
- 07 Apr, 2022 1 commit
-
-
Thirunarayanan Balathandayuthapani authored
MDEV-27783 InnoDB: Failing assertion: table->get_ref_count() == 0 upon ALTER TABLE ... MODIFY COLUMN - There is a race condition occurs between purge thread and DDL. So purge thread can increment n_ref_count even after DDL does purge_sys_t::stop_FTS(). - dict_table_open_on_id for purge thread should check purge_sys.must_wait_FTS() before acquring the table. - purge_sys.stop_FTS() does acquire dict_sys.latch for setting the purge system flag and check table ref count on auxilary tables.
-
- 06 Apr, 2022 14 commits
-
-
Marko Mäkelä authored
The Shared/Update/Exclusive locks that were introduced in commit 03ca6495 (MDEV-24142) did not work correctly when a futex-like system call interface was not available. On all tested implementations (IBM AIX as well as FreeBSD and GNU/Linux with the futex interface artificially disabled), the old implementation would cause hangs in some SPATIAL INDEX tests (innodb_gis suite). On FreeBSD, a hang was also observed in an encryption test. We will simply emulate the futex system calls with a single mutex and two condition variables, one for each wait queue. The condition variables basically shadow the lock words and are used as wait queues, just like the futex system calls would be. The storage overhead of ssux_lock_impl will be increased by 32 bits when using SUX_LOCK_GENERIC. Compared to the futex-based implementation, the SUX_LOCK_GENERIC implementation has an overhead of sizeof(pthread_mutex_t)+2*sizeof(pthread_cond_t). rw_lock: Remove all SUX_LOCK_GENERIC extensions. pthread_mutex_wrapper: A simple wrapper of pthread_mutex that implements srw_spin_mutex and srw_mutex for SUX_LOCK_GENERIC. srw_mutex_impl: Define this also for SUX_LOCK_GENERIC, but in that case add the fields mutex, cond. ssux_lock_impl: Define for SUX_LOCK_GENERIC with a minimal difference: adding readers_cond.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
kill_one_thread(): Fix integer sign mismatch in some format strings. Some of this was introduced in commit 5c230b21
-
Marko Mäkelä authored
-
sjaakola authored
Cherry-pick the sql_kill and sql_user_kill from ef2dbb8d Changed ER_CANNOT_USER to ER_KILL_DENIED_ERROR to match other kill denied user messages. Cherry-pick by Daniel Black. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
-
Faustin Lammler authored
As as discussed with @dbart we decided to move https://deb.mariadb.org/repo to https://deb.mariadb.org so that a request on https://deb.mariadb.org will end up directly in https://mirror.mariadb.org/repo. The same behavior was configured for rpms (https://rpm.mariadb.org --> https://mirror.mariadb.org/yum) this also makes the old yum.mariadb.org service transparently compatible with this new service (after DNS change to point to rpm.mariadb.org). See also: https://jira.mariadb.org/browse/MDBF-297
-
Marko Mäkelä authored
We will remove the parameter innodb_disallow_writes because it is badly designed and implemented. The parameter was never allowed at startup. It was only internally used by Galera snapshot transfer. If a user executed SET GLOBAL innodb_disallow_writes=ON; the server could hang even on subsequent read operations. During Galera snapshot transfer, we will block writes to implement an rsync friendly snapshot, as follows: sst_flush_tables() will acquire a global lock by executing FLUSH TABLES WITH READ LOCK, which will block any writes at the high level. sst_disable_innodb_writes(), invoked via ha_disable_internal_writes(true), will suspend or disable InnoDB background tasks or threads that could initiate writes. As part of this, log_make_checkpoint() will be invoked to ensure that anything in the InnoDB buf_pool.flush_list will be written to the data files. This has the nice side effect that the Galera joiner will avoid crash recovery. The changes to sql/wsrep.cc and to the tests are based on a prototype that was developed by Jan Lindström. Reviewed by: Jan Lindström
-
Marko Mäkelä authored
-
- 05 Apr, 2022 6 commits
-
-
Dmitry Shulga authored
Some SQL statements that involves subqueries or stored routines could fail since execution of subqueries or stored routines is not supported for theses statements. Unfortunately, parsing error could result in abnormal termination by firing the following assert DBUG_ASSERT(m_thd == NULL); in a destructor of the class sp_head. The reason of the assert firing is that the method sp_head::restore_thd_mem_root() is not called on semantic action code to clean up resources allocated during parsing. This happens since the macros YYABORT is called instead of MYSQL_YYABORT by semantic action code for some grammar rules. So, to fix the bug YYABORT was just replaced with MYSQL_YYABORT.
-
Sergei Golubchik authored
after moving fields in optimize_schema_tables_memory_usage() store default values into their new, moved, locations.
-
Sergei Golubchik authored
This reverts commit 0812d0de. But keeps the test case.
-
Sergei Golubchik authored
followup for 58cd2a8d
-
Marko Mäkelä authored
-
Otto Kekäläinen authored
As MariaDB 10.5 has been removed from Debian Sid and MariaDB 10.6 has entered it, the Salsa-CI testing needs to adapt. To achieve this, essentially sync most the the salsa-ci.yml contents from https://salsa.debian.org/mariadb-team/mariadb-server/-/tree/debian/latest This includes removing Stretch builds, as Stretch does not support uring nor pmem libraries, which MariaDB 10.6 depends on. Also add a couple Lintian overrides to make Salsa-CI pass. NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, 10.9..) for now, but later somebody needs to go in and update all the testing stages to do the upgrade testing correctly for 10.6->10.7->10.8->10.9 etc.
-
- 04 Apr, 2022 7 commits
-
-
Monty authored
The reason for this fix was that when I tried to run mysql_upgrade at home to update an old 10.5 installation, mysql_upgrade failed with warnings about mariadb.sys user not existing. If the server was started with --skip-grants, there would be no warnings from mysql_upgrade, but in some cases running mysql_upgrade again could produce new warnings. The reason for the warnings was that any access of the mysql.user view will produce a warning if the mariadb.sys user does not exists. Fixed with the following changes: - Disable warnings about mariadb.sys user not existing - Don't overwrite old mariadb.sys entries in tables_priv and global_priv - Ensure that tables_priv has an entry for mariadb.sys if the user exists. This fixes an issue that tables_priv would not be updated if there was a failure directly after global_priv was updated.
-
Monty authored
Server crashed during shutdown with: "corrupted double-linked list" when running mysql_upgrade multiple times against the server. Reason was that db_repostitory could be freed twice.
-
Julius Goryavsky authored
This commit contains a fix to use modern syntax for selecting character classes in the tr utility options. Also one of the tests for SST via rsync (galera_sst_rysnc2) is made more reliable (to avoid rare failures during automatic testing).
-
Vlad Lesin authored
The issue is caused by 59a0236d commit. The initial intention of the commit was to speed up "mariabackup --prepare". The call stack of binlog position reading is the following: ▾ trx_rseg_mem_restore ▾ trx_rseg_array_init ▾ trx_lists_init_at_db_start ▸ srv_start Both trx_lists_init_at_db_start() and trx_rseg_mem_restore() contain special cases for srv_operation == SRV_OPERATION_RESTORE condition, and on this condition only rseg headers are read to parse binlog position. Performance impact is not so big. The solution is to revert 59a0236d.
-
Daniel Black authored
ib_id_t is a uint64. On AIX this isn't a long long unsigned and to prevent the compile warnings and potential wrong type, the UINT64PFx defination is corrected. As INT64PF is unused (last use, xtradb in 10.2), it is removed to remove the confusion that INT64PF and UINT64PFx would be different types otherwise.
-
Alexander Barkov authored
The "const" qualifier was obviously forgotten. This change will also simpily fixing of MDEV-27744.
-
Alexander Barkov authored
Fixing a typo in the fix for MDEV-19804, wrong return value in a bool function: < return NULL; > return true; The problem was found because it did not compile on some platforms. Strangley, it did not have visible problems on other platforms, which did not fail to compile, although "return NULL" should compile to "return false" rather than "return true".
-
- 03 Apr, 2022 1 commit
-
-
Daniel Black authored
tv_usec is a (suseconds_t) so we cast to it. Prevents the AIX(gcc-10) warning: include/my_time.h: In function 'void my_timeval_trunc(timeval*, uint)': include/my_time.h:249:65: warning: conversion from 'long int' to 'suseconds_t' {aka 'int'} may change value [-Wconversion] 249 | tv->tv_usec-= my_time_fraction_remainder(tv->tv_usec, decimals); | macOS is: conversion from 'long int' to '__darwin_suseconds_t' {aka 'int'} may change value On Windows suseconds_t isn't defined so we use the existing long return type of my_time_fraction_remainder. Reviewed by Marko Mäkelä Closes: #2079
-
- 02 Apr, 2022 1 commit
-
-
Dmitry Shulga authored
MDEV-28220: Assert failure in sp_head::~sp_head on parsing a syntax incorrect statement CREATE SEQUENCE ... RESTART inside CREATE PROCEDURE/CREATE FUNCTION This bug report is about the same issue as MDEV-28129 and MDEV-21173. The issue is that the macros YYABORT is called instead of MYSQL_YYABORT on parse error. In result the method LEX::cleanup_lex_after_parse_error is not called to clean up data structures created on parsing of the statement.
-
- 01 Apr, 2022 3 commits
-
-
Anel Husakovic authored
- Before the patch UPDATE error message for VIR tables was different from TRUNCATE,UPDATE,DELETE Reviewed by: <Olivier Bertrand>, vicentiu@mariadb.org
-
Jan Lindström authored
We should make sure that wsrep exists before calling wsrep->post_rollback
-
Daniel Black authored
CMAKE_SYSTEM_PROCESSOR on AIX is "powerpc". To deconflict with the Linux 32bit arch of the same name, CMAKE_SYSTEM_NAME was used in the CMakeLists.txt test to enable -mhtm in the same way that was required for Linux ppc64{,le} compilers in MDEV-27936
-
- 31 Mar, 2022 2 commits
-
-
Brandon Nesterenko authored
rpl.rpl_semi_sync_slave_compressed_protocol.test was manually re-enabled only in 10.3 but left disabled in 10.4+. The fix went into 10.3+, but the test was left disabled in later versions. This commit re-enables the test in 10.4+.
-
Monty authored
This was noticed as part of verifying MDEV-28186 "crash on startup after crash while regular use" but is probably not related to the users issue. Still good to have it fixed
-