- 27 Sep, 2019 8 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Thanks to Eugene Kosov for noting that the fix is incomplete. It turns out that on instant DROP/reorder column (MDEV-15562), we must always write the metadata record, even though the table was empty. Alternatively, we should guarantee that all undo log records for the table have been purged. (Attempting to do that by updating table_id leads to other problems; see commit 1b31d885.) It would be tempting to remove dict_index_t::clear_instant_alter() altogether, but it turns that we need that when the instant ALTER TABLE operation of a first-time DROP COLUMN is being rolled back. innobase_instant_try(): Clarify a comment. Purge never calls dict_index_t::clear_instant_alter(), but it may invoke dict_index_t::clear_instant_add(). On first-time instant DROP/reorder, always write a metadata record, even if the table is empty.
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
The test encryption.innodb-redo-badkey was accidentally disabled until commit 23657a21 enabled it recently. Once it was enabled, it started failing randomly. recv_recover_corrupt_page(): Do not assume that any redo log exists for the page. A page may be unnecessarily read by read-ahead. When noting the corruption, reset recv_addr->state to RECV_PROCESSED, so that even if the same page is re-read again, we will only decrement recv_sys->n_addrs once.
-
Marko Mäkelä authored
Spotted by Thirunarayanan Balathandayuthapani.
-
Marko Mäkelä authored
rw_lock_own(), rw_lock_own_flagged(): Traverse the rw_lock_t::debug_list only after quickly checking if the thread is holding X-latch or SX-latch.
-
Marko Mäkelä authored
The test innodb_fts.fulltext_table_evict was only creating 1000 tables with fulltext indexes, only to check that no tables with fulltext indexes are being evicted. The reason why tables containing fulltext indexes cannot be evicted is that fts_optimize_init() invokes dict_table_prevent_eviction().
-
Marko Mäkelä authored
For CMAKE_BUILD_TYPE=Debug, the default MYSQL_MAINTAINER_MODE=AUTO implies -Werror along with other flags in cmake/maintainer.cmake, which would break the debug builds when CMAKE_CXX_FLAGS include -O2. This fix includes a backport of 6dd3f240 from MariaDB 10.3.
-
- 26 Sep, 2019 9 commits
-
-
Marko Mäkelä authored
The crash scenario is as follows: (1) A non-empty table exists. (2) MDEV-15562 instant ADD/DROP/reorder has been invoked. (3) Some purgeable undo log exists for the table. (4) The table becomes empty, containing not even any delete-marked records, only containing the hidden metadata record that was added in (2). (5) An instant ADD/DROP/reorder column is executed, and the table is emptied and the (2) metadata removed. (6) Purge processes an undo log record from (3), which will refer to a non-existent clustered index field, because the metadata that was created in (2) was remoeved in (5). We fix this by adjusting step (5) so that we will never remove the MDEV-15562-style metadata record. Removing the MDEV-11369 metadata record (instant ADD COLUMN to the end of the table) is completely fine at any time when the table becomes empty, because dict_index_t::n_fields will remain unchanged. innobase_instant_try(): Never remove the MDEV-15562 metadata record. page_cur_delete_rec(): Do not reset FIL_PAGE_TYPE when the MDEV-15562 metadata record is being removed as part of btr_cur_pessimistic_update() invoked by innobase_instant_try().
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Always initialize ScopedStatementReplication::saved_binlog_format, so that GCC cannot emit a bogus warning about ScopedStatementReplication::~ScopedStatementReplication() using the variable. The code was originally introduced in commit d998da03.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
lock_print_info::operator(): Do not dereference purge_sys.query in case it is NULL. We would not initialize purge_sys if innodb_force_recovery is set to 5 or 6. The test case will be added by merge from 10.2.
-
Marko Mäkelä authored
Test innodb_read_only startup (which will be refused after a crash), and test also innodb_force_recovery=5, and extract some change buffer merge statistics. Omit any statistics about delete (purge) buffering, because purge could happen at any time. Use the sequence storage engine for populating the table.
-
Marko Mäkelä authored
Add a test case. MariaDB Server 10.2 is not affected.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
In MariaDB 10.4.0, commit 09af00cb removed the crash-upgrade logic for the MariaDB 10.2 innodb_safe_truncate=OFF TRUNCATE TABLE (which was the only option between MariaDB 10.2.2 and 10.2.18), but failed to adjust some comments and code. buf_page_io_complete(): Remove a bogus comment about TRUNCATE. dict_recreate_index_tree(): Unused function; remove. fil_space_t::stop_new_ops: Clarify the comment. fil_space_acquire_low(): Remove a bogus comment about TRUNCATE. fil_check_pending_ops(), fil_check_pending_io(): Adjust a warning message. This code is only invoked as part of DISCARD TABLESPACE or DROP TABLE. DROP TABLE is internally used as part of ALTER TABLE, OPTIMIZE TABLE, or TRUNCATE TABLE. RemoteDatafile::create_link_file(): Clarify a comment. ibuf_delete_for_discarded_space(): Clarify the function comment. dict_table_x_lock_indexes(), dict_table_x_unlock_indexes(): Merge with the only remaining caller, row_quiesce_set_state(). page_create_zip(): Remove a bogus comment about TRUNCATE.
-
- 25 Sep, 2019 2 commits
-
-
Marko Mäkelä authored
Eliminate one InnoDB table with 128*16384 rows, and use the sequence engine instead. Also, run everything in a single transaction, to prevent purge from running concurrently unnecessarily. (Starting with MariaDB Server 10.3, purge would reset the DB_TRX_ID after INSERT.)
-
Marko Mäkelä authored
-
- 24 Sep, 2019 10 commits
-
-
Alexander Barkov authored
-
Vicențiu Ciorbaru authored
The arg was introduced as part of 75bcf1f9 to fix a SELinux problem caused by mysqld_safe accessing files it should not be via the my_which function. The root cause for this was fixed in 10.3, via 355ee687 which eliminated the my_which function from mysqld_safe entirely. Thus, in 10.3, this --basedir flag is not necessary.
-
Alexander Barkov authored
-
Alexander Barkov authored
-
Rasmus Johansson authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
btr_block_get(): Remove #ifdef around the definition
-
rantal authored
`elseif` should be `elsif` Closed #1388
-
Alexander Barkov authored
-
Alexander Barkov authored
MDEV-20495 Assertion `precision > 0' failed in decimal_bin_size upon CREATE .. SELECT with zerofilled decimal Also fixes: MDEV-20560 Assertion `precision > 0' failed in decimal_bin_size upon SELECT with MOD short unsigned decimal Changing the way how Item_func_mod calculates its max_length. It now uses decimal_precision(), decimal_scale() and unsigned_flag of its arguments, like all other Item_num_op descendants do.
-
- 23 Sep, 2019 10 commits
-
-
Igor Babaev authored
Shift-Reduce conflicts prevented parsing some queries with subqueries that used set operations when the subqueries occurred in expressions or in IN predicands. The grammar rules for query expression were transformed in order to avoid these conflicts. New grammar rules employ an idea taken from MySQL 8.0.
-
Eugene Kosov authored
memmove() should be used instead of memcpy() for overlapping memory regions. Overlapping memory regions itself here are fine, because code simply removes one element from arbitrary position of an array.
-
Marko Mäkelä authored
Disable MDEV-20576 assertions until MDEV-20595 has been fixed.
-
Varun Gupta authored
Backporting 273d8eb1 Proper fix for disabling warnings in read_statistics_for_table()
-
Michael Widenius authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
The parameter dup_chk_only was always passed as a constant false. Remove the parameter and the dead code related to it.
-
Marko Mäkelä authored
-
- 22 Sep, 2019 1 commit
-
-
Michael Widenius authored
MDEV-20589: Server still crashes in Field::set_warning_truncated_wrong_value - Use dbug_tmp_use_all_columns() to mark that all fields can be used - Remove field->is_stat_field (not needed) - Remove extra arguments to Field::clone() that should not be there - Safety fix for Field::set_warning_truncated_wrong_value() to not crash if table is zero in production builds (We have got crashes several times here so better to be safe than sorry). - Threat wrong character string warnings identical to other field conversion warnings. This removes some warnings we before got from internal conversion errors. There is no good reason why a user would get an error in case of 'key_field='wrong-utf8-string' but not for 'field=wrong-utf8-string'. The old code could also easily give thousands of no-sence warnings for one single statement.
-