- 26 Apr, 2022 3 commits
-
-
Marko Mäkelä authored
The macro MY_GNUC_PREREQ() was used for testing for some minor GCC 4 versions before GCC 4.8.5, which is the oldest version that supports C++11, which we depend on ever since commit d9613b75
-
Thirunarayanan Balathandayuthapani authored
- InnoDB should avoid bulk insert operation when table has active DDL. Because bulk insert writes only one undo log as TRX_UNDO_EMPTY and logging of concurrent DML happens at commit time uses undo log record to parse and get the value and operation. - Removed ROW_T_EMPTY, ROW_OP_EMPTY and their associated functions and also the test case which tries to log the ROW_OP_EMPTY when table has active DDL.
-
Julius Goryavsky authored
This commit fixes a crash reported as MDEV-28377 and a number of other crashes in automated tests with mtr that are related to broken .cnf files in galera and galera_3nodes suites, which happened when automatically migrating MDEV-26171 from 10.3 to subsequent higher versions.
-
- 25 Apr, 2022 2 commits
-
-
Thirunarayanan Balathandayuthapani authored
- InnoDB DDL results in `Duplicate entry' if concurrent DML throws duplicate key error. The following scenario explains the problem connection con1: ALTER TABLE t1 FORCE; connection con2: INSERT INTO t1(pk, uk) VALUES (2, 2), (3, 2); In connection con2, InnoDB throws the 'DUPLICATE KEY' error because of unique index. Alter operation will throw the error when applying the concurrent DML log. - Inserting the duplicate key for unique index logs the insert operation for online ALTER TABLE. When insertion fails, transaction does rollback and it leads to logging of delete operation for online ALTER TABLE. While applying the insert log entries, alter operation encounters 'DUPLICATE KEY' error. - To avoid the above fake duplicate scenario, InnoDB should not write any log for online ALTER TABLE before DML transaction commit. - User thread which does DML can apply the online log if InnoDB ran out of online log and index is marked as completed. Set online log error if apply phase encountered any error. It can also clear all other indexes log, marks the newly added indexes as corrupted. - Removed the old online code which was a part of DML operations commit_inplace_alter_table() : Does apply the online log for the last batch of secondary index log and does frees the log for the completed index. trx_t::apply_online_log: Set to true while writing the undo log if the modified table has active DDL trx_t::apply_log(): Apply the DML changes to online DDL tables dict_table_t::is_active_ddl(): Returns true if the table has an active DDL dict_index_t::online_log_make_dummy(): Assign dummy value for clustered index online log to indicate the secondary indexes are being rebuild. dict_index_t::online_log_is_dummy(): Check whether the online log has dummy value ha_innobase_inplace_ctx::log_failure(): Handle the apply log failure for online DDL transaction row_log_mark_other_online_index_abort(): Clear out all other online index log after encountering the error during row_log_apply() row_log_get_error(): Get the error happened during row_log_apply() row_log_online_op(): Does apply the online log if index is completed and ran out of memory. Returns false if apply log fails UndorecApplier: Introduced a class to maintain the undo log record, latched undo buffer page, parse the undo log record, maintain the undo record type, info bits and update vector UndorecApplier::get_old_rec(): Get the correct version of the clustered index record that was modified by the current undo log record UndorecApplier::clear_undo_rec(): Clear the undo log related information after applying the undo log record UndorecApplier::log_update(): Handle the update, delete undo log and apply it on online indexes UndorecApplier::log_insert(): Handle the insert undo log and apply it on online indexes UndorecApplier::is_same(): Check whether the given roll pointer is generated by the current undo log record information trx_t::rollback_low(): Set apply_online_log for the transaction after partially rollbacked transaction has any active DDL prepare_inplace_alter_table_dict(): After allocating the online log, InnoDB does create fulltext common tables. Fulltext index doesn't allow the index to be online. So removed the dead code of online log removal Thanks to Marko Mäkelä for providing the initial prototype and Matthias Leich for testing the issue patiently.
-
Alexander Barkov authored
Adding a 10.6 specific test from the MDEV
-
- 21 Apr, 2022 14 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Vlad Lesin authored
MDEV-27919 mariabackup --log-copy-interval is measured in millisecondss in 10.5 and in microseconds in 10.6 Multiply polling interval by 1000.
-
Marko Mäkelä authored
Due to 32-bit arithmetics, SRV_TMP_SPACE_ID page number 0x200002 would be folded to 0, which is incompatible with the assumption that was made in commit 7cffb5f6 (MDEV-23399). page_id_t::fold(): Compute in the native word width instead of uint32_t. On 64-bit platforms, an alternative would be to return the 64-bit m_id directly, but that was measured to cause a performance regression. fil_space_t::open(): Invoke fil_node_t::find_metadata() when the tablespace is being created. In this way, we will actually detect that the temporary tablespace resides on SSD. (During database creation, also the system tablespace will correctly be detected as residing on SSD.)
-
Daniel Black authored
I missed include/no_protocol.inc already existed.
-
Daniel Black authored
aarch64 RHEL7 and Centos7 internal compiler error here, so we carry another pragma enchantment like buf0lru.cc and row0ins.cc.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
The only purpose of ibuf_bitmap_mutex is to prevent a deadlock between two concurrent invocations of ibuf_update_free_bits_for_two_pages_low() on the same pair of bitmap pages, but in opposite order. The mutex is unnecessarily serializing the execution of the function even when it is being invoked on totally different tablespaces. To avoid deadlocks, it suffices to ensure that the two page latches are being acquired in a deterministic (sorted) order.
-
Daniel Black authored
A few of constaint -> constraint
-
Daniel Black authored
Remove Warning that occured by doing an ALTER TABLE ... ORDER BY on an InnoDB table. Reviewed by Brandon Nesterenko
-
Daniel Black authored
The --skip-write-binlog message was confusing that it only had an effect if the galera was enabled. There are uses beyond galera so we apply SET SESSION SQL_LOG_BIN=0 as implied by the option without being conditional on the wsrep status. We also with --skip-write-binlog actually check the session @@WSREP_ON variable rather than the global server variable. Since 10.6, the wsrep_mode could replicate Aria and MyISAM, in which case no change to innodb and back is needed. By removing the conditions, we can use LOCK TABLES in a general case improving the load speed of Aria (MDEV-23326), regardless of the skip-write-binlog flag. The only case where we don't use LOCK TABLES is when we are replicating via Innodb, because wsrep_on=1 and wsrep_mode doesn't contain REPLICATE_ARIA{,MYISAM}. This uses an Innodb transaction instead. When replicating via InnoDB we change the table engine type back to what it was originally. By removing the \d and other syntax that requires parsing by the mariadb client, we can use the generated SQL more generally, like in the embedded server. We also save and restore the SQL_LOG_BIN and WSREP_ON session server variables so this can be included in the same session as other data without taking into changes in state. Remove wsrep.mysql_tzinfo_to_sql_symlink{,_skip} tests as they offered no additional coverage beyond main.mysql_tzinfo_to_sql_symlink (no server testing was done). Add galera.mariadb_tzinfo_to_sql to actually test the replication of tzinfo data through galera. The conditional executable comment around /*M!100602 ... START TRANSACTION .. LOCK TABLES.. */ is so that we can provide tzinfo files (MDEV-27113, MDBF-389) and in the case that a user uses it on a pre-10.6 server version it will still work. Both START TRANSACTION and LOCK TABLES are not supported in prepared statements in MariaDB versions earlier than 10.6.2. Reviewed by Brandon Nesterenko
-
Haidong Ji authored
- Simplified Chinese translation added - Character encoding is gdk -- gdk covers more characters -- gdk includes both Simplified and Traditional -- best option I think, may need to work along with other locale settings - Other cleanup -- Within each error, messages are sorted according to language code -- More consistent formatting (8 spaces proceeding each translation) -- jps removed as duplicate of jpn translation This should be a good starting point. More refinement is appreciated, and needed down the road. English "containt" (sic) spelling fixes on ER_FK_NO_INDEX_{CHILD,PARENT} resulting in mtr test case adjustments. Edited/reviewed by Daniel Black
-
- 20 Apr, 2022 4 commits
-
-
Thirunarayanan Balathandayuthapani authored
The following condition has to added: 1) InnoDB fails to include the offset of the node pointer field in non-leaf record for redundant row format. 2) If the Fixed length field does have only prefix length then calculate the field maximum size as prefix length. - Added the test case to test (2) and to check maximum number of fields can exist in the index.
-
Thirunarayanan Balathandayuthapani authored
- While loading the indexes, InnoDB fails to clear the index if the system record has TEMP_INDEX_PREFIX_STR. This lead to ASAN failure. The leak was introduced by commit cc2ddde4 (MDEV-18518)
-
Daniele Sciascia authored
Disallow XA when Galera library is loaded. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
-
Jan Lindström authored
MDEV-28314 : The Galera cluster primary node goes into hang mode when innodb_encryption_threads is enabled When we enable writes after Galera SST srv_n_fil_crypt_threads needs to be set temporally to 0 (as was done when writes were disabled) to make sure that encryption threads will be really started based on old value of encryption threads. Fix provided by Marko Mäkelä.
-
- 19 Apr, 2022 3 commits
-
-
Marko Mäkelä authored
Let us use the common pthread_t wrapper for Microsoft Windows. This fixes up commit dbe941e0
-
Marko Mäkelä authored
-
Jan Lindström authored
Add missing connection lines to result set
-
- 18 Apr, 2022 4 commits
-
-
Aleksey Midenkov authored
column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter prematurely freed item. When table is reopened from cache vcol_info contains stale expression. We refresh expression via TABLE::vcol_fix_exprs() but first we must prepare a proper context (Vcol_expr_context) which meets some requirements: 1. As noted above expr update must be done on expr_arena as there may be new items created. It was a bug in fix_session_expr_for_read() and was just not reproduced because of no second refix. Now refix is done for more cases so it does reproduce. Tests affected: vcol.binlog 2. Also name resolution context must be narrowed to the single table. Tested by: vcol.update main.default vcol.vcol_syntax gcol.gcol_bugfixes 3. sql_mode must be clean and not fail expr update. sql_mode such as MODE_NO_BACKSLASH_ESCAPES, MODE_NO_ZERO_IN_DATE, etc must not affect vcol expression update. If the table was created successfully any further evaluation must not fail. Tests affected: main.func_like Reviewed by: Sergei Golubchik <serg@mariadb.org>
-
Aleksey Midenkov authored
1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
-
Oleg Smirnov authored
This commit adds processing of SYSTEM_TIME_BEFORE and SYSTEM_TIME_HISTORY to vers_select_conds_t::print().
-
Oleg Smirnov authored
UNION ALL queries are a subject of optimization introduced in MDEV-334 when creation of a temporary table is skipped. While there is a check for this optimization in Explain_union::print_explain() there was no such in Explain_union::print_explain_json(). This resulted in printing irrelevant data like: "union_result": { "table_name": "<union2,3>", "access_type": "ALL", "r_loops": 0, "r_rows": null in case when creation of the temporary table was actually optimized out. This commits adds a check whether the temporary table was actually created during the UNION ALL processing and eliminates printing of the irrelevant data.
-
- 16 Apr, 2022 1 commit
-
-
Daniele Sciascia authored
-
- 15 Apr, 2022 3 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
MDEV-9948 Failing assertion: new_state->key_version != ENCRYPTION_KEY_VERSION_INVALID in fil0crypt.cc The test encryption.innodb-redo-nokeys did not actually test recovery without valid keys, because due to the setting innodb_encrypt_tables, InnoDB refused to start up at all, without even attempting any crash recovery. fil_ibd_load(): If the encryption key is not available, refuse to load the file.
-
Nayuta Yanagisawa authored
-
- 14 Apr, 2022 6 commits
-
-
Alexander Barkov authored
An additional patch for MDEV-27690 Crash on `CHARACTER SET csname COLLATE DEFAULT` in column definition Applying the fix to sql_yacc_ora.yy. Adding a test for sql_mode=ORACLE.
-
Alexander Barkov authored
-
Marko Mäkelä authored
Let us replace all use of MY_ALIGNED in InnoDB with C++11 alignas. CACHE_LINE_SIZE: Replaced with CPU_LEVEL1_DCACHE_LINESIZE.
-
Marko Mäkelä authored
A few PERFORMANCE_SCHEMA instrumentation keys were not exposed in all_innodb_mutexes[]. Let us remove them. The keys fts_pll_tokenize_mutex_key and read_view_mutex_key were internally used. Let us make ReadView::m_mutex use the simpler and smaller srw_mutex, hoping to improve memory access patterns.
-
Marko Mäkelä authored
The element mutex is unnecessarily large. The PERFORMANCE_SCHEMA instrumentation was not even enabled.
-
Marko Mäkelä authored
trx_lock_t: Remove byte pad[256] and use alignas(CPU_LEVEL1_DCACHE_LINESIZE) instead. trx_t: Declare n_ref (the first member) aligned at cache line. Pool: Assert that the sizes are multiples of CPU_LEVEL1_DCACHE_LINESIZE, and invoke an aligned allocator.
-