- 25 Dec, 2022 10 commits
-
-
Jan Lindström authored
-
Daniele Sciascia authored
- Provider options are read from the provider during startup, before plugins are initialized. - New wsrep_provider plugin for which sysvars are generated dynamically from options read from the provider. - The plugin is enabled by option plugin-wsrep-provider=ON. If enabled, wsrep_provider_options can no longer be used, (an error is raised on attempts to do so). - Each option is either string, integer, double or bool - Options can be dynamic / readonly - Options can be deprecated Limitations: - We do not check that the value of a provider option falls within a certain range. This type of validation is still done in Galera side. Reviewed-by:
Jan Lindström <jan.lindstrom@mariadb.com>
-
Marko Mäkelä authored
Starting with commit baf276e6 (MDEV-19229) the parameter innodb_undo_tablespaces can be increased from its previous default value 0 while allowing an upgrade from old databases. We will change the default setting to innodb_undo_tablespaces=3 so that the space occupied by possible bursts of undo log records can be reclaimed after SET GLOBAL innodb_undo_log_truncate=ON. We will not enable innodb_undo_log_truncate by default, because it causes some observable performance degradation. Special thanks to Thirunarayanan Balathandayuthapani for diagnosing and fixing a number of bugs related to this new default setting. Tested by: Matthias Leich, Axel Schwenke, Vladislav Vaintroub (with both values of innodb_undo_log_truncate)
-
Julius Goryavsky authored
This fix adds separate handling for "undo*" files that contain undo logs as part of innodb files and adds a filter for undo* to the main filter used when initially transferring files with rsync.
-
Julius Goryavsky authored
This commit adds even more correct handling of parameters with paths if they contain leading or trailing spaces, and also fixes problems if the user specified an explicit path to additional directories, but these directories match the non-standard datadir path - in this In this case, additional subdirectories must be treated (in relation to datadir) as if the path was not specified or implicitly specified via "." or "./", but the script code before this fix worked as if the user had specified separate paths for each of the additional subdirectories (although in fact they point to the same place where datadir points). This fix does not contain separate tests, as tests will be part of the main commit(s). This fix has been made as a separate commit to facilitate review for major substantive fixes related to MDEV-30157 and MDEV-28669.
-
Marko Mäkelä authored
InnoDB tables that lack a primary key (and any UNIQUE INDEX whose all columns are NOT NULL) will use an internally generated index, called GEN_CLUST_INDEX(DB_ROW_ID) in the InnoDB data dictionary, and hidden from the SQL layer. The 48-bit (6-byte) DB_ROW_ID is being assigned from a global sequence that is persisted in the DICT_HDR page. There is absolutely no reason for the DB_ROW_ID to be globally unique across all InnoDB tables. A downgrade to earlier versions will be prevented by the file format change related to removing the InnoDB change buffer (MDEV-29694). DICT_HDR_ROW_ID, dict_sys_t::row_id: Remove. dict_table_t::row_id: The per-table sequence of DB_ROW_ID. commit_try_rebuild(): Copy dict_table_t::row_id from the old table. btr_cur_instant_init(), row_import_cleanup(): If needed, perform the equivalent of SELECT MAX(DB_ROW_ID) to initialize dict_table_t::row_id. row_ins(): If needed, obtain DB_ROW_ID from dict_table_t::row_id. Should it exceed the maximum 48-bit value, return DB_OUT_OF_FILE_SPACE to prevent further inserts into the table. dict_load_table_one(): Move a condition to btr_cur_instant_init_low() so that dict_table_t::row_id will be restored also for ROW_FORMAT=COMPRESSED tables. Tested by: Matthias Leich
-
Marko Mäkelä authored
The purpose of the change buffer was to reduce random disk access, which could be useful on rotational storage, but maybe less so on solid-state storage. When we wished to (1) insert a record into a non-unique secondary index, (2) delete-mark a secondary index record, (3) delete a secondary index record as part of purge (but not ROLLBACK), and the B-tree leaf page where the record belongs to is not in the buffer pool, we inserted a record into the change buffer B-tree, indexed by the page identifier. When the page was eventually read into the buffer pool, we looked up the change buffer B-tree for any modifications to the page, applied these upon the completion of the read operation. This was called the insert buffer merge. We remove the change buffer, because it has been the source of various hard-to-reproduce corruption bugs, including those fixed in commit 5b9ee8d8 and commit 165564d3 but not limited to them. A downgrade will fail with a clear message starting with commit db14eb16 (MDEV-30106). buf_page_t::state: Merge IBUF_EXIST to UNFIXED and WRITE_FIX_IBUF to WRITE_FIX. buf_pool_t::watch[]: Remove. trx_t: Move isolation_level, check_foreigns, check_unique_secondary, bulk_insert into the same bit-field. The only purpose of trx_t::check_unique_secondary is to enable bulk insert into an empty table. It no longer enables insert buffering for UNIQUE INDEX. btr_cur_t::thr: Remove. This field was originally needed for change buffering. Later, its use was extended to cover SPATIAL INDEX. Much of the time, rtr_info::thr holds this field. When it does not, we will add parameters to SPATIAL INDEX specific functions. ibuf_upgrade_needed(): Check if the change buffer needs to be updated. ibuf_upgrade(): Merge and upgrade the change buffer after all redo log has been applied. Free any pages consumed by the change buffer, and zero out the change buffer root page to mark the upgrade completed, and to prevent a downgrade to an earlier version. dict_load_tablespaces(): Renamed from dict_check_tablespaces_and_store_max_id(). This needs to be invoked before ibuf_upgrade(). btr_cur_open_at_rnd_pos(): Specialize for use in persistent statistics. The change buffer merge does not need this function anymore. btr_page_alloc(): Renamed from btr_page_alloc_low(). We no longer allocate any change buffer pages. btr_cur_open_at_rnd_pos(): Specialize for use in persistent statistics. The change buffer merge does not need this function anymore. row_search_index_entry(), btr_lift_page_up(): Add a parameter thr for the SPATIAL INDEX case. rtr_page_split_and_insert(): Specialized from btr_page_split_and_insert(). rtr_root_raise_and_insert(): Specialized from btr_root_raise_and_insert(). Note: The support for upgrading from the MySQL 3.23 or MySQL 4.0 change buffer format that predates the MySQL 4.1 introduction of the option innodb_file_per_table was removed in MySQL 5.6.5 as part of mysql/mysql-server@69b6241a79876ae98bb0c9dce7c8d8799d6ad273 and MariaDB 10.0.11 as part of 1d0f70c2. In the tests innodb.log_upgrade and innodb.log_corruption, we create valid (upgraded) change buffer pages. Tested by: Matthias Leich
-
Marko Mäkelä authored
We introduce the following settable Boolean global variables: innodb_log_file_write_through: Whether writes to ib_logfile0 are write-through (disabling any caching, as in O_SYNC or O_DSYNC). innodb_data_file_write_through: Whether writes to any InnoDB data files (including the temporary tablespace) are write-through. innodb_data_file_buffering: Whether the file system cache is enabled for InnoDB data files. All these parameters are OFF by default, that is, the file system cache will be disabled, but any hardware caching is enabled, that is, explicit calls to fsync(), fdatasync() or similar functions are needed. On systems that support FUA it may make sense to enable write-through, to avoid extra system calls. If the deprecated read-only start-up parameter is set to one of the following values, then the values of the 4 Boolean flags (the above 3 plus innodb_log_file_buffering) will be set as follows: O_DSYNC: innodb_log_file_write_through=ON, innodb_data_file_write_through=ON, innodb_data_file_buffering=OFF, and (if supported) innodb_log_file_buffering=OFF. fsync, littlesync, nosync, or (Microsoft Windows specific) normal: innodb_log_file_write_through=OFF, innodb_data_file_write_through=OFF, and innodb_data_file_buffering=ON. Note: fsync() or fdatasync() will only be disabled if the separate parameter debug_no_sync (in the code, my_disable_sync) is set. In mariadb-backup, the parameter innodb_flush_method will be ignored. The Boolean parameters can be modified by SET GLOBAL while the server is running. This will require reopening the ib_logfile0 or all currently open InnoDB data files. We will open files straight in O_DSYNC or O_SYNC mode when applicable. Data files we will try to open straight in O_DIRECT mode when the page size is at least 4096 bytes. For atomically creating data files, we will invoke os_file_set_nocache() to enable O_DIRECT afterwards, because O_DIRECT is not supported on some file systems. We will also continue to invoke os_file_set_nocache() on ib_logfile0 when innodb_log_file_buffering=OFF can be fulfilled. For reopening the ib_logfile0, we use the same logic that was developed for online log resizing and reused for updates of innodb_log_file_buffering. Reopening all data files is implemented in the new function fil_space_t::reopen_all(). Reviewed by: Vladislav Vaintroub Tested by: Matthias Leich
-
Marko Mäkelä authored
Before commit 6112853c in MySQL 4.1.1 introduced the parameter innodb_file_per_table, all InnoDB data was written to the InnoDB system tablespace (often named ibdata1). A serious design problem is that once the system tablespace has grown to some size, it cannot shrink even if the data inside it has been deleted. There are also other design problems, such as the server hang MDEV-29930 that should only be possible when using innodb_file_per_table=0 and innodb_undo_tablespaces=0 (storing both tables and undo logs in the InnoDB system tablespace). The parameter innodb_change_buffering was deprecated in commit b5852ffb. Starting with commit baf276e6 (MDEV-19229) the number of innodb_undo_tablespaces can be increased, so that the undo logs can be moved out of the system tablespace of an existing installation. If all these things (tables, undo logs, and the change buffer) are removed from the InnoDB system tablespace, the only variable-size data structure inside it is the InnoDB data dictionary. DDL operations on .ibd files was optimized in commit 86dc7b4d (MDEV-24626). That should have removed any thinkable performance advantage of using innodb_file_per_table=0. Since there should be no benefit of setting innodb_file_per_table=0, the parameter should be deprecated. Starting with MySQL 5.6 and MariaDB Server 10.0, the default value is innodb_file_per_table=1.
-
Sergei Golubchik authored
don't include my_progname in the error message, my_error starts from it automatically, resulting in, like /usr/bin/mysqladmin: Notice: /usr/bin/mysqladmin is deprecated and will be removed in a future release, use command 'mariadb-admin' and remove "Notice" so that the problem description would directly follow the executable name. make the check to work when the executable is in the PATH (so, invoked simply like 'mysql' and thus readlink cannot find it) fix the check in mysql_install_db and mysql_secure_installation to not print the warning if the intermediate path contains "mysql" substring add this message also to * mysql_waitpid * mysql_convert_table_format * mysql_find_rows * mysql_setpermissions * mysqlaccess * mysqld_multi * mysqld_safe * mysqldumpslow * mysqlhotcopy * mysql_ldb Closes #2273
-
- 24 Dec, 2022 8 commits
-
-
Daniel Black authored
Eventually mysql symlinks will go away, as MariaDB and MySQL keep diverging and we do not want to make it impossible to install MariaDB and MySQL side-by-side when users want it. It also useful if people start using MariaDB tools with MariaDB. If the exe doesn't begine with "mariadb" or is a symlink, print a warning to use the resolved name. In my_readlink, add check on my_thread_var as its used by comp_err and other build utils that also use my_init.
-
Sergei Golubchik authored
including patches from Andrei Elkin
-
Sergei Golubchik authored
try to make them less confusing for users. Hopefully, if the version string will be changed like - mariadb Ver 15.1 Distrib 10.11.2-MariaDB for Linux (x86_64) + mariadb from 10.11.2-MariaDB, client 15.1 for Linux (x86_64) users will be less inclined to reply "15.1" to the question "what mariadb version are you using?"
-
Sergei Golubchik authored
it should now always be /path/to/exe Ver <tool version> Distrib <server version> for <OS> (<ARCH>) in all tools and clients
-
Sergei Golubchik authored
SUPER privilege used to allow various actions that were alternatively allowed by one of BINLOG ADMIN, BINLOG MONITOR, BINLOG REPLAY, CONNECTION ADMIN, FEDERATED ADMIN, REPL MASTER ADMIN, REPL SLAVE ADMIN, SET USER, SLAVE MONITOR. Now SUPER no longer does that, one has to grant one of the fine-grained privileges above to be to perform corresponding actions. On upgrade from MariaDB versions 10.11 and below all the privileges above are granted automatically if the user has SUPER. As a side-effect, such an upgrade will allow SUPER-user to run SHOW BINLOG EVENTS, SHOW RELAYLOG EVENTS, SHOW SLAVE HOSTS, even if he wasn't able to do it before the upgrade.
-
Sergei Golubchik authored
-
Sergei Golubchik authored
no longer needed, MySQL replication was fixed meanwhile. client code still can recognize and strip the prefix though.
-
Vicențiu Ciorbaru authored
-
- 23 Dec, 2022 3 commits
-
-
Yuchen Pei authored
The conn_kind, which stands for "connection kind", is no longer useful because the HandlerSocket support is deleted and Spider now has only one connection kind, SPIDER_CONN_KIND_MYSQL. Remove conn_kind and related code. Signed-off-by:
Yuchen Pei <yuchen.pei@mariadb.com> Reviewed-by:
Nayuta Yanagisawa <nayuta.yanagisawa@mariadb.com>
-
Yuchen Pei authored
Produced using the following command unifdef -UITEM_FUNC_TIMESTAMPDIFF_ARE_PUBLIC -m storage/spider/spd_* Signed-off-by:
Yuchen Pei <yuchen.pei@mariadb.com> Reviewed-by: nayuta.yanagisawa@mariadb.com
-
Yuchen Pei authored
unifdef -DSPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR -m storage/spider/*.{cc,h} and removing the definition manually. Signed-off-by:
Yuchen Pei <yuchen.pei@mariadb.com> Reviewed-by:
Nayuta Yanagisawa <nayuta.yanagisawa@mariadb.com>
-
- 20 Dec, 2022 3 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
spider_rewrite plugin is not in 11.0. spider initialization code used "11.0" for "in the distant future", but suddenly it's now spider tests didn't expect anything beyond 10.x
-
Sergei Golubchik authored
-
- 16 Dec, 2022 7 commits
-
-
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
-
- 15 Dec, 2022 6 commits
-
-
Marko Mäkelä authored
commit_try_rebuild(): Only invoke trx_t::drop_table_statistics() if both InnoDB statistics tables are accessible (and exclusively locked by the current transaction). This avoids a crash due to ut_a(sym_node->table != NULL) in pars_retrieve_table_def(). The crash was repeated on a partial copy of a MariaDB 10.3 data directory that lacked the *.ibd files for the statistics tables.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
fil_space_t::flush<false>(): If the CLOSING flag is set, the file may already have been closed, resulting in EBADF being returned by fdatasync(). In any case, the thread that had set the flag should take care of invoking os_file_flush_func(). The crash occurred during the execution of FLUSH TABLES...FOR EXPORT. Tested by: Matthias Leich
-
Daniel Black authored
-
Daniel Black authored
-
Daniel Black authored
-
- 14 Dec, 2022 3 commits
-
-
Daniel Black authored
-
Daniel Black authored
-
Daniel Black authored
-