- 15 Mar, 2019 2 commits
-
-
Teemu Ollakka authored
* MDEV-16509 Improve wsrep commit performance with binlog disabled Release commit order critical section early after trx_commit_low() if binlog is not transaction coordinator. In order to avoid two phase commit, binlog_hton is not registered for THD during IO_CACHE population. Implemented a test which verifies that the transactions release commit order early. This optimization will change behavior during recovery as the commit is not two phase when binlog is off. Fixed and recorded wsrep-recover-v25 and wsrep-recover to match the behavior. * MDEV-18730 Ordering for wsrep binlog group commit Previously out of order execution was allowed for wsrep commits. Established proper ordering by populating wait_for_commit for every wsrep THD and making group commit leader to wait for prior commits before proceeding to trx_group_commit_leader(). * MDEV-18730 Added a test case to verify correct commit ordering * MDEV-16509, MDEV-18730 Review fixes Use WSREP_EMULATE_BINLOG() macro to decide if the binlog_hton should be registered. Whitespace/syntax fixes and cleanups. * MDEV-16509 Require binlog for galera_var_innodb_disallow_writes test If the commit to InnoDB is done in one phase, the native InnoDB behavior is that the transaction is committed in memory before it is persisted to disk. This means that the innodb_disallow_writes=ON may not prevent transaction to become visible to other readers before commit is completely over. On the other hand, if the commit is two phase (as it is with binlog), the transaction will be blocked in prepare phase. Fixed the test to use binlog, which enforces two phase commit, which in turn makes commit to block before the changes become visible to other connections. This guarantees that the test produces expected result.
-
Igor Babaev authored
depends on uninitialized value This problem most probably was resolved by the patch for MDEV-18816. This commit adds only the test case from the bug entry.
-
- 14 Mar, 2019 4 commits
-
-
Andrei Elkin authored
appeared to leave warning due to expectable full exit of IO threads. Fixed to ignore warnings at the final START SLAVEs.
-
Marko Mäkelä authored
Note: any error from row_undo() will lead to the server being killed by InnoDB.
-
Monty authored
The warning was removed as this is a common case that happens if the table was dropped and later created during the same checkpoint or if there was a bulk insert done on an empty table.
-
Daniel Black authored
-
- 13 Mar, 2019 7 commits
-
-
Alexander Barkov authored
-
sachin authored
`!pk->has_virtual()' failed in instant_alter_column_possible upon adding key Hash key can't be primary key.
-
sachin authored
As MDEV-18799 fixes these mdevs so adding test cases for these mdevs.
-
sachin authored
Restore table->key_info after calling setup_keyinfo_hash in mysql_prepare_alter_table.
-
Varun Gupta authored
Fixed the typo and updated the test results
-
Varun Gupta authored
Fixed, now server start with optimizer_trace enabled would not show the warning
-
sachin authored
attempt to drop BLOB with long index Restore long table->key_info, So that in the case of unsuccessful table alter table->key_info should have a correct value. In the case of successful table alter old table is flushed so that is why we don't see this error in the case of successful alter.
-
- 12 Mar, 2019 11 commits
-
-
Sergey Vojtovich authored
The patches features an optional shutdown behavior to hold on until after all connected slaves have been sent the last binlogged event. The connected slave is one whose START SLAVE has been acknowledged and that was not stopped since that though it could be technically reconnecting in background. The solution therefore disallows killing the dump thread until is has found EOF of the latest binlog file. It is up to the shutdown requester (DBA) to set up a sufficiently large shutdown timeout value for shudown to wait patiently until lagging behind slaves have been synchronized. On the other hand if a specific slave needs exclusion from synchronization the DBA would have to stop it manually which would terminate its dump thread. `mysqladmin shutdown' is extended with a `--wait_for_all_slaves' option which translates to `SHUTDOW WAIT FOR ALL SLAVES' sql query to enable the feature on the client side. The patch also performs a small refactoring of the server shutdown around close_connections() to introduce kill thread phases which are two as of current.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
In 10.3, all records will be processed by purge due to MDEV-12288. But, the insert undo records do not contain a transaction identifier. row_purge_parse_undo_rec(): Use node->trx_id=TRX_ID_MAX for the insert undo records. We cannot skip table lookups for these records after DISCARD TABLESPACE other than by 'detaching' the table from the undo logs by updating SYS_TABLES.ID on both DISCARD TABLESPACE and IMPORT TABLESPACE. Also, remove a redundant condition that was introduced in the merge commit 814205f3.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
recv_parse_log_recs(): Do not compare type if ptr==end_ptr (we have reached the end of the redo log parsing buffer), because it will not have been correctly initialized in that case.
-
Marko Mäkelä authored
GCC 6 and later can optimize away the memset() that is part of mem_heap_zalloc() in a placement new call. So, instead of relying on that kind of initialization, explicitly initialize the necessary fields in the constructors. que_common_t::que_common_t(): Initialize more fields in the default constructor. purge_vcol_info_t::purge_vcol_info_t(): Initialize all fields in the default constructor. purge_node_t::purge_node_t(): Initialize all necessary fields. Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71388 https://gcc.gnu.org/ml/gcc/2016-02/msg00207.html
-
Marko Mäkelä authored
-
Marko Mäkelä authored
row_merge_create_fts_sort_index(): Initialize dict_col_t in an unambiguous way. GCC 6 and later appear to be able to optimize away the memset() that is part of mem_heap_zalloc() in the placement new call. Let us avoid using placement new in order to ensure that the objects will actually be initialized. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71388 https://gcc.gnu.org/ml/gcc/2016-02/msg00207.html While the latter reference hints that the optimization is only applicable to non-POD types (and dict_col_t does not define any member functions before 10.2), it is most consistent to use the same initialization across all versions.
-
Sergei Golubchik authored
MDEV-17070 Table corruption or Assertion `table->file->stats.records > 0 || error' or Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed upon actions on temporary table This was caused by a combination of factors: * MyISAM/Aria temporary tables historically never saved the state to disk (MYI/MAI), because the state never needed to persist * certain ALTER TABLE operations modify the original TABLE structure and if they fail, the original table has to be reopened to revert all changes (m_needs_reopen=1) as a result, when ALTER fails and MyISAM/Aria temp table gets reopened, it reads the stale state from the disk. As a fix, MyISAM/Aria tables now *always* write the state to disk on close, *unless* HA_EXTRA_PREPARE_FOR_DROP was done first. And the server now always does HA_EXTRA_PREPARE_FOR_DROP before dropping a temporary table.
-
Sergei Golubchik authored
-
- 11 Mar, 2019 16 commits
-
-
Alexey Botchkov authored
JSON_ARRAY and JSON_OBJECT functions with no arguments now get the connection charset. Item_func_convert_charset returns the correct is_json() flag.
-
Sergey Vojtovich authored
-
Sergey Vojtovich authored
ALTER TABLE ... ADD FOREIGN KEY may trigger assertion failure when it has LOCK=EXCLUSIVE clause or concurrent FLUSH TABLES is being executed. In both cases being altered table is marked as flushed, which forces subsequent attempt to open parent table to re-open. Which in turn is not allowed while transaction is running. Rather than opening parent table, just take appropriate MDL lock. Also removed table_already_fk_prelocked() check: MDL itself has much better methods to handle duplicate locks. E.g. the former won't acquire MDL_SHARED_NO_WRITE if it already has MDL_SHARED_READ.
-
Monty authored
read_command_buf was not freed at exit, which could cause a warning from valgrind
-
Oleksandr Byelkin authored
Recalculate distinct pointer if we cut chain of SELECTs
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Initialize node->trx_id before checking if a table can be skipped.
-
Marko Mäkelä authored
wait_all_purged.inc: Wait for 60 seconds instead of 30 seconds. Purge can be slow on buildbot, especially in ASAN-instrumented builds.
-
Marko Mäkelä authored
purge_node_t::in_progress: Replaces purge_node_t::done. Only present in debug builds. purge_node_t::start(): Moved from the start of row_purge_step(). purge_node_t::end(): Replaces row_purge_end(). trx_purge_attach_undo_recs(): Omit a check from non-debug builds.
-
Marko Mäkelä authored
If a table has been dropped, rebuilt, or its tablespace has been discarded or the table is corrupted, it does not make sense to look up that table again while purging old undo log records. purge_node_t::purge_node_t(): Replaces row_purge_node_create(). que_common_t::que_common_t(): Constructor. row_import_update_index_root(): Remove the constant parameter dict_locked=true, and update the table->def_trx_id in the cache. purge_node_t::unavailable_table_id: The latest unavailable table ID, to avoid future lookups. purge_node_t::def_trx_id: The latest modification of the table identified by unavailable_table_id, or TRX_ID_MAX. purge_node_t::is_skipped(): Determine if a table should be skipped. purge_node_t::skip(): Note that a table should be skipped.
-
Leandro Pacheco authored
MTR tests for clearing orphaned SR transactions in Galera
-
Teemu Ollakka authored
Fixed sync points in MW-388 and fixed SP wsrep error handling to avoid propagating wsrep errors via client-server protocol response.
-
Marko Mäkelä authored
-
Eugene Kosov authored
This can be useful: UBSAN_OPTIONS=log_path=/some/path clang users may want to increase stack size in include/my_pthread.h or enable some optimizations
-
Marko Mäkelä authored
Clean up after commit 0957d257 which introduced some disorder (unsorted or duplicated test names).
-