summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/r
Commit message (Collapse)AuthorAgeFilesLines
* fix sysvar_server tests for 32bitSergei Golubchik2022-06-182-302/+304
|
* Added EQ_REF chaining to the greedy_optimizerMonty2022-06-183-19/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-28073 Slow query performance in MariaDB when using many table The idea is to prefer and chain EQ_REF tables (tables that uses an unique key to find a row) when searching for the best table combination. This significantly reduces row combinations that has to be examined. This is optimization is enabled when setting optimizer_prune_level=2 (which is now default). Implementation: - optimizer_prune_level has a new level, 2, which enables EQ_REF optimization in addition to the pruning done by level 1. Level 2 is now default. - Added JOIN::eq_ref_tables that contains bits of tables that could use potentially use EQ_REF access in the query. This is calculated in sort_and_filter_keyuse() Under optimizer_prune_level=2: - When the greedy_optimizer notices that the preceding table was an EQ_REF table, it tries to add an EQ_REF table next. If an EQ_REF table exists, only this one will be considered at this level. We also collect all EQ_REF tables chained by the next levels and these are ignored on the starting level as we have already examined these. If no EQ_REF table exists, we continue as normal. This optimization speeds up the greedy_optimizer combination test with ~25% Other things: - I ported the changes in MySQL 5.7 to greedy_optimizer.test to MariaDB to be able to ensure we can handle all cases that MySQL can do. - I have run all tests with --mysqld=--optimizer_prune_level=1 to verify that there where no test changes.
* Merge branch '10.9' into 10.10Sergei Golubchik2022-06-176-54/+54
|\
| * MDEV-28769 Assertion `(m_ci->state & 32) || m_with_collate' failed in ↵Alexander Barkov2022-06-166-54/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate on SET NAMES These system variables: @@character_set_client @@character_set_connection @@character_set_database @@character_set_filesystem @@character_set_results @@character_set_server can now be set in numeric format only to IDs of default collations, e.g.: SET @@character_set_xxx=9; -- OK (latin2_general_ci is default) SET @@character_set_xxx=2; -- ERROR (latin2_czech_cs is not default) SET @@character_set_xxx=21; -- ERROR (latin2_hungarian_ci is not default) Before this change the server accepted IDs of non-default collations so all three examples above worked without errors, but this could lead to unexpected behavior in later statements.
* | Merge 10.9 into 10.10Marko Mäkelä2022-06-151-1/+2
|\ \ | |/
| * Merge 10.8 into 10.9Marko Mäkelä2022-06-151-1/+2
| |\
| | * MDEV-28766: SET GLOBAL innodb_log_file_bufferingMarko Mäkelä2022-06-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit c4c88307091cb16886562e9e7b77f5fd077d34b5 (MDEV-28111) we disabled the file system cache on the InnoDB write-ahead log file (ib_logfile0) by default on Linux. It turns out that especially with innodb_flush_trx_log_at_commit=2, writing to the log via the file system cache typically improves throughput, especially on slow storage or at a small number of concurrent transactions. For other values of innodb_flush_log_at_trx_commit, direct writes were observed to be mostly but not always faster. Whether it pays off to disable the file system cache on the log may depend on the type of storage, the workload, and the operating system kernel version. On Linux and Microsoft Windows, we will introduce the settable Boolean global variable innodb_log_file_buffering that indicates whether the file system cache on the redo log file is enabled. The default value is innodb_log_file_buffering=OFF. If the server is started up with innodb_flush_log_at_trx_commit=2, the value will be changed to innodb_log_file_buffering=ON. When a persistent memory interface is being used for the log, the value cannot be changed from innodb_log_file_buffering=OFF. On Linux, when the physical block size cannot be determined to be a power of 2 between 64 and 4096 bytes, the file system cache cannot be disabled, and innodb_log_file_buffering=ON cannot be changed. Server log messages will indicate whether the file system cache is enabled for the redo log: [Note] InnoDB: Buffered log writes (block size=512 bytes) [Note] InnoDB: File system buffers for log disabled (block size=512 bytes) After this change, the startup parameter innodb_flush_method will no longer control whether O_DIRECT will be set on the redo log on Linux. On other operating systems that support O_DIRECT, no interface has been implemented for controlling the file system cache for the redo log. The innodb_flush_method values O_DIRECT, O_DIRECT_NO_FSYNC, O_DSYNC will enable O_DIRECT for data files, not the log. Tested by: Matthias Leich, Axel Schwenke
* | | MDEV-28540 Deprecate and ignore the parameter ↵Marko Mäkelä2022-06-032-124/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | innodb_prefix_index_cluster_optimization The parameter innodb_prefix_index_cluster_optimization used to enable an optimization that was added in cb37c557688e2f7f0381d02f78976a1b7d1bfd65 and was disabled by default. We will unconditionally enable the extension and mark the parameter as deprecated. Related to this, the counters Innodb_secondary_index_triggered_cluster_reads and Innodb_secondary_index_triggered_cluster_reads_avoided allowed to determine the usefulness of this optimization. Now that the configuration parameter is disabled, the counters do not serve any useful purpose and can be removed. row_search_with_covering_prefix(): Fix a bug that caused an incorrect result to be returned.
* | | MDEV-28554: Remove innodb_versionMarko Mäkelä2022-06-032-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INNODB_VERSION_STR: Replaced with PACKAGE_VERSION (non-functional change). INNODB_VERSION_SHORT: Replaced with direct use of MYSQL_VERSION_MAJOR << 8 | MYSQL_VERSION_MINOR. check_version(): Simplify the mariadb-backup version check, and require the server version to be MariaDB 10.8 or later, because that is when the InnoDB redo log format was last changed.
* | | MDEV-24815 Add 'allow-suspicious-udfs' and 'skip-grant-tables' to system ↵Tingyao Nian2022-05-263-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variables Make two existing command line options "allow-suspicious-udfs" and "skip-grant-tables" visible as global system variables. Both options have security implications, but users were not able to check their states in the server prior to this change. This was a security issue, as the user may not be aware if the options are enabled. By adding them into system variables, it increases users’ visibility into their security configurations. Create new MTR tests to verify that the system variables align with the command line options. Minor adjustments to the existing MTR due to the new members in system variables. Before: mysql> SHOW VARIABLES WHERE Variable_Name LIKE 'allow_suspicious_udfs' OR Variable_Name LIKE 'skip_grant_tables'; Empty set (0.000 sec) After: mysql> SHOW VARIABLES WHERE Variable_Name LIKE 'allow_suspicious_udfs' OR Variable_Name LIKE 'skip_grant_tables'; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | allow_suspicious_udfs | OFF | | skip_grant_tables | OFF | +-----------------------+-------+ All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
* | | Merge 10.9 into 10.10Marko Mäkelä2022-05-251-0/+54
|\ \ \ | |/ /
| * | Merge branch '10.8' into 10.9mariadb-10.9.1Sergei Golubchik2022-05-191-0/+54
| |\ \ | | |/
| | * Merge branch '10.7' into 10.8mariadb-10.8.3Sergei Golubchik2022-05-181-0/+54
| | |\
| | | * Merge branch '10.6' into 10.7mariadb-10.7.4Sergei Golubchik2022-05-181-0/+54
| | | |\
| | | | * Merge branch '10.5' into 10.6mariadb-10.6.8Sergei Golubchik2022-05-181-0/+54
| | | | |\
| | | | | * MDEV-28490 Strange result truncation with group_concat_max_len=1GB.Alexey Botchkov2022-05-151-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arythmetic can overrun the uint type when possible group_concat_max_len is multiplied to collation.mbmaxlen (can easily be like 4). So use ulonglong there for calculations.
| | * | | | Stable versionOleksandr Byelkin2022-05-131-1/+1
| | | | | |
* | | | | | Adjust plugin maturity in test resultElena Stepanova2022-05-151-1/+1
|/ / / / /
* | | | | Versions fixOleksandr Byelkin2022-05-131-1/+1
| | | | |
* | | | | Merge 10.8 into 10.9Marko Mäkelä2022-04-281-0/+12
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.7 into 10.8Marko Mäkelä2022-04-271-0/+12
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.6 into 10.7Marko Mäkelä2022-04-261-0/+12
| | |\ \ \ | | | |/ /
| | | * | Merge 10.5 into 10.6Marko Mäkelä2022-04-262-108/+0
| | | |\ \ | | | | |/
| | | | * MDEV-27094 Debug builds include useless InnoDB "disabled" optionsMarko Mäkelä2022-04-222-108/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of commit 4489a89c71ea78f2562159ca0303fbb83da5baa0 in order to remove the test innodb.redo_log_during_checkpoint that would cause trouble in the DBUG subsystem invoked by safe_mutex_lock() via log_checkpoint(). Before commit 7cffb5f6e8a231a041152447be8980ce35d2c9b8 these mutexes were of different type. The following options were introduced in commit 2e814d4702d71a04388386a9f591d14a35980bfe (mariadb-10.2.2) and have little use: innodb_disable_resize_buffer_pool_debug had no effect even in MariaDB 10.2.2 or MySQL 5.7.9. It was introduced in mysql/mysql-server@5c4094cf4971eebab89da4ee4ae92c71f69cd524 to work around a problem that was fixed in mysql/mysql-server@2957ae4f990bf3aed25822b0ce15d3ccad0b54b6 (but the parameter was not removed). innodb_page_cleaner_disabled_debug and innodb_master_thread_disabled_debug are only used by the test innodb.redo_log_during_checkpoint that will be removed as part of this commit. innodb_dict_stats_disabled_debug is only used by that test, and it is redundant because one could simply use innodb_stats_persistent=OFF or the STATS_PERSISTENT=0 attribute of the table in the test to achieve the same effect.
| | | * | Merge 10.5 into 10.6Marko Mäkelä2022-04-211-0/+12
| | | |\ \ | | | | |/
| | | | * Merge branch 10.4 into 10.5Daniel Black2022-04-211-0/+12
| | | | |\ | | | | | | | | | | | | | | | | | | A few of constaint -> constraint
| | | | | * MDEV-22266: Diagnostics_area::sql_errno() const: AssertionRucha Deodhar2022-04-121-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `m_status == DA_ERROR' failed on SELECT after setting tmp_disk_table_size. Analysis: Mismatch in number of warnings between "194 warnings" vs "64 rows in set" is because of max_error_count variable which has default value of 64. About the corrupted tables, the error that occurs because of insufficient tmp_disk_table_size variable is not reported correctly and we continue to execute the statement. But because the previous error (about table being full)is not reported correctly, this error moves up the stack and is wrongly reported as parsing error later on while parsing frm file of one of the information schema table. This parsing error gives corrupted table error. As for the innodb error, it occurs even when tmp_disk_table_size is not insufficient is default but the internal error handler takes care of it and the error doesn't show. But when tmp_disk_table_size is insufficient, the fatal error which wasn't reported correctly moves up the stack so internal error handler is not called. So it shows errors. Fix: Report the error correctly.
* | | | | | MDEV-24920: Merge "old" SQL variable to "old_mode" sql variableRucha Deodhar2022-04-204-4/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Analysis: There are 2 server variables- "old_mode" and "old". "old" is no longer needed as "old_mode" has replaced it (however still used in some places in the code). "old_mode" and "old" has same purpose- emulate behavior from previous MariaDB versions. So they can be merged to avoid confusion. Fix: Deprecate "old" variable and create another mode for @@old_mode to mimic behavior of previous "old" variable. Create specific modes for specifix task that --old sql variable was doing earlier and use the new modes instead.
* | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-04-062-47/+0
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.7 into 10.8Marko Mäkelä2022-04-062-47/+0
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.6 into 10.7Marko Mäkelä2022-04-062-47/+0
| | |\ \ \ \ | | | |/ / /
| | | * | | MDEV-25975: Merge 10.5 into 10.6Marko Mäkelä2022-04-062-47/+0
| | | |\ \ \ | | | | |/ /
| | | | * | MDEV-25975: Merge 10.4 into 10.5Marko Mäkelä2022-04-062-47/+0
| | | | |\ \ | | | | | |/
| | | | | * MDEV-25975: Merge 10.3 into 10.4Marko Mäkelä2022-04-062-47/+0
| | | | | |\
| | | | | | * MDEV-25975 innodb_disallow_writes causes shutdown to hangMarko Mäkelä2022-04-062-47/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-03-301-0/+5
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge 10.7 into 10.8Daniel Black2022-03-251-0/+5
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge 10.6 into 10.7Daniel Black2022-03-251-0/+5
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge 10.5 to 10.6Daniel Black2022-03-251-0/+5
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | MDEV-23974 Tests fail due to [Warning] InnoDB: Trying to delete tablespaceMarko Mäkelä2022-03-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few regression tests invoke heavy flushing of the buffer pool and may trigger warnings that tablespaces could not be deleted because of pending writes. Those warnings are to be expected during the execution of such tests. The warnings are also frequently seen with Valgrind or MemorySanitizer. For those, the global suppression in have_innodb.inc does the trick.
* | | | | | | MDEV-26971: JSON file interface to wsrep node state.Alexey Yurchenko2022-03-181-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integration with status reporter in wsrep-lib. Status reporter reports changes in wsrep state and logged errors/ warnings to a json file which then can be read and interpreted by an external monitoring tool. Rationale: until the server is fully initialized it is unaccessible by client and the only source of information is an error log which is not machine-friendly. Since wsrep node can spend a very long time in initialization phase (state transfer), it may be a very long time that automatic tools can't easily monitor its liveness and progression. New variable: wsrep_status_file specifies the output file name. If not set, no file is created and no reporting is done. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | | | | | Flag innodb_change_buffering as PLUGIN_VAR_DEPRECATEDMarko Mäkelä2022-03-042-5/+5
| | | | | | |
* | | | | | | MDEV-27812 Allow SET GLOBAL innodb_log_file_sizeMarko Mäkelä2022-03-022-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We support online log resizing by replicating the current ib_logfile0 to a new file ib_logfile101, which will eventually replace the ib_logfile0 on the first applicable log checkpoint. Unless the log is located in a persistent memory file system (PMEM), an attempt to SET GLOBAL innodb_log_file_size to less than innodb_log_buffer_size will be refused. (With PMEM, a.k.a. mmap() based log, that parameter has no meaning.) Should the server be killed while the log was being resized, both files ib_logfile0 and ib_logfile101 may exist on startup, and since commit 3b06415cb8dfc2b10d9604950f6ed945bc016425 the extra file ib_logfile101 will be removed. We will initiate checkpoint flushing by invoking buf_flush_ahead(), to let buf_flush_page_cleaner() write out pages until the buf_flush_async_lsn target has been reached. On a log checkpoint, if the new checkpoint LSN is not older than log_sys.resize_lsn (the start LSN of the ib_logfile101), we can switch files and complete the log resizing. Else, we will attempt to switch files on the next checkpoint. Log resizing can be aborted by killing the connection that is executing the SET GLOBAL statement. If the ib_logfile101 wraps around to the beginning, we must advance the log_sys.resize_lsn. In the resized log file, the sequence bit will always be written as 1 (no wrap-around). The log will be duplicated in log_t::resize_write(), invoked by mtr_t::finish_write(). When the log is being written via system calls (not PMEM), the initial log_sys.resize_lsn is the current log_sys.first_lsn, plus an integer multiple of log_sys.block_size, corresponding to the LSN at the start of the block that was written by log_sys.write_lsn. The log_sys.resize_buf will be of the same size as the log_sys.buf. During resizing, the contents of log_sys.buf and log_sys.resize_buf will be identical, except that the sequence bit of each mini-transaction will always be 1 in log_sys.resize_buf. If resizing is in progress, log_t::write_buf() will write log_sys.resize_buf to log_sys.resize_log (ib_logfile101). If the file would wrap around, the buffer will be written to log_sys.START_OFFSET and the log_sys.resize_lsn advanced accordingly. When using mmap() on /dev/shm or a PMEM mount -o dax file system, the initial log_sys.resize_lsn will be the log_sys.lsn at the time the resizing is initiated. If the log file wraps around during resizing, then the log_sys.resize_lsn will be advanced by (log_sys.resize_target - log_sys.START_OFFSET). log_t::resize_start(), log_t::resize_abort(), log_t::write_checkpoint(): Unless the log is mmap() based, acquire flush_lock and write_lock. In any case, acquire exclusive log_sys.latch to prevent race conditions. log_t::resize_rename(): Renamed from log_t::rename_resized(), and moved some code to the previous sole caller srv_start(). Thanks to Vladislav Vaintroub for helpful review comments and to Matthias Leich for testing this, in particular, testing crash recovery, multiple concurrent SET GLOBAL innodb_log_file_size and frequently killed connections.
* | | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-02-254-14/+38
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-02-254-14/+38
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge 10.6 into 10.7Marko Mäkelä2022-02-254-43/+67
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge 10.5 into 10.6 (MDEV-27913)Marko Mäkelä2022-02-254-44/+68
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | Merge 10.4 into 10.5 (MDEV-27913)Marko Mäkelä2022-02-254-30/+54
| | | | |\ \ \ | | | | | |/ /
| | | | | * | Merge 10.3 into 10.4 (MDEV-27913)Marko Mäkelä2022-02-254-45/+71
| | | | | |\ \ | | | | | | |/
| | | | | | * MDEV-27913 fixup: sys_vars.sysvars_innodb resultMarko Mäkelä2022-02-252-41/+49
| | | | | | |