- 11 Jan, 2018 1 commit
-
-
Sergey Vojtovich authored
trx_sys_t::rw_trx_set is implemented as std::set, which does a few quite expensive operations under trx_sys_t::mutex protection: e.g. malloc/free when adding/removing elements. Traversing b-tree is not that cheap either. This has negative scalability impact, which is especially visible when running oltp_update_index.lua benchmark on a ramdisk. To reduce trx_sys_t::mutex contention std::set is replaced with LF_HASH. None of LF_HASH operations require trx_sys_t::mutex (nor any other global mutex) protection. Another interesting issue observed with std::set is reproducible ~2% performance decline after benchmark is ran for ~60 seconds. With LF_HASH results are stable. All in all this patch optimises away one of three trx_sys->mutex locks per oltp_update_index.lua query. The other two critical sections became smaller. Relevant clean-ups: Replaced rw_trx_set iteration at startup with local set. The latter is needed because values inserted to rw_trx_list must be ordered by trx->id. Removed redundant conditions from trx_reference(): it is (and even was) never called with transactions that have trx->state == TRX_STATE_COMMITTED_IN_MEMORY. do_ref_count doesn't (and probably even didn't) make any sense: now it is called only when reference counter increment is actually requested. Moved condition out of mutex in trx_erase_lists(). trx_rw_is_active(), trx_rw_is_active_low() and trx_get_rw_trx_by_id() were greatly simplified and replaced by appropriate trx_rw_hash_t methods. Compared to rw_trx_set, rw_trx_hash holds transactions only in PREPARED or ACTIVE states. Transactions in COMMITTED state were required to be found at InnoDB startup only. They are now looked up in the local set. Removed unused trx_assert_recovered(). Removed unused innobase_get_trx() declaration. Removed rather semantically incorrect trx_sys_rw_trx_add(). Moved information printout from trx_sys_init_at_db_start() to trx_lists_init_at_db_start().
-
- 10 Jan, 2018 1 commit
-
-
Monty authored
Problem was timing between the thread that was killed and reading the binary log. Updated the test to wait until the killed thread was properly terminated before checking what's in the binary log. To make check safe, I changed "threads_connected" to be updated after thd::cleanup() is done, to ensure that all binary logs updates are done before the variable is changed. This was mainly done to get the test deterministic and have now other real influence in how the server works.
-
- 09 Jan, 2018 3 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This bug affected tables where the PRIMARY KEY contains variable-length columns, and ROW_FORMAT is COMPACT or DYNAMIC. rec_init_offsets_comp_ordinary(): Do not short-cut the parsing of the record header for records that contain explicit values for instantly added columns. rec_copy_prefix_to_buf(): Copy more header for records that contain explicit values for instantly added columns.
-
Marko Mäkelä authored
row_purge_reset_trx_id(): Display a DBUG message about resetting the DB_TRX_ID.
-
- 08 Jan, 2018 1 commit
-
-
Igor Babaev authored
in JOIN::inject_best_splitting_cond The value of SplM_opt_info::last_plan should be set to NULL before any search for a splitting plan for a splittable materialized table.
-
- 07 Jan, 2018 2 commits
-
-
Vladislav Vaintroub authored
In case libaio is not found, and required, remove variables HAVE_LIBAIO_H and HAVE_LIBAIO from cache, so that cmake rerun after installation of libaio would succeed.
-
Vladislav Vaintroub authored
-
- 06 Jan, 2018 1 commit
-
-
Vladislav Vaintroub authored
-
- 05 Jan, 2018 11 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Vladislav Vaintroub authored
-
Vladislav Vaintroub authored
-
Monty authored
Conflicts: mysql-test/r/cte_nonrecursive.result mysql-test/suite/galera/r/galera_bf_abort.result mysql-test/suite/galera/r/galera_bf_abort_get_lock.result mysql-test/suite/galera/r/galera_bf_abort_sleep.result mysql-test/suite/galera/r/galera_enum.result mysql-test/suite/galera/r/galera_fk_conflict.result mysql-test/suite/galera/r/galera_insert_multi.result mysql-test/suite/galera/r/galera_many_indexes.result mysql-test/suite/galera/r/galera_mdl_race.result mysql-test/suite/galera/r/galera_nopk_bit.result mysql-test/suite/galera/r/galera_nopk_blob.result mysql-test/suite/galera/r/galera_nopk_large_varchar.result mysql-test/suite/galera/r/galera_nopk_unicode.result mysql-test/suite/galera/r/galera_pk_bigint_signed.result mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result mysql-test/suite/galera/r/galera_serializable.result mysql-test/suite/galera/r/galera_toi_drop_database.result mysql-test/suite/galera/r/galera_toi_lock_exclusive.result mysql-test/suite/galera/r/galera_toi_truncate.result mysql-test/suite/galera/r/galera_unicode_pk.result mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result mysql-test/suite/galera/r/galera_wsrep_log_conficts.result sql/field.cc sql/rpl_gtid.cc sql/share/errmsg-utf8.txt sql/sql_acl.cc sql/sql_parse.cc sql/sql_partition_admin.cc sql/sql_prepare.cc sql/sql_repl.cc sql/sql_table.cc sql/sql_yacc.yy
-
Marko Mäkelä authored
-
Marko Mäkelä authored
row_sel_get_clust_rec_for_mysql(): Look up the page from the buffer pool, similar to how MySQL 5.7 does it.
-
Aleksey Midenkov authored
debug_key_management encrypt_and_grep innodb_encryption If real table count is different from what is expected by the test, it just hangs on waiting to fulfill hardcoded number. And then exits with **failed** after 10 minutes of wait: quite unfriendly and hard to figure out what's going on.
-
Jan Lindström authored
Tests: detect table count for some encryption tests
-
- 04 Jan, 2018 11 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Fix and enable some of the tests; some remain disabled. The tests innodb_gis.rtree_old and innodb_gis.row_format duplicated some versions of the test main.gis-rtree. Instead of duplicating, source that test, in a new test innodb_gis.innodb_gis_rtree. Introduce innodb_row_format.combinations. Due to this, ROW_FORMAT=COMPRESSED will not be covered in some tests where it is covered in MySQL 5.7.
-
Marko Mäkelä authored
The function rtr_update_mbr_field_in_place() is generating MLOG_REC_UPDATE_IN_PLACE or MLOG_COMP_REC_UPDATE_IN_PLACE records on non-leaf pages, even though MLOG_WRITE_STRING would perfectly suffice for updating a fixed-length data field. btr_cur_parse_update_in_place(): If flags==7, the record may be from rtr_update_mbr_field_in_place(), and we must check if the page is a leaf page. Otherwise, assume that it is. btr_cur_update_in_place(): Assert that the page is a leaf page.
-
Marko Mäkelä authored
While insert direction makes no sense for SPATIAL INDEX (R-tree), the field is apparently being used (and basically garbage). Relax the debug assertion that was added in MDEV-11369.
-
Daniel Bartholomew authored
-
Monty authored
Other things, mainly to get create_mysqld_error_find_printf_error tool to work: - Added protection to not include mysqld_error.h twice - Include "unireg.h" instead of "mysqld_error.h" in server - Added protection if ER_XX messages are already defined - Removed wrong calls to my_error(ER_OUTOFMEMORY) as my_malloc() and my_alloc will do this automatically - Added missing %s to ER_DUP_QUERY_NAME - Removed old and wrong calls to my_strerror() when using MY_ERROR_ON_RENAME (wrong merge) - Fixed deadlock error message from Galera. Before the extra information given to ER_LOCK_DEADLOCK was missing because ER_LOCK_DEADLOCK doesn't provide any extra information. I kept #ifdef mysqld_error_find_printf_error_used in sql_acl.h to make it easy to do this kind of check again in the future
-
Aleksey Midenkov authored
debug_key_management encrypt_and_grep innodb_encryption If real table count is different from what is expected by the test, it just hangs on waiting to fulfill hardcoded number. And then exits with **failed** after 10 minutes of wait: quite unfriendly and hard to figure out what's going on.
-
Sergei Petrunia authored
-
Marko Mäkelä authored
-
- 03 Jan, 2018 9 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
While the redo log format was changed in MariaDB 10.3.2 and 10.3.3 due to MDEV-12288 and MDEV-11369, it should be technically possible to upgrade from a crashed MariaDB 10.2 instance. On a related note, it should be possible for Mariabackup 10.3 to create a backup from a running MariaDB Server 10.2. mlog_id_t: Put back the 10.2 specific redo log record types MLOG_UNDO_INSERT, MLOG_UNDO_ERASE_END, MLOG_UNDO_INIT, MLOG_UNDO_HDR_REUSE. trx_undo_parse_add_undo_rec(): Parse or apply MLOG_UNDO_INSERT. trx_undo_erase_page_end(): Apply MLOG_UNDO_ERASE_END. trx_undo_parse_page_init(): Parse or apply MLOG_UNDO_INIT. trx_undo_parse_page_header_reuse(): Parse or apply MLOG_UNDO_HDR_REUSE. recv_log_recover_10_2(): Remove. Always parse the redo log from 10.2. recv_find_max_checkpoint(), recv_recovery_from_checkpoint_start(): Always parse the redo log from MariaDB 10.2. recv_parse_or_apply_log_rec_body(): Parse or apply MLOG_UNDO_INSERT, MLOG_UNDO_ERASE_END, MLOG_UNDO_INIT. srv_prepare_to_delete_redo_log_files(), innobase_start_or_create_for_mysql(): Upgrade from a previous (supported) redo log format.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-