- 19 Nov, 2019 2 commits
-
-
Alexander Barkov authored
On order to unify the two *.yy files easier, this patch collects all different rules to the end of *.yy files, so the rule section looks like this: %% common rules different rules
-
Marko Mäkelä authored
-
- 18 Nov, 2019 4 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
DropIndex, CreateIndex: Remove. The file row0trunc.cc only exists in MariaDB Server 10.3 so that the crash recovery of TRUNCATE TABLE operations from older 10.2 and 10.3 servers will work. This dead code was being used for implementing the MySQL 5.7 WL#6501 TRUNCATE TABLE that was replaced with a backup-safe implementation in MDEV-13564.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
buf_read_ibuf_merge_pages(): Discard any page numbers that are outside the current bounds of the tablespace, by invoking the function ibuf_delete_recs() that was introduced in MDEV-20934. This could avoid an infinite change buffer merge loop on innodb_fast_shutdown=0, because normally the change buffer merge would only be attempted if a page was successfully loaded into the buffer pool. dict_drop_index_tree(): Add the parameter trx_t*. To prevent the DROP TABLE crash, do not invoke btr_free_if_exists() if the entire .ibd file will be dropped. Thus, we will avoid a crash if the BTR_SEG_LEAF or BTR_SEG_TOP of the index is corrupted, and we will also avoid unnecessarily accessing the to-be-dropped tablespace via the buffer pool. In MariaDB 10.2, we disable the DROP TABLE fix if innodb_safe_truncate=0, because the backup-unsafe MySQL 5.7 WL#6501 form of TRUNCATE TABLE requires that the individual pages be freed inside the tablespace.
-
- 17 Nov, 2019 1 commit
-
-
Marko Mäkelä authored
When commit 09af00cb removed the crash-upgrade logic of old TRUNCATE TABLE from MariaDB 10.2 and 10.3, it actually made the return value of dict_drop_index_tree() redundant.
-
- 16 Nov, 2019 2 commits
-
-
Sergei Petrunia authored
-
Alexander Barkov authored
Adding: - new class sp_expr_lex - new grammar rule expr_lex, which includes both reset_lex() and its corresponding restore_lex() Also: - Moving a few methods from LEX to sp_expr_lex. - Moving the code from *.yy to new method sp_expr_lex methods sp_repeat_loop_finalize() and sp_if_expr(). This change makes it easier to edit the related grammar (and makes it easier to unify sql_yacc.yy and sql_yacc_ora.yy later).
-
- 15 Nov, 2019 18 commits
-
-
Vladislav Vaintroub authored
Simplify task_group destructor. No tasks must be running or queued into task group is being destroyed.
-
Marko Mäkelä authored
Add missing static qualifiers.
-
Sergei Petrunia authored
Fix partitioning and DS-MRR to work together - In ha_partition::index_end(): take into account that ha_innobase (and other engines using DS-MRR) will have inited=RND when initialized for DS-MRR scan. - In ha_partition::multi_range_read_next(): if the MRR scan is using HA_MRR_NO_ASSOCIATION mode, it is not guaranteed that the partition's handler will store anything into *range_info. - In DsMrr_impl::choose_mrr_impl(): ha_partition will inquire partitions about how much memory their MRR implementation needs by passing *buffer_size=0. DS-MRR code didn't know about this (actually it used uint for buffer size calculation and would have an under-flow). Returning *buffer_size=0 made ha_partition assume that partitions do not need MRR memory and pass the same buffer to each of them. Now, this is fixed. If DS-MRR gets *buffer_size=0, it will return the amount of buffer space needed, but not more than about @@mrr_buffer_size. * Fix ha_{innobase,maria,myisam}::clone. If ha_partition uses MRR on its partitions, and partition use DS-MRR, the code will call handler->clone with TABLE (*NOT partition*) name as an argument. DS-MRR has no way of knowing the partition name, so the solution was to have the ::clone() function for the affected storage engine to ignore the name argument and get it elsewhere.
-
Marko Mäkelä authored
After MDEV-11556, not even crash recovery should attempt to access non-existing pages. But, buf_load() is not validating its input and must thus be able to ignore missing pages, so that is why buf_read_page_background() does that.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
innodb_shutdown(): Invoke os_aio_free() before btr_search_sys_free().
-
Vladislav Vaintroub authored
Remove keywords that are too new.
-
Vladislav Vaintroub authored
-
Vladislav Vaintroub authored
Almost all threads have gone - the "ticking" threads, that sleep a while then do some work) (srv_monitor_thread, srv_error_monitor_thread, srv_master_thread) were replaced with timers. Some timers are periodic, e.g the "master" timer. - The btr_defragment_thread is also replaced by a timer , which reschedules it self when current defragment "item" needs throttling - the buf_resize_thread and buf_dump_threads are substitutes with tasks Ditto with page cleaner workers. - purge workers threads are not tasks as well, and purge cleaner coordinator is a combination of a task and timer. - All AIO is outsourced to tpool, Innodb just calls thread_pool::submit_io() and provides the callback. - The srv_slot_t was removed, and innodb_debug_sync used in purge is currently not working, and needs reimplementation.
-
Vladislav Vaintroub authored
The library is capable of - asynchronous execution of tasks (and optionally waiting for them) - asynchronous file IO This is implemented using libaio on Linux and completion ports on Windows. Elsewhere, async io is "simulated", which means worker threads are performing synchronous IO. - timers, scheduling work asynchronously in some point of the future. Also periodic timers are implemented.
-
Vladislav Vaintroub authored
This is a prerequisite patch required to remove Innodb's thd_destructor_proxy thread. The patch implement pre-shutdown functionality for handlers. A storage engine might need to perform some work after all user connections are shut down, but before killing off the plugins. The reason is that an SE could still be using some of the server infrastructure. In case of Innodb this would be purge threads, that call into the server to calculate results of virtual function, acquire MDL locks on tables, or possibly also use the audit plugins.
-
Vladislav Vaintroub authored
Create background THDs that are not counted, and do not block close_connections(), in other words they are just something that plugin can use internally. These THD will be used later by Innodb purge threads, and they need THD to calculate virtual functions.
-
Vladislav Vaintroub authored
Since threadpool is using thr_timer, and it also exist in embedded version, initialize timer also in embedded version
-
Vladislav Vaintroub authored
Threadpool will need a functionality for periodic thr_timer (the threadpool maintainence task is a timer that runs periodically). Also increase the stack size for the timer thread, 8k won't be enough.
-
Vladislav Vaintroub authored
-
Vladislav Vaintroub authored
Provide own version of popen/pclose, in attempt to workaround sporadic erratic behavior of UCRT's one.
-
Marko Mäkelä authored
-
Sergei Golubchik authored
using create_w_max_indexes_64.result as a template
-
- 14 Nov, 2019 9 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Jean Weisbuch authored
- Added dynamic column width fro `user` and `db` columns - Added option `%` to hide the progress - Follow up changes from Ubuntu - Take `INFORMATION_SCHEMA.PROCESSLIST` into account to determine progress of the `actual stage` - Indentation fixes Closes #215
-
Marko Mäkelä authored
Apart from page latches (buf_block_t::lock), mini-transactions are keeping track of at most one dict_index_t::lock and fil_space_t::latch at a time, and in a rare case, purge_sys.latch. Let us introduce interfaces for acquiring an index latch or a tablespace latch. In a later version, we may want to introduce mtr_t members for holding a latched dict_index_t* and fil_space_t*, and replace the remaining use of mtr_t::m_memo with std::set<buf_block_t*> or with a map<buf_block_t*,byte*> pointing to log records.
-
Marko Mäkelä authored
In the test innodb.instant_alter,4k we would be flagging an error for too large row size. That error was previously only being reported if the table was being rebuilt. Thus, this merge is fixing a small omission in MDEV-11369 (instant ADD COLUMN).
-
Marko Mäkelä authored
-
Sujatha authored
revision-id: 673e253724979fd9fe43a4a22bd7e1b2c3a5269e Author: Kristian Nielsen Fix missing memory barrier in wait_for_commit. The function wait_for_commit::wait_for_prior_commit() has a fast path where it checks without locks if wakeup_subsequent_commits() has already been called. This check was missing a memory barrier. The waitee thread does two writes to variables `waitee' and `wakeup_error', and if the waiting thread sees the first write it _must_ also see the second or incorrect behavior will occur. This requires memory barriers between both the writes (release semantics) and the reads (acquire semantics) of those two variables. Other accesses to these variables are done under lock or where only one thread will be accessing them, and can be done without barriers (relaxed semantics).
-
- 13 Nov, 2019 4 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
btr_create(), btr_root_raise_and_insert(): Write a MLOG_MEMSET record to set FIL_PAGE_PREV,FIL_PAGE_NEXT to FIL_NULL, instead of writing two MLOG_4BYTES records. For ROW_FORMAT=COMPRESSED pages, we will not use MLOG_MEMSET because we want the crash-downgrade to earlier 10.4 releases to succeed. mlog_parse_nbytes(): Relax the too strict assertion. There is no problem with MLOG_MEMSET records that affect the uncompressed header of ROW_FORMAT=COMPRESSED index pages.
-
Sergei Petrunia authored
Fix incorrect change introduced in the fix for MDEV-20109. The patch tried to compute a more precise estimate for the record_count value in SJ-Materialization-Scan strategy (in Sj_materialization_picker::check_qep). However the new formula is worse as it produces extremely optimistic results in common cases where SJ-Materialization-Scan should be used) The old formula produces pessimistic results in cases when Sj-Materialization- Scan is unlikely to be a good choice anyway. So, the old behavior is better.
-
Eugene Kosov authored
Move row size check to early CREATE/ALTER TABLE phase. Stop checking on table open. dict_index_add_to_cache(): remove parameter 'strict', stop checking row size dict_index_t::record_size_info_t: this is a result of row size check operation create_table_info_t::row_size_is_acceptable(): performs row size check. Issues error or warning. Writes first overflow field to InnoDB log. create_table_info_t::create_table(): add row size check dict_index_t::record_size_info(): this is a refactored version of dict_index_t::rec_potentially_too_big(). New version doesn't change global state of a program but return all interesting info. And it's callers who decide how to handle row size overflow. dict_index_t::rec_potentially_too_big(): removed
-