- 08 Nov, 2019 10 commits
-
-
Marko Mäkelä authored
The page allocation bitmaps in the extent descriptor pages contain two bits per page: XDES_FREE_BIT and XDES_CLEAN_BIT, which is unused. Simplify read access. xdes_is_free(descr,mtr): Remove. Use !xdes_get_n_used(descr) instead. xdes_is_free(): Replaces xdes_get_bit(), xdes_mtr_get_bit(). xdes_find_free(): Replaces xdes_find_bit(). fsp_seg_inode_page_get_nth_inode(): Remove the redundant parameters physical_size, mtr. fsp_seg_inode_page_find_used(), fsp_seg_inode_page_find_free(): Remove the redundant parameter mtr.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Since commit 5d596064 fil_page_type_is_index() expects uint16_t, not ulint.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
fsp_alloc_seg_inode_page(): Ever since commit 3926673c all newly allocated pages are zero-initialized. Assert that this is the case for the FSEG_ID fields. (Side note: before that fix, other parts of the pages could contain nonzero garbage.) btr_store_big_rec_extern_fields(): Remove the redundant initialization of the most significant 32 bits of BTR_EXTERN_LEN. InnoDB never supported BLOBs that are longer than 4GiB. In fact, dtuple_convert_big_rec() would write emit an error message if a clustered index record tuple would exceed 1,000,000,000 bytes in length.
-
Marko Mäkelä authored
PageConverter::update_index_page(): Invoke lower-level writes directly.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
The function mach_read_ulint() is a wrapper for the lower-level functions mach_read_from_1(), mach_read_from_2(), mach_read_from_8(). Invoke those functions directly, for better readability of the code. mtr_t::read_ulint(), mtr_read_ulint(): Remove. Yes, we will lose the ability to assert that the read is covered by the mini-transaction. We would still check that on writes, and any writes that wrongly bypass mini-transaction logging would likely be caught by stress testing with Mariabackup.
-
Marko Mäkelä authored
Always use the MLOG_MEMSET record for writing FIL_NULL, because it is more compact.
-
- 07 Nov, 2019 5 commits
-
-
Aleksey Midenkov authored
-
Aleksey Midenkov authored
MDEV-17553 Enable setting start datetime for interval partitioned history of system versioned tables * Explicit STARTS syntax * SHOW CREATE * Default STARTS rounding depending on INTERVAL type * Warn when STARTS timestamp is later than query time * Fix uninitialized Lex->create_last_non_select_table under mysql_unpack_partition() Default STARTS rounding depending on INTERVAL type If STARTS clause is omitted, default one is assigned with value derived from query timestamp. The rounding is done on STARTS value depending on INTERVAL type: SECOND: no rounding is done; MINUTE: timestamp seconds is set to 0; HOUR: timestamp seconds and minutes are set to 0; DAY, WEEK, MONTH and YEAR: timestamp seconds, minutes and hours are set to 0 (the date of rotation is kept as current date).
-
Marko Mäkelä authored
A conflict between MDEV-19514 (b42294bc) and MDEV-20934 (d7a24017) was resolved. We will not invoke the function ibuf_delete_recs() from ibuf_merge_or_delete_for_page(). Instead, we will add that logic to the function ibuf_read_merge_pages().
-
Oleksandr Byelkin authored
-
Marko Mäkelä authored
-
- 06 Nov, 2019 8 commits
-
-
Marko Mäkelä authored
Due to MDEV-12288, the slow shutdown in MariaDB 10.3 will include resetting the DB_TRX_ID for all inserted records. This might cause the 60-second shutdown_server timeout to be exceeded. Let us wait for the purge to complete before initiating slow shutdown.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
dict_index_add_to_cache(): Make the 'index' a reference to a pointer, so that the caller will avoid the expensive call to dict_index_get_if_in_cache_low().
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Due to a data corruption bug that may have occurred a long time earlier (possibly involving physical backup and MySQL Bug #69122, which was addressed in commit f166ec71) it seems possible that the InnoDB change buffer might end up containing entries, while no buffered changes exist according to the change buffer bitmap pages in the .ibd files. ibuf_delete_recs(): New function, to be invoked on slow shutdown only. Remove all buffered changes for a specific page. ibuf_merge_or_delete_for_page(): If the change buffer bitmap is clean and a slow shutdown is in progress, invoke ibuf_delete_recs(). We do not want to do that during normal operation, due to the additional overhead that is involved. The bitmap page should be consistent with the change buffer in the first place.
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
InnoDB: Assertion failure in file .../dict/dict0dict.cc line ... InnoDB: Failing assertion: table->can_be_evicted This fixes a regression that was caused by the fix of MDEV-20621 (commit a41d4297). MySQL 5.6 (and MariaDB 10.0) introduced eviction of tables from the InnoDB data dictionary cache. Tables that are connected to FOREIGN KEY constraints or FULLTEXT INDEX are exempt of the eviction. With the problematic change, a table that would already be exempt from eviction due to FOREIGN KEY would cause the problem if there also was a FULLTEXT INDEX defined on it. dict_load_table(): Only prevent eviction if table->can_be_evicted holds.
-
- 05 Nov, 2019 8 commits
-
-
Alexander Barkov authored
MDEV-20985 Add LEX methods stmt_drop_{function|procedure}() and stmt_alter_{function|procedure}_start() Adding a few helper LEX methods, to unify sql_yacc.yy and sql_yacc_ora.yy easier
-
Daniel Bartholomew authored
-
Daniel Bartholomew authored
-
Daniel Bartholomew authored
-
Daniel Bartholomew authored
-
Daniel Bartholomew authored
-
Alexander Barkov authored
This is a logically better position. Also, this makes the code in sql_yacc.yy and sql_yacc_ora.yy look more similar.
-
Alexander Barkov authored
-
- 04 Nov, 2019 8 commits
-
-
Vladislav Vaintroub authored
Do not rely on existence of CMakeFiles/${target}.dir directory existence It is not there for custom targets in Ninja build.
-
Sergei Golubchik authored
Don't save/restore HP_INFO as it could be changed by a concurrent thread. different parts of HP_INFO are protected by different mutexes and the mutex that protect most of the HP_INFO does not protect its open_list data. As a bonus, make heap_check_heap() to take const HP_INFO* and not make any changes there whatsoever.
-
Marko Mäkelä authored
Something was wrong with the removal of pointer indirection, because on 32-bit Windows we got crash recovery failures. Curiously, WITH_ASAN of a 32-bit debug build did not notice anything. This reverts a part of commit b7fc2c89. We have a 2MiB recv_sys.buf for the initial buffering. The minimum size of log_sys.buf would be 16MiB, and that buffer should be practically unused during recovery. If the buffer pool size is measured in gigabytes, it would indeed make sense to use the buffer pool for the recovered log records, perhaps after we have run out of log_sys.buf. FIXME: allow the entire buf_block_t::frame to be used for buffered log records, and remove MEM_HEAP_FOR_RECV_SYS. For example, use buf_page_t::list or buf_page_t::LRU for keeping track of memory that was allocated for recovery? Most members of buf_block_t (except buf_block_t::frame) are unused when block->page.state == BUF_BLOCK_MEMORY.
-
Marko Mäkelä authored
dict_table_rename_in_cache(): Use strcpy() instead of strncpy(), because they are known to be equivalent in this case (the length of old_name was already validated). mariabackup: Invoke strncpy() with one less than the buffer size, and explicitly add NUL as the last byte of the buffer.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Follow-up to commit 8965ae27: always initialize found_group.
-
Marko Mäkelä authored
recv_t, recv_t::data_t: Define constructors that copy the log records Ideally, we should remove recv_sys.buf, RECV_DATA_BLOCK_SIZE, and recv_sys_justify_left_parsing_buf(), and let the recv_sys.pages point directly to a buffer of parsed redo log records. The RECV_PARSING_BUF_SIZE (size of recv_sys.buf) is only 2MiB, while the minimum innodb_log_buffer_size (size of log_sys.buf) is 16MiB, and log_sys.buf is unused during redo log apply!
-
Marko Mäkelä authored
Except for fil_name_process(), which invokes os_normalize_path(), the redo log record parser will not modify the redo log records. Add const qualifiers accordingly.
-
- 03 Nov, 2019 1 commit
-
-
Sergei Golubchik authored
followup to 00c3a288
-