- 30 Mar, 2020 4 commits
-
-
Thirunarayanan Balathandayuthapani authored
partition does rebuild - In ha_innobase::commit_inplace_alter_table() assumes that all partition should do the same kind of alter operations. During DDL, if one partition requires table rebuild and other partition doesn't need rebuild then all partition should be forced to rebuild.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Varun Gupta authored
MDEV-22019: Sig 11 in next_breadth_first_tab | max_sort_length setting + double GROUP BY leads to crash No need to create a temp table for aggregation if we have encountered some error.
-
- 26 Mar, 2020 2 commits
-
-
Monty authored
MDEV-7861 main.innodb_mysql_lock fails sporadically in buildbot
-
Eugene Kosov authored
Empty comment has a correct length.
-
- 24 Mar, 2020 2 commits
-
-
seppo authored
If async slave thread (slave SQL handler), becomes a BF victim, it may occasionally happen that rollbacker thread is used to carry out the rollback instead of the async slave thread. This can happen, if async slave thread has flagged "idle" state when BF thread tries to figure out how to kill the victim. The issue was possible to test by using a galera cluster as slave for external master, and issuing high load of conflicting writes through async replication and directly against galera cluster nodes. However, a deterministic mtr test for the "conflict window" has not yet been worked on. The fix, in this patch makes sure that async slave thread state is never set to IDLE. This prevents the rollbacker thread to intervene. The wsrep_query_state change was refactored to happen by dedicated function to make controlling the idle state change in one place.
-
Igor Babaev authored
This bug could cause a crash for any query that used a derived table/view/CTE whose specification was a SELECT with a GROUP BY clause and a FROM list containing 32 or more table references. The problem appeared only in the cases when the splitting optimization could be applied to such derived table/view/CTE.
-
- 23 Mar, 2020 6 commits
-
-
Eugene Kosov authored
-
Eugene Kosov authored
MDEV-22006 runtime error: null pointer passed as argument 2, which is declared to never be null in JOIN::copy_ref_ptr_array() Do not memcpy() a zero-length buffer
-
Thirunarayanan Balathandayuthapani authored
redo log during recovery - InnoDB unnecessarily reads the page even though it has fully initialized buffered redo log records. Allow the page initialization redo log to apply for the page in buf_page_get_gen() during recovery. - Renamed buf_page_get_gen() to buf_page_get_low() - Newly added buf_page_get_gen() will check for buffered redo log for the particular page id during recovery - Added new function buf_page_mtr_lock() which basically latches the page for the given latch type. - recv_recovery_create_page() is inline function which creates a page if it has page initialization redo log records.
-
Eugene Kosov authored
MDEV-19658 UBSAN: runtime error: load of value 2779096485, which is not a valid value for type 'enum_binlog_format' This is an uninitialized read. THD::THD: initialize current_stmt_binlog_format member
-
Vladislav Vaintroub authored
Update submodule, change the source file list rename CACHE_LINE_SIZE in ut0counter, so it does not conflics with rocksdb sources, which also defines this constant now.
-
Alice Sherepa authored
-
- 21 Mar, 2020 4 commits
-
-
Eugene Kosov authored
-
Eugene Kosov authored
simplify fix field_ref_zero: make bigger buf_is_zeroes(): remove a loop and check in one go
-
Eugene Kosov authored
buf_is_zeroes(): stop assuming that argument buffer size is always a multiply of 4096. And thus stop reading past that buffer.
-
Marko Mäkelä authored
-
- 20 Mar, 2020 12 commits
-
-
Marko Mäkelä authored
-
Eugene Kosov authored
Making a linked list of dtuple_t is needed only for inserting records. It's better to store tuples in a non-intrusive container to not affect all other use cases of dtuple_t dtuple_t::tuple_list: removed, it was 2 * sizeof(void*) bytes ins_node_t::entry_list: now it's std::vector<dtuple_t*> ins_node_t::entry: now it's std::vector<dtuple_t*>::iterator DBUG_EXECUTE_IF("row_ins_skip_sec": this dead code removed
-
Eugene Kosov authored
-
Eugene Kosov authored
move span.h to a proper place to make it available for the whole server Reformat it. Constuctors from a contigous container are fixed to use cont.data() instead of cont.begin() span<>::index_type is replaced with span<>::size_type
-
Eugene Kosov authored
In my micro-benchmarks memcmp(4196) 3 times faster than old implementation. Also, it's generally better to use as less reinterpret_casts<> as possible. buf_is_zeroes(): renamed from buf_page_is_zeroes() and argument changed to span<> for convenience. st_::span<T>::const_iterator: fixed page_zip-verify_checksum(): make argument byte* instead of void*
-
Igor Babaev authored
prepared statement The method Item_func_in::build_clone() that builds a clone item for an Item_func_in item first calls a generic method Item_func::build_item() that builds the the clones for the arguments of the Item_func_in item to be cloned, creates a copy of the Item_func_in object and attaches the clones for the arguments to this copy. Then the method Item_func_in::build_clone() makes the copy fully independent on the copied object in order to guarantee a proper destruction of the clone. The fact is the copy of the Item_func_in object is registered as any other item object and should be destructed as any other item object. If the method Item_func::build_item fails to build a clone of an argument then it returns 0. In this case no copy of the Item_func_in object should be created. Otherwise the finalizing actions for this copy would not be performed and the copy would remain in a state that would prevent its proper destruction. The code of Item_func_in::build_clone() before this patch created the copy of the Item_func_in object before cloning the argument items. If this cloning failed the server crashed when trying to destruct the copy item. The code of Item_row::build_clone() was changed similarly to the code of Item_func::build_clone though this code could not cause any problems.
-
Marko Mäkelä authored
Also, clean up the test innodb_gis.geometry a little further.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Remove CREATE/DROP database. Remove some unnecessary suppressions, replacements, and SQL statements. Populate tables via have_sequence.inc to avoid the creation of explicit InnoDB record locks in INSERT...SELECT. This will remove some gaps in AUTO_INCREMENT values.
-
Marko Mäkelä authored
After MDEV-12353, the consistency check that I originally added for commit 1b9fe0bb (InnoDB Plugin for MySQL 5.1) started randomly failing. It turns out that the IMPORT TABLESPACE code was always incorrect: it did not update the (redundantly stored) tablespace ID in index tree root pages. It only does that for page headers and BLOB pointers. PageConverter::update_index_page(): Update the tablespace ID in the BTR_SEG_TOP and BTR_SEG_LEAF of index root pages.
-
Marko Mäkelä authored
-
Alexander Barkov authored
The problem happened in these line: uval0= (ulonglong) (val0_negative ? -val0 : val0); uval1= (ulonglong) (val1_negative ? -val1 : val1); return check_integer_overflow(val0_negative ? -(longlong) res : res, !val0_negative); when unary minus was performed on -9223372036854775808. This behavior is undefined in C/C++.
-
- 19 Mar, 2020 5 commits
-
-
Marko Mäkelä authored
Several macros such as sint2korr() and uint4korr() are using the arithmetic + operator while a bitwise or operator would suffice. GCC 5 and clang 5 and later can detect patterns consisting of bitwise or and shifts by multiples of 8 bits, such as those used in the InnoDB function mach_read_from_4(). They actually translate that verbose low-level code into high-level machine language (i486 bswap instruction or fused into the Haswell movbe instruction). We should do the same for MariaDB Server code that is outside InnoDB. Note: The Microsoft C compiler is lacking this optimization. There, we might consider using _byteswap_ushort(), _byteswap_ulong(), _byteswap_uint64(). But, those would lead to unaligned reads, which are bad for reasons stated in MDEV-20277. Besides, outside InnoDB, most data is already being stored in the native little-endian format of that compiler.
-
Marko Mäkelä authored
fil_delete_tablespace(): Remove the unused parameter drop_ahi, and add the parameter if_exists=false. We want to suppress error messages if we know that the tablespace has been discarded. dict_table_rename_in_cache(): Pass the new parameter to fil_delete_tablespace(), that is, do not complain about missing tablespace if the tablespace has been discarded. row_make_new_pathname(): Declare as static. row_drop_table_for_mysql(): Tolerate !table->data_dir_path when the tablespace has been discarded. row_rename_table_for_mysql(): Skip part of the RENAME TABLE when fil_space_get_first_path() returns NULL.
-
Marko Mäkelä authored
buf_pool_resize(): Simplify the fault injection for innodb.buf_pool_resize_oom. innodb.buf_pool_resize_oom: Use a small buffer pool. innodb.innodb_buffer_pool_load_now: Make use of the sequence engine, to avoid creating explicit InnoDB record locks. Clean up the accesses to information_schema.innodb_buffer_page_lru.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 18 Mar, 2020 4 commits
-
-
Vicențiu Ciorbaru authored
-
Alexey Botchkov authored
Tests fixed. MBR::Within() function fixed.
-
Thirunarayanan Balathandayuthapani authored
- This issue is caused by MDEV-19176 (bba59abb). - Problem is that there is miscalculation of available memory during recovery if innodb_buffer_pool_instances > 1. - Ignore the buffer pool instance while calculating available_memory - Removed recv_n_pool_free_frames variable and use buf_pool_get_n_pages() instead.
-
Oleksandr Byelkin authored
-
- 17 Mar, 2020 1 commit
-
-
Marko Mäkelä authored
Temporary tables are typically short-lived, and temporary tables are assumed to be accessed only by the thread that is handling the owning connection. Hence, they must not be subject to defragmenting. ha_innobase::optimize(): Do not add temporary tables to the defragment_table() queue.
-