summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-23836: Assertion `! is_set() || m_can_overwrite_status' inbb-10.5-MDEV-23836Rucha Deodhar2021-09-074-2/+44
| | | | | | | | | | | | Diagnostics_area::set_error_status (interrupted ALTER TABLE under LOCK) Analysis: KILL_QUERY is not ignored when local memory used exceeds maximum session memory. Hence the query proceeds, OK is sent and we end up reopening tables that are marked for reopen. During this, kill status is eventually checked and assertion failure happens during trying to send error message because OK has already been sent. Fix: Ok is already sent so statement has already executed. It is too late to give error. So ignore kill.
* MDEV-26547 Restoring InnoDB buffer pool dump is single-threaded for no reasonMarko Mäkelä2021-09-064-18/+16
| | | | | | | | | buf_read_page_background(): Remove the parameter "bool sync" and always actually initiate a page read in the background. buf_load(): Always submit asynchronous reads. This allows page checksums to be verified in concurrent threads as soon as the reads are completed.
* MDEV-26533 fixup: GCC -WformatMarko Mäkelä2021-09-061-2/+2
|
* MDEV-25684 Crash in THD::find_temporary_table while calling ↵bb-10.5-mdev-25684Nayuta Yanagisawa2021-09-064-0/+44
| | | | | | | | | | | | | | spider_direct_sql UDF without temporary table created The server crashed when SPIDER_DIRECT_SQL UDF was called with non-existing temporary table. The bug has been introduced by 91ffdc8. The commit removed the check, from THD::open_temporary_table(), which ensure that the target temporary tables exist. We can fix the bug by adding the check before the call of THD::open_temporary_table().
* MDEV-26533 MariaDB 10.5 crashes with key_buffer_size > 4Gb on Windows x64Vladislav Vaintroub2021-09-042-24/+23
| | | | | | | | | | | | | | | | | | This is a side-effect of my_large_malloc() introduction,MDEV-18851 It removed a cast to size_t to variable 'blocks' in multiplication blocks * keycache->key_cache_block_size , creating ulong value instead of correct size_t. Replaced a couple of ulongs with appropriate data type, which is size_t. Also, fixed casts to ulongs in crash handler messages, so that people would not be confused by that, too. Interestingly, aria did not expose the same problem even if it contains copied and pasted code in ma_pagecache, because Aria had some ulongs removed when fixing a similar problem in MDEV-9256.
* Fix create_background_thd()Vladislav Vaintroub2021-09-021-3/+6
| | | | | | | Allow the caller to have current_thd. Also do not store PSI_CALL_get_thread() in the new THD, it is a thread local storage variable that can become invalid any time, we do not control the lifetime of the caller's thread.
* Added support for CHECK TABLE for S3 tablesMonty2021-09-017-30/+54
| | | | | | | | Other things: - Don't allocate an IO_CACHE for scanning tables of type BLOCK (It was never used in this case) - Fixed bug in page cache that cased a hang when trying to read a not existing S3 block.
* Added support for ANALYZE TABLE to S3 tablesMonty2021-09-017-30/+121
| | | | | Other things - Cleaned up error messages for CHECK, REPAIR and OPTIMIZE
* Added options s3_port and s3_use_http to aria_s3_copyMonty2021-09-012-8/+24
| | | | | | | | | | | These options was needed in some cases, like when using minio that require the port option, to be able to connect to the S3 storage. The sympthom was that one could get the error "Table t1.MAI doesn't exist in s3" even if the table did exits. Other things: - Improved error message for non existing S3 files
* MDEV-26511 - Do not change purge thread count during bootstrapbb-10.5-MDEV-26511Vladislav Vaintroub2021-08-311-1/+1
| | | | Apparently, in bootstrap this could crash when creating new THDs
* Merge 10.4 into 10.5Marko Mäkelä2021-08-3115-43/+74
|\
| * Merge 10.3 into 10.4Marko Mäkelä2021-08-3117-49/+80
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2021-08-3111-35/+40
| | |\
| | | * MDEV-26504 THD::copy_db_to() fails to return true if THD::db is nullMarko Mäkelä2021-08-301-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | THD::copy_db_to(): Always return true if the output parameter was left uninitialized. This fixes a regression that was caused by commit 7d0d934ca642e485b2c008727dc20c83e26cce10 (MDEV-16473). MariaDB Server 10.3 and later were unaffected by this bug thanks to commit a7e352b54ddfaf91c92951d605cb02a4ffd2676b. Possibly this bug only affects mysql_list_fields() in the Embedded Server (libmysqld). This bug was found by GCC 11.2.0 in CMAKE_BUILD_TYPE=RelWithDebInfo.
| | | * Fix GCC 11 -Wmaybe-uninitialized for PLUGIN_PERFSCHEMAMarko Mäkelä2021-08-304-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | init_mutex_v1_t: Stop lying that the mutex parameter is const. GCC 11.2.0 assumes that it is and could complain about any mysql_mutex_t being uninitialized even after mysql_mutex_init() as long as PLUGIN_PERFSCHEMA is enabled. init_rwlock_v1_t, init_cond_v1_t: Remove untruthful const qualifiers. Note: init_socket_v1_t is expecting that the socket fd has already been created before PSI_SOCKET_CALL(init_socket), and therefore that parameter really is being treated as a pointer to const.
| | | * Update libmariadbMarko Mäkelä2021-08-301-0/+0
| | | |
| | | * mtr: fix the check where a combination is pre-selectedSergei Golubchik2021-08-292-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if all options from a combination from the combinations file are already present in the server's list of options, then don't try to run tests in other combinations from this file. old behavior was: if at least one option from a combination is already present in the list...
| | | * typo fixedSergei Golubchik2021-08-261-1/+1
| | | |
| | | * rocksdb: disable on arm64 except for LinuxDaniel Black2021-08-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Theodore Brockman on Zulip for noticing on an OSX ARM64 and testing this patch. Per https://github.com/google/cpu_features/pull/150/files CMAKE_SYSTEM_PROCESSOR is arm64 on Apple. Without this, compulation error: [ 80%] Building CXX object storage/rocksdb/CMakeFiles/rocksdblib.dir/rocksdb/util/crc32c.cc.o /mariadb/storage/rocksdb/rocksdb/util/crc32c.cc:500:18: error: use of undeclared identifier 'isSSE42' has_fast_crc = isSSE42(); ^ /mariadb/storage/rocksdb/rocksdb/util/crc32c.cc:1230:7: error: use of undeclared identifier 'isSSE42' if (isSSE42()) { ^ /mariadb/storage/rocksdb/rocksdb/util/crc32c.cc:1231:9: error: use of undeclared identifier 'isPCLMULQDQ' if (isPCLMULQDQ()) { ^ This can be reverted when the RocksDB submodule is updated. https://github.com/facebook/rocksdb/commit/ee4bd4780b321ddb5f92a0f4eb956f2a2ebd60dc
| | | * Remove FLUSH PRIVILEGES from mysql_setpermissionMarek Kulik2021-08-251-1/+0
| | | | | | | | | | | | | | | | FLUSH PRIVILEGES hasn't been needed for very many years.
| | | * Fix mysql_setpermission hostname logicMarek Kulik2021-08-251-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - Don't include port in connection parameters with 'localhost' hostname More info: The hostname, if not specified or specified as '' or 'localhost', will default to a MySQL server running on the local machine using the default for the UNIX socket. To connect to a MySQL server on the local machine via TCP, you must specify the loopback IP address (127.0.0.1) as the host. Reported issue: https://bugzilla.redhat.com/show_bug.cgi?id=1976224
| | * | MDEV 22785 Crash with prepared statements and NEXTVAL()Michael Widenius2021-08-264-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that a PREARE followed by a non prepared statement using DEFAULT NEXT_VALUE() could change table->next_local to point to a not persitent memory aria. The next EXECUTE would then try to use the wrong pointer, which could cause a crash. Fixed by reseting the pointer to it's old value when doing EXECUTE.
| | * | Fixed failing maria.repair testMichael Widenius2021-08-262-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported patch from MariaDB 10.6 The issue was that the using session_mem_used to break a test does not guarantee where the test breaks, which gives different results depending on the environment or how MariaDB is compield.
* | | | MDEV-26511 Only allocate Innodb background purge thd, when it is safe.Vladislav Vaintroub2021-08-301-5/+22
| | | | | | | | | | | | | | | | | | | | Change logic to only allocate purge thds at startup, or in pre-shutdown (for slow shutdown).
* | | | MDEV-26438 cmake < 3.6.0 produced RPMs with invalid namesbb-10.5-abychkoAlexey Bychko2021-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replaced CPACK_RPM_PACKAGE_VERSION with SERVER_VERSION. CPACK_* variables are empty and can't be used until INCLUDE(CPack) is called. SERVER_VERSION is the safest option because other variables may be overwritten from submodules
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-08-2614-49/+90
|\ \ \ \ | |/ / /
| * | | MDEV-26380 auth_pam_tool has incorrect permissions on CentOS 7Sergei Golubchik2021-08-251-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buggy sepdebugcrcfix in CentOS 7 (rpm-4.11.3) does not restore SUID bit after editing the binary. This is fixed in rpm-4.12. Still let's not set SUID bit when installing auth_pam_tool and use rpm spec %attr directive instead.
| * | | After-merge fix f84e28c119b495da77e197f7cd18af4048fc3126Marko Mäkelä2021-08-2512-46/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a rebase of the merge, two preceding commits were accidentally reverted: commit 112b23969a30ba6441efa5e22a3017435febfa17 (MDEV-26308) commit ac2857a5fbf851d90171ac55f23385869ee6ba83 (MDEV-25717) Thanks to Daniele Sciascia for noticing this.
| * | | Fix clang -Wunused-but-set-variableMarko Mäkelä2021-08-251-6/+1
| | | |
* | | | MDEV-26474: Fix mysql_setpermission hostname logicMarek Kulik2021-08-251-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - Don't include port in connection parameters with 'localhost' hostname More info: The hostname, if not specified or specified as '' or 'localhost', will default to a MySQL server running on the local machine using the default for the UNIX socket. To connect to a MySQL server on the local machine via TCP, you must specify the loopback IP address (127.0.0.1) as the host. To comply with what the perl module expects, we omit the port for a host=localhost connection. Reported issue: https://bugzilla.redhat.com/show_bug.cgi?id=1976224
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-08-255-9/+10
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-08-256-22/+23
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-08-251-1/+5
| | |\ \ | | | |/
| | | * MDEV-26109: s390x detected as 32bit in mtr testsDaniel Black2021-08-251-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently @@version_compile_machine is used by mtr to determine if the compiled executable is 32 or 64 bits. We extend that logic by ensuring that if the DEFAUT_MACHINE name doesn't have "64" in its string, "-64bits" is appended to ensure these test pass.
| | * | Fixed compile errors when compiling with HAVE_valgrindMichael Widenius2021-08-243-6/+6
| | | |
| | * | MDEV-26465 Race condition in trx_purge_rseg_get_next_history_log()st-10.3-markoMarko Mäkelä2021-08-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trx_purge_rseg_get_next_history_log(): Fix a race condition that was introduced in commit e46f76c9749d7758765ba274a212cfc2dcf3eeb8 (MDEV-15912). The buffer pool page contents must not be accessed while not holding a page latch. The page latch was released by mtr_t::commit(). This race resulted in an ASAN heap-use-after-poison during a stress test.
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-08-233-6/+2
| | |\ \ | | | |/
| | | * Disable 2 commonly failing innodb_gis testsMarko Mäkelä2021-08-231-0/+2
| | | |
| | | * fix clang buildEugene Kosov2021-08-232-6/+0
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-08-2314-498/+507
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-08-2314-2573/+1070
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-08-238-2562/+1041
| | |\ \ | | | |/
| | | * MDEV-26383 fixup: Consistently protect freed_indexes with autoinc_mutexMarko Mäkelä2021-08-233-23/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid potential race conditions between concurrent access to dict_table_t::freed_indexes, let us consistently use dict_table_t::autoinc_mutex. dict_table_remove_from_cache_low(): To avoid extensive hold time of table->autoinc_mutex, unconditionally free the FTS data structures.
| | | * MDEV-26383 ASAN heap-use-after-free failure in btr_search_lazy_freeThirunarayanan Balathandayuthapani2021-08-213-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= The last AHI page for two indexes of an dropped table is being freed at the same time by two threads. One thread frees the table heap and other thread tries to access table heap again. It leads to asan failure in btr_search_lazy_free(). Solution: ======== InnoDB uses autoinc_mutex to avoid the race condition in btr_search_lazy_free()
| | | * Unused flag creates cleaning issue (piuparts)Faustin Lammler2021-08-201-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "$mysql_statedir/debian-$MAJOR_VER.flag" is not used by any maintainer script ("$mysql_datadir/debian-$MAJOR_VER.flag" is used, https://github.com/MariaDB/server/blob/10.6/debian/mariadb-server-10.6.postinst#L164). See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=985870 Fix also some minor typo.
| | | * MDEV-26443 HAVE_C99_INITIALIZERS is not applicable to C++st-10.2-MDEV-26443Marko Mäkelä2021-08-203-2581/+1017
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Designated initializers were introduced in ISO/IEC 9899:1999 (C99), but the C code base of MariaDB is supposed to be compatible with the 1990 version of the standard. The InnoDB code based was switched from C to C++ in MySQL 5.6 and MariaDB 10.0. C++ did not introduce syntax for designated initializers until ISO/IEC 14882:2020. Our C++ code base is still stuck with the 2011 or earlier version of that standard. Therefore, this check as well as the macro STRUCT_FLD are best removed.
| | | * CMakeLists.txt: remove MYSQL_SOURCE_DIR from MYSQL_INCLUDE_DIRSbb-10.2-vicentiu-mrdanielnachun2021-08-191-2/+1
| | | |
| | * | MDEV-26458 Crash on ALTER TABLE after DISCARD TABLESPACEMarko Mäkelä2021-08-233-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ha_innobase::check_if_supported_inplace_alter(): Do not invoke innobase_table_is_empty() if the tablespace has been discarded. That is, native ALTER TABLE in InnoDB will treat an empty table in the same way as a tablespace whose tablespace has been discarded. (Note: ALTER TABLE...ALGORITHM=COPY will fail if the tablespace has been discarded.) This fixes a crash that was introduced in commit c755974775a7a7f4fc24abeacd2fc9ea7bf0c247 (MDEV-19611).
| | * | Fix GCC 11.2.0 -Wmaybe-uninitializedMarko Mäkelä2021-08-234-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | TABLE_LIST::calc_md5(): Remove an untruthful const qualifier. thd_get_query_start_data(): Pass empty_clex_str instead of an uninitialized LEX_CSTRING.
| * | | MDEV-19712 backup stages commented out.Vladislav Vaintroub2021-08-201-2/+0
| | | | | | | | | | | | | | | | Remove commented out code, so that occasional reader is not confused.