- 04 Aug, 2023 3 commits
-
-
Marko Mäkelä authored
trx_commit_complete_for_mysql(): Remove some conditions. We will rely on trx_flush_log_if_needed(). trx_t::must_flush_log_later: Remove. trx_commit_complete_for_mysql() no longer checks for this. trx_flush_log_if_needed_low(): Renamed to trx_flush_log_if_needed(). Assert that innodb_flush_log_at_trx_commit!=0 was checked by the caller and that the transaction is not in XA PREPARE state. trx_prepare(): Invoke log_write_up_to() directly if needed.
-
Marko Mäkelä authored
trx_commit_cleanup(): Clean up any temporary undo log. Replaces trx_undo_commit_cleanup() and trx_undo_seg_free(). trx_write_serialisation_history(): Commit the mini-transaction. Do not touch temporary undo logs. Assume that a persistent rollback segment has been assigned. trx_serialise(): Merged into trx_write_serialisation_history(). trx_t::commit_low(): Correct some comments and assertions. trx_t::commit_persist(): Only invoke commit_low() on a mini-transaction if the persistent state needs to change.
-
Oleksandr Byelkin authored
-
- 02 Aug, 2023 2 commits
-
-
Sergei Golubchik authored
MDEV-31822 ALTER TABLE ENGINE=x started failing instead of producing warning on unsupported TRANSACTIONAL=1 make TRANSACTIONAL table option behave similar to other engine-defined table options. If the engine doesn't suport it: * if specified expicitly in CREATE or ALTER - it's ER_UNKNOWN_OPTION * an error or a warning depending on sql_mode IGNORE_BAD_TABLE_OPTIONS * in ALTER TABLE from the engine that suppors it to the engine that doesn't - silently preserved (no warning) * it is commented out in SHOW CREATE unless IGNORE_BAD_TABLE_OPTIONS
-
Sergei Golubchik authored
* invoke check_expression() for all vcol_info's in mysql_prepare_create_table() to check for FK CASCADE * also check for SET NULL and SET DEFAULT * to check against existing FKs when a vcol is added in ALTER TABLE, old FKs must be added to the new_key_list just like other indexes are * check columns recursively, if vcol1 references vcol2, flags of vcol2 must be taken into account * remove check_table_name_processor(), put that logic under check_vcol_func_processor() to avoid walking the tree twice
-
- 01 Aug, 2023 15 commits
-
-
Sergei Golubchik authored
mark old keys in the ALTER TABLE with the `old` flag, not with the `key_create_info.check_for_duplicate_indexes`. This allows to mark old foreign keys too.
-
Sergei Golubchik authored
to declutter Item_field::check_vcol_func_processor(), move alter_info specific part of it into Alter_info::check_vcol_field()
-
Sergei Golubchik authored
also, prefer Lex_table_name and Lex_ident over LEX_CSTRING
-
Sergei Golubchik authored
-
Sergei Golubchik authored
HA_UNIQUE_CHECK was * only used internally by MyISAM/Aria * only used for internal temporary tables (for DISTINCT) * never saved in frm * saved in MYI/MAD but only for temporary tables * only set, never checked it's safe to remove it and free the bit (there are only 16 of them)
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Petrunia authored
Do not attempt to produce "r_engine_stats" on the temporary (=work) tables. These tables may be - re-created during the query execution - freed during the query execution (This is done e.g. in JOIN::cleanup(), before we produce ANALYZE FORMAT=JSON output). - (Also, make save_explain_data() functions not set handler_for_stats to point to handler objects that do not have handler->handler_stats set. If the storage engine is not collecting handler_stats, it will not have them when we're producing ANALYZE FORMAT=JSON output, either).
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
Marko Mäkelä authored
buf_page_t::write_complete(), buf_page_write_complete(), IORequest::write_complete(): Add a parameter for passing an error code. If an error occurred, we will release the io-fix, buffer-fix and page latch but not reset the oldest_modification field. The block would remain in buf_pool.LRU and possibly buf_pool.flush_list, to be written again later, by buf_flush_page_cleaner(). If all page writes start consistently failing, all write threads should eventually hang in log_free_check() because the log checkpoint cannot be advanced to make room in the circular write-ahead-log ib_logfile0. IORequest::read_complete(): Add a parameter for passing an error code. If a read operation fails, we report the error and discard the page, just like we would do if the page checksum was not validated or the page could not be decrypted. This only affects asynchronous reads, due to linear or random read-ahead or crash recovery. When buf_page_get_low() invokes buf_read_page(), that will be a synchronous read, not involving this code. This was tested by randomly injecting errors in write_io_callback() and read_io_callback(), like this: if (!ut_rnd_interval(100)) cb->m_err= 42;
-
Marko Mäkelä authored
buf_LRU_free_page(): The block may also be in the IBUF_EXIST state when executing the test innodb.innodb_bulk_create_index_debug.
-
Oleksandr Byelkin authored
-
Marko Mäkelä authored
buf_LRU_free_page(): When we are discarding the uncompressed copy of a ROW_FORMAT=COMPRESSED page, buf_page_t::can_relocate() must have ensured that the block descriptor state is one of FREED, UNFIXED, REINIT. Do not overwrite the state with UNFIXED. We do not want to write back pages that were actually freed, and we want to avoid doublewrite for pages that were (re)initialized by log records written since the latest checkpoint. Last but not least, we do not want crashes like those that commit dc1bd180 (MDEV-31386) was supposed to fix. The test innodb_zip.wl5522_zip should typically cover all 3 states. This bug is a regression due to commit aaef2e1d (MDEV-27058).
-
- 31 Jul, 2023 6 commits
-
-
Sergei Golubchik authored
failed SHOW CREATE FUNCTION means we don't dump this function, but should still try to dump all other functions
-
Sergei Golubchik authored
don't construct open ranges from prefix blob keys for < (less than) just as it's already done for > (greater than) because prefix KEY_PART doesn't create prefix Field for blobs (see open_table_from_share() near "Create a new field for the key part"), so stored_field_cmp_to_item() will compare the original field to the value not taking the prefix length into account.
-
Sergei Golubchik authored
-
Aleksey Midenkov authored
This reverts commit add0c01b Duplicates must be avoided in FTS_DOC_ID_INDEX
-
Oleksandr Byelkin authored
-
Marko Mäkelä authored
-
- 30 Jul, 2023 3 commits
-
-
Kristian Nielsen authored
(It's not using include/rpl_init.inc, so it needs to reset the GTID position explicitly). Signed-off-by:
Kristian Nielsen <knielsen@knielsen-hq.org>
-
Kristian Nielsen authored
A simple "SET SESSION gtid_seq_no= DEFAULT" did not work, it would straight up crash the server! Also, explicitly setting gtid_seq_no to 0 gave an error in --gtid-strict-mode=1. Setting to DEFAULT or 0 should disable any prior setting of gtid_seq_no, so that the next transaction is allocated the next GTID in sequence, as normal. Reviewed-by:
Monty <monty@mariadb.org> Signed-off-by:
Kristian Nielsen <knielsen@knielsen-hq.org>
-
Monty authored
-
- 29 Jul, 2023 1 commit
-
-
Julius Goryavsky authored
-
- 28 Jul, 2023 2 commits
-
-
Marko Mäkelä authored
log_sort_flush_list(): Wait for any pending page writes to cease before sorting the buf_pool.flush_list. Starting with commit 22b62eda (MDEV-25113), it is possible that some buf_page_t::oldest_modification_ that we will be comparing in std::sort() will be updated from some value >2 to 1 while we are holding buf_pool.flush_list_mutex. To catch this type of trouble better in the future, we will clean garbage (pages that have been written out) from buf_pool.flush_list while constructing the array for sorting, and check with debug assertions that all blocks that we are copying from the array to the list will be dirty (requiring a writeback) while we sort and copy the array back to buf_pool.flush_list. This failure was observed by chance exactly once when running the test innodb.recovery_memory. It was never reproduced in the same form afterwards. Unrelated to this change, the test does occasionally reproduce a failure to start up InnoDB due to a corrupted page being read in recovery. The ticket MDEV-31791 was filed for that. Tested by: Matthias Leich
-
Marko Mäkelä authored
-
- 27 Jul, 2023 2 commits
-
-
Aleksey Midenkov authored
differently react to SQL_MODE => unusable SHOW CREATE Use abort_on_warning dependent on strict mode over create new table like it is done for copy data and inplace alter.
-
Oleksandr Byelkin authored
-
- 26 Jul, 2023 4 commits
-
-
Oleksandr Byelkin authored
-
Lena Startseva authored
This patch adds for "--ps-protocol" second execution of queries "SELECT". Also in this patch it is added ability to disable/enable (--disable_ps2_protocol/--enable_ps2_protocol) second execution for "--ps-prototocol" in testcases.
-
Geoff Montee authored
-
Lena Startseva authored
MDEV-31407: Add aliases in opt_trace.test for long column name for removing "--disable-view-protocol" Change tests: opt_trace.test opt_trace_index_merge.test opt_trace_ucs2.test
-
- 25 Jul, 2023 2 commits
-
-
Oleksandr Byelkin authored
-
Brandon Nesterenko authored
MDEV-31749 sporadic assert in MDEV-30619 new test If the workers of a parallel replica are busy (potentially with long queues), but the SQL thread has no events left to distribute (so it goes idle), then the next event that comes from the primary will update mi->last_master_timestamp with its timestamp, even if the workers have not yet finished. This patch changes the parallel replica logic which updates last_master_timestamp after idling from using solely sql_thread_caught_up (added in MDEV-29639) to using the latter with rli queued/dequeued event counters. That is, if the queued count is equal to the dequeued count, it means all events have been processed and the replica is considered idle when the driver thread has also distributed all events. Low level details of the commit include - to make a more generalized test for Seconds_Behind_Master on the parallel replica, rpl_delayed_parallel_slave_sbm.test is renamed to rpl_parallel_sbm.test for this purpose. - pause_sql_thread_on_next_event usage was removed with the MDEV-30619 fixes. Rather than remove it, we adapt it to the needs of this test case - added test case to cover SBM spike of relay log read and LMT update that was fixed by MDEV-29639 - rpl_seconds_behind_master_spike.test is made to use the negate_clock_diff_with_master debug eval. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
-