- 08 Apr, 2019 2 commits
-
-
Marko Mäkelä authored
On Linux, <fcntl.h> declares open(2) as having a nonnull first argument. In GCC 8, if a function with nonnull argument is called, that argument will be silently assumed to nonnull along the same code path. Hence, later nullness checks for this argument can be optimized away. Similar to MDEV-15587, the fix is to ensure that functions with nonnull arguments are not being called with NULL. This bug caused a crash in mysqlbinlog, which was invoking create_temp_file() with the argument dir=NULL. The affected test was binlog.binlog_mysqlbinlog_base64. It would display the following message before crashing: mysqlbinlog: O_TMPFILE is not supported on (null) (disabling future attempts) Segmentation fault
-
Marko Mäkelä authored
-
- 07 Apr, 2019 4 commits
-
-
Daniel Bartholomew authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This is a follow-up to MDEV-18733. As part of that fix, we made dict_check_sys_tables() skip tables that would be dropped by row_mysql_drop_garbage_tables(). DICT_ERR_IGNORE_DROP: A new mode where the file should not be attempted to be opened. dict_load_tablespace(): Do not try to load the tablespace if DICT_ERR_IGNORE_DROP has been specified. row_mysql_drop_garbage_tables(): Pass the DICT_ERR_IGNORE_DROP mode. fil_space_for_table_exists_in_mem(): Remove a parameter. The only caller that passed print_error_if_does_not_exist=true was row_drop_single_table_tablespace().
-
Marko Mäkelä authored
-
- 06 Apr, 2019 14 commits
-
-
Marko Mäkelä authored
The recv_sys data structures are accessed not only from the thread that executes InnoDB plugin initialization, but also from the InnoDB I/O threads, which can invoke recv_recover_page(). Assert that sufficient concurrency control is in place. Some code was accessing recv_sys data structures without holding recv_sys->mutex. recv_recover_page(bpage): Refactor the call from buf_page_io_complete() into a separate function that performs necessary steps. The main thread was unnecessarily releasing and reacquiring recv_sys->mutex. recv_recover_page(block,mtr,recv_addr): Pass more parameters from the caller. Avoid redundant lookups and computations. Eliminate some redundant variables. recv_get_fil_addr_struct(): Assert that recv_sys->mutex is being held. That was not always the case! recv_scan_log_recs(): Acquire recv_sys->mutex for the whole duration of the function. (While we are scanning and buffering redo log records, no pages can be read in.) recv_read_in_area(): Properly protect access with recv_sys->mutex. recv_apply_hashed_log_recs(): Check recv_addr->state only once, and continuously hold recv_sys->mutex. The mutex will be released and reacquired inside recv_recover_page() and recv_read_in_area(), allowing concurrent processing by buf_page_io_complete() in I/O threads.
-
Marko Mäkelä authored
The record MLOG_INDEX_LOAD is supposed to be written to indicate that some page modifications bypassed redo logging, and that redo logging is now re-enabled. It was not written for fulltext indexes during ALTER TABLE. row_merge_write_redo(): Declare globally. Assert that the index is neither a spatial nor fulltext index. recv_mlog_index_load(): Observe a MLOG_INDEX_LOAD operation. recv_parse_log_recs(): Handle MLOG_INDEX_LOAD also in multi-record mini-transactions. Because of this omission, we should keep writing MLOG_INDEX_LOAD in single-record mini-transactions, because older versions of Mariabackup would fail. row_fts_merge_insert(): Write MLOG_INDEX_LOAD for the auxiliary tables of fulltext indexes.
-
Marko Mäkelä authored
The record MLOG_ZIP_PAGE_COMPRESS is similar to MLOG_INIT_FILE_PAGE2 that it contains all the information needed to initialize the page. Like for the other record, do initialize the entire page on recovery.
-
Marko Mäkelä authored
The page_size argument to buf_page_get_gen() only matters when the page is going to be loaded into the buffer pool. Allow callers to pass a dummy parameter when using BUF_GET_IF_IN_POOL (which would return NULL if the block is not in the buffer pool).
-
Marko Mäkelä authored
btr_root_get(): Ignore the root->page.encrypted flag. The purpose of this flag is questionable since commit 8c43f963. btr_validate_index(): Avoid crash if btr_root_get() returns NULL.
-
Marko Mäkelä authored
btr_free_root(): Add the parameter bool invalidate. btr_free_root_invalidate(): Remove.
-
Marko Mäkelä authored
fsp_apply_init_file_page(): Renamed from fsp_init_file_page_low(). fsp_parse_init_file_page(): Remove. The redo log record has no parameters.
-
Marko Mäkelä authored
Normally, InnoDB is not in the process of executing crash recovery. Provide a hint to the compiler that the recovery-related code paths are rarely executed.
-
Marko Mäkelä authored
-
Teemu Ollakka authored
- Changed replaying to always allocate a separate THD object for applying log events. This is to avoid tampering original THD state during replay process. - Return success from sp_instr_stmt::exec_core() if replaying succeeds. - Do not push warnings/errors into diagnostics area if the transaction must be replayed. This is to avoid reporting transient errors to the client. Added two tests galera_sp_bf_abort, galera_sp_insert_parallel. Wsrep-lib position updated.
-
Jan Lindström authored
deleted: mysql-test/suite/galera/r/MW-86.result deleted: mysql-test/suite/galera/r/mysql-wsrep#216.result modified: mysql-test/suite/galera/t/GCF-1081.test modified: mysql-test/suite/galera_3nodes_sr/r/GCF-832.result modified: mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test modified: mysql-test/suite/galera_3nodes_sr/t/GCF-810B.test modified: mysql-test/suite/galera_3nodes_sr/t/GCF-810C.test modified: mysql-test/suite/galera_3nodes_sr/t/GCF-832.test modified: mysql-test/suite/galera_sr/r/mysql-wsrep-features#35.result modified: mysql-test/suite/galera_sr/t/mysql-wsrep-features#35.test
-
Sergei Golubchik authored
-
Alexander Barkov authored
-
Igor Babaev authored
If SUBS_IN_TO_EXISTS strategy has been chosen for a subquery then additional conditions are injected into WHERE/ON/HAVING of this subquery and it may happen that test_quick_select() invoked from JOIN::make_range_rowid_filters() discovers impossible range. This must be checked.
-
- 05 Apr, 2019 6 commits
-
-
Igor Babaev authored
With INFORMATION_SCHEMA set as the default database the check that a table referred in the processed query is defined in INORMATION_SCHEMA must be postponed until all CTE names can be identified.
-
Galina Shalygina authored
Temporary table is defined with the view field in HAVING. Item_direct_view_ref for this field is dropped and that causes error. To fix it Item_direct_view_ref::remove_item_direct_ref() is added.
-
Galina Shalygina authored
The bug occurs because of the wrong pushdown of constant function defined with subquery from HAVING into WHERE. Subqueries can't be pushed into WHERE. To fix it with_subquery() call is added to check if the function contains subquery.
-
Alexander Barkov authored
-
Marko Mäkelä authored
-
Sergei Golubchik authored
-
- 04 Apr, 2019 6 commits
-
-
Igor Babaev authored
A syntax error was reported for any INSERT statement with explicit partition selection it if i used a column list. Fixed by saving the parsing place before parsing the clause for explicit partition selection and restoring it when the clause has been parsed.
-
Marko Mäkelä authored
-
Galina Shalygina authored
This bug is caused by pushdown from HAVING into WHERE. It appears because condition that is pushed wasn't fixed. It is also discovered that condition pushdown from HAVING into WHERE is done wrong. There is no need to build clones for some conditions that can be pushed. They can be simply moved from HAVING into WHERE without cloning. build_pushable_cond_for_having_pushdown(), remove_pushed_top_conjuncts_for_having() methods are changed. It is found that there is no transformation made for fields of pushed condition. field_transformer_for_having_pushdown transformer is added. New tests are added. Some comments are changed.
-
Marko Mäkelä authored
-
Monty authored
Fixed by adding more rows to a table Other things: - Speed up index_merge tests 20% by adding begin/commit around loops that generated rows.
-
Marko Mäkelä authored
-
- 03 Apr, 2019 8 commits
-
-
Marko Mäkelä authored
Normally, InnoDB will create temporary table names of the form #sql-ibNNNN, and with innodb_safe_truncate=OFF, #sql-ibNNNN-MMMM.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
If InnoDB crash recovery was needed, the InnoDB function srv_start() would invoke extra validation, reading something from every InnoDB data file. This should be unnecessary now that MDEV-14717 made RENAME operations crash-safe inside InnoDB (which can be disabled in MariaDB 10.2 by setting innodb_safe_truncate=OFF). dict_check_sys_tables(): Skip tables that would be dropped by row_mysql_drop_garbage_tables(). Perform extra validation only if innodb_safe_truncate=OFF, innodb_force_recovery=0 and crash recovery was needed. dict_load_table_one(): Validate the root page of the table. In this way, we can deny access to corrupted or mismatching tables not only after crash recovery, but also after a clean shutdown.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Eugene Kosov authored
Just rename index in data dictionary and in InnoDB cache when it's possible. Introduce ALTER_INDEX_RENAME for that purpose so that engines can optimize such operation. Unused code between macro MYSQL_RENAME_INDEX was removed. compare_keys_but_name(): compare index definitions except for index names Alter_inplace_info::rename_keys: ha_innobase_inplace_ctx::rename_keys: vector of rename indexes fill_alter_inplace_info():: fills Alter_inplace_info::rename_keys
-