- 08 Mar, 2017 5 commits
-
-
Marko Mäkelä authored
After starting MariaDB 10.2 with an invalid value of --innodb-flush-method= (the empty string), shutdown would attempt to dereference some NULL pointers. This was probably broken in commit 81b7fe9d which implemented shutdown after aborted startup. logs_empty_and_mark_files_at_shutdown(): Allow shutdown even if lock_sys, log_sys, or fil_system is NULL. os_aio_free(): Tolerate os_aio_segment_wait_events==NULL. innobase_start_or_create_for_mysql(): Do not invoke srv_init_abort() before initializing all mutexes for the temporary files. innodb_shutdown(): Tolerate buf_pool_ptr==NULL.
-
Marko Mäkelä authored
Provide more useful progress reporting of crash recovery. recv_sys_t::progress_time: The time of the last report. recv_sys_t::report(ib_time_t): Determine whether progress should be reported. recv_scan_print_counter: Remove. log_group_read_log_seg(): After after each I/O request, invoke recv_sys_t::report() and report progress if needed. recv_apply_hashed_log_recs(): Change the return type back to void (DB_SUCCESS was always returned), and rename the parameter to last_batch. At the start of each batch, if there are pages to be recovered, issue a message.
-
Oleksandr Byelkin authored
MDEV-10704: Assertion `field->field->table == table_arg' failed in fill_record(THD*, TABLE*, List<Item>&, List<Item>&, bool, bool) the bug test suite
-
Daniel Black authored
Introduced 2f63e2e2 Compiler error was: sql/log_event.cc: In function ‘size_t log_event_print_value(IO_CACHE*, const uchar*, uint, uint, char*, size_t)’: sql/log_event.cc:2897:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (!ptr) ^~ sql/log_event.cc:2900:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ int32 i32= uint2korr(ptr); ^~~~~ Added in 950abd52 Error was: sql/item_sum.cc:3478:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if ((!args[i]->fixed && ^~ /sql/item_sum.cc:3482:7: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ with_subselect|= args[i]->with_subselect; ^~~~~~~~~~~~~~ Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
-
Igor Babaev authored
The bug was caused by a wrong order of statements in With_clause::print(). As a result any view definition containing WITH clause with several CTE specifications was put the frm file in a syntactically incorrect form.
-
- 07 Mar, 2017 7 commits
-
-
Vladislav Vaintroub authored
Also get rid of example ini files, they do not provide any value, just confusion
-
Marko Mäkelä authored
The InnoDB redo log record type MLOG_COMP_REC_SEC_DELETE_MARK has been unused for a long time, and it has never been written after WL#8845 introduced the redo log format identifier in MySQL 5.7.9 or MariaDB Server 10.2.2. Thus, removing the record type does not constitute any functional change.
-
Marko Mäkelä authored
Define my_thread_id as an unsigned type, to avoid mismatch with ulonglong. Change some parameters to this type. Use size_t in a few more places. Declare many flag constants as unsigned to avoid sign mismatch when shifting bits or applying the unary ~ operator. When applying the unary ~ operator to enum constants, explictly cast the result to an unsigned type, because enum constants can be treated as signed. In InnoDB, change the source code line number parameters from ulint to unsigned type. Also, make some InnoDB functions return a narrower type (unsigned or uint32_t instead of ulint; bool instead of ibool).
-
Daniel Black authored
-
Daniel Black authored
To facilitate multiple build types in Travis, the environment variable MYSQL_{BUILD_CC,BUILD_CXX} will be passed to cmake if used. This will fallback to $CC/$CXX otherwise. Added MYSQL_COMPILER_LAUNCHER (usually ccache) which isn't supported until cmake-3.4, which isn't in travis (trusty), but hopefully a later version can use it or in CI systems other than travis. Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
-
Alexander Barkov authored
-
Alexander Barkov authored
Merge branch '10.2-MDEV-120555-test_binlog_stm_ctype_ucs' of https://github.com/grooverdan/mariadb-server into grooverdan-10.2-MDEV-120555-test_binlog_stm_ctype_ucs
-
- 06 Mar, 2017 2 commits
-
-
Marko Mäkelä authored
The function thd_supports_xa() was removed in MySQL 5.7 in WL#8843.
-
Marko Mäkelä authored
Remove the unused variable innodb_calling_exit which was added in MySQL 5.7 in an attempt to avoid failures in other threads when an I/O thread calls exit(). Since MDEV-9282, InnoDB or XtraDB MariaDB Server is not calling exit() at all, and the variable innodb_calling_exit was never set.
-
- 03 Mar, 2017 5 commits
-
-
Marko Mäkelä authored
Because the default build configuration of the server will remain at -DWITH_INNODB_AHI=ON, we want to test the instrumentation. We make and revert the test adjustments in separate commits on purpose, so that this commit can be easily reverted later if the default build configuration is changed to -DWITH_INNODB_AHI=OFF.
-
Marko Mäkelä authored
The InnoDB adaptive hash index is sometimes degrading the performance of InnoDB, and it is sometimes disabled to get more consistent performance. We should have a compile-time option to disable the adaptive hash index. Let us introduce two options: OPTION(WITH_INNODB_AHI "Include innodb_adaptive_hash_index" ON) OPTION(WITH_INNODB_ROOT_GUESS "Cache index root block descriptors" ON) where WITH_INNODB_AHI always implies WITH_INNODB_ROOT_GUESS. As part of this change, the misleadingly named function trx_search_latch_release_if_reserved(trx) will be replaced with the macro trx_assert_no_search_latch(trx) that will be empty unless BTR_CUR_HASH_ADAPT is defined (cmake -DWITH_INNODB_AHI=ON). We will also remove the unused column INFORMATION_SCHEMA.INNODB_TRX.TRX_ADAPTIVE_HASH_TIMEOUT. In MariaDB Server 10.1, it used to reflect the value of trx_t::search_latch_timeout which could be adjusted during row_search_for_mysql(). In 10.2, there is no such field. Other than the removal of the unused column TRX_ADAPTIVE_HASH_TIMEOUT, this is an almost non-functional change to the server when using the default build options. Some tests are adjusted so that they will work with both -DWITH_INNODB_AHI=ON and -DWITH_INNODB_AHI=OFF. The test innodb.innodb_monitor has been renamed to innodb.monitor in order to track MySQL 5.7, and the duplicate tests sys_vars.innodb_monitor_* are removed.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This fixes MySQL Bug#80788 in MariaDB 10.2.5. When I made the InnoDB crash recovery more robust by implementing WL#7142, I also introduced an extra redo log scan pass that can be shortened. This fix will slightly extend the InnoDB redo log format that I introduced in MySQL 5.7.9 by writing the start LSN of the MLOG_CHECKPOINT mini-transaction to the end of the log checkpoint page, so that recovery can jump straight to it without scanning all the preceding redo log. LOG_CHECKPOINT_END_LSN: At the end of the checkpoint page, the start LSN of the MLOG_CHECKPOINT mini-transaction. Previously, these bytes were written as 0. log_write_checkpoint_info(), log_group_checkpoint(): Add the parameter end_lsn for writing LOG_CHECKPOINT_END_LSN. log_checkpoint(): Remember the LSN at which the MLOG_CHECKPOINT mini-transaction is starting (or at which the redo log ends on shutdown). recv_init_crash_recovery(): Remove. recv_group_scan_log_recs(): Add the parameter checkpoint_lsn. recv_recovery_from_checkpoint_start(): Read LOG_CHECKPOINT_END_LSN and if it is set, start the first scan from it instead of the checkpoint LSN. Improve some messages and remove bogus assertions. recv_parse_log_recs(): Do not skip DBUG_PRINT("ib_log") for some file-level redo log records. recv_parse_or_apply_log_rec_body(): If we have not parsed all redo log between the checkpoint and the corresponding MLOG_CHECKPOINT record, defer the check for MLOG_FILE_DELETE or MLOG_FILE_NAME records to recv_init_crash_recovery_spaces(). recv_init_crash_recovery_spaces(): Refuse recovery if MLOG_FILE_NAME or MLOG_FILE_DELETE records are missing.
-
Sachin Setiya authored
-
- 01 Mar, 2017 1 commit
-
-
Daniel Black authored
This caused gcc-6.3.1 errors:7450cb7f mariadb-server/sql/sql_base.cc: In function ‘bool fix_all_session_vcol_exprs(THD*, TABLE_LIST*)’: mariadb-server/sql/sql_base.cc:4821:7: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (Field **df= t->default_field; df && *df; df++) ^~~ mariadb-server/sql/sql_base.cc:4826:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ for (Virtual_column_info **cc= t->check_constraints; cc && *cc; cc++) ^~~ It was obvious from 7450cb7f that the indenting should of been removed Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
-
- 28 Feb, 2017 1 commit
-
-
Marko Mäkelä authored
MDEV-7618 introduced configuration parameter innodb_instrument_semaphores in MariaDB Server 10.1. The parameter seems to only affect the rw-lock X-latch acquisition. Extra fields are added to rw_lock_t to remember one X-latch holder or waiter. These fields are not being consulted or reported anywhere. This is basically only adding code bloat. If the intention is to debug hangs or deadlocks, we have better tools for that in the debug server, and for the non-debug server, core dumps can reveal a lot. For example, the mini-transaction memo records the currently held buffer block or index rw-locks, to be released at mtr_t::commit(). The configuration parameter innodb_instrument_semaphores will be deprecated in 10.2.5 and removed in 10.3.0. rw_lock_t: Remove the members lock_name, file_name, line, thread_id which did not affect any output.
-
- 27 Feb, 2017 1 commit
-
-
Marko Mäkelä authored
The field should have been removed when merging MySQL 5.7.9 to MariaDB 10.2.2 in commit 2e814d47.
-
- 24 Feb, 2017 4 commits
-
-
Marko Mäkelä authored
to tables in the system tablespace This is a regression caused by MDEV-11585, which accidentally changed Tablespace::is_undo_tablespace() in an incorrect way, causing the InnoDB system tablespace to be reported as a dedicated undo tablespace, for which the change buffer is not applicable. Tablespace::is_undo_tablespace(): Remove. There were only 2 calls from the function buf_page_io_complete(). Replace those calls as appropriate. Also, merge changes to tablespace import/export tests from MySQL 5.7, and clean up the tests a little further, allowing them to be run with any innodb_page_size. Remove duplicated error injection instrumentation for the import/export tests. In MySQL 5.7, the error injection label buf_page_is_corrupt_failure was renamed to buf_page_import_corrupt_failure. fil_space_extend_must_retry(): Correct a debug assertion (tablespaces can be extended during IMPORT), and remove a TODO comment about compressed temporary tables that was already addressed in MDEV-11816. dict_build_tablespace_for_table(): Correct a comment that no longer holds after MDEV-11816, and assert that ROW_FORMAT=COMPRESSED can only be used in .ibd files.
-
Marko Mäkelä authored
Note: At least one test is unstable, failing with the following: ./mtr --mysqld=--innodb-purge-threads=9 --big-test --no-reorder \ galera.galera_parallel_autoinc_largetrx galera.galera_var_slave_threads The result difference is dependent on innodb_purge_threads.
-
Marko Mäkelä authored
buf_dump(): Correct the printf format passed to buf_dump_status() to match the argument types. Revert the changes to storage/xtradb. XtraDB is not being compiled for 10.2. The unused copy that we have in the 10.2 branch is only getting merges from 10.1. Disable the test sys_vars.innodb_buffer_pool_dump_pct_function because it is unstable on buildbot.
-
Marko Mäkelä authored
MDEV-11454: Make innodb_buffer_pool_dump_pct refer to the entire buffer pool size
-
- 21 Feb, 2017 1 commit
-
-
Sergei Golubchik authored
copy-paste error
-
- 20 Feb, 2017 1 commit
-
-
Marko Mäkelä authored
The function trx_purge_stop() was calling os_event_reset(purge_sys->event) before calling rw_lock_x_lock(&purge_sys->latch). The os_event_set() call in srv_purge_coordinator_suspend() is protected by that X-latch. It would seem a good idea to consistently protect both os_event_set() and os_event_reset() calls with a common mutex or rw-lock in those cases where os_event_set() and os_event_reset() are used like condition variables, tied to changes of shared state. For each os_event_t, we try to document the mutex or rw-lock that is being used. For some events, frequent calls to os_event_set() seem to try to avoid hangs. Some events are never waited for infinitely, only timed waits, and os_event_set() is used for early termination of these waits. os_aio_simulated_put_read_threads_to_sleep(): Define as a null macro on other systems than Windows. TODO: remove this altogether and disable innodb_use_native_aio on Windows. os_aio_segment_wait_events[]: Initialize only if innodb_use_native_aio=0. log_write_flush_to_disk_low(): Invoke log_mutex_enter() at the end, to avoid race conditions when changing the system state. (No potential race condition existed before MySQL 5.7.)
-
- 19 Feb, 2017 1 commit
-
-
Marko Mäkelä authored
Revert the MDEV-4396 tweak to innodb.innodb_bug14676111. We must fix the root cause instead. Allow gcol.innodb_virtual_purge to run on a non-debug build (If wait_innodb_all_purged.inc is used in a non-debug test, it will have no effect.) Add the test innodb.index_merge_threshold from MySQL 5.7.
-
- 17 Feb, 2017 1 commit
-
-
Daniel Bartholomew authored
-
- 16 Feb, 2017 3 commits
-
-
Marko Mäkelä authored
The test innodb.log_file_size_checkpoint was originally added to MySQL 5.7 by me in a bug fix, to fix the interaction of WL#6494 (redo log resizing, introduced in MySQL 5.6) and WL#7142 (data file discovery based on MLOG_FILE_NAME records, introduced in MySQL 5.7): commit 70f9ef4e1220827132b50275ca7272f2bcca1864 Author: Marko Mäkelä <marko.makela@oracle.com> Date: Wed May 21 13:31:29 2014 +0300 Bug#18755095 REDO LOG SIZE CHANGE AFTER CRASH RESULTS IN CHECKPOINT AGE ERROR MESSAGE This is a regression from fixing Bug#18730524 REPEATED KILL+RESTART FAILS DUE TO MISSING MLOG_FILE_NAME RECORD innobase_start_or_create_for_mysql(): Invoke fil_names_clear() before creating the "checkpoint" when changing redo log files. Approved by Jimmy Yang on IM. The relevant part of the test is that fil_names_clear() is invoked to emit an MLOG_CHECKPOINT record before the redo log files are deleted. In case the server is killed before ib_logfile0 has been deleted, the old (not-yet-resized) redo log will be treated as valid. We do not need to create a large number of tables for that.
-
Marko Mäkelä authored
I introduced the rec_printer object in MySQL to pretty-print raw InnoDB records and index tuples in diagnostic messages. These objects are being constructed unconditionally, even though the DBUG_PRINT is not enabled. The unnecessary work is avoided by simply passing rec_printer(…).str() to the DBUG_LOG macro that was introduced in MDEV-11713.
-
Igor Babaev authored
Supported queries with window functions when GROUP BY could be optimized away.
-
- 15 Feb, 2017 7 commits
-
-
Sergei Petrunia authored
The issue was that JOIN::rollup_write_data() used JOIN::tmp_table_param::[start_]recinfo, which had uninitialized data. These fields have uninitialized data, because JOIN::tmp_table_param currently only stores some grouping-related data fields. The data about the work (temporary) tables themselves is stored in join->join_tab[...].tmp_table_param. The fix is to make JOIN::rollup_write_data follow this convention and look at the right TMP_TABLE_PARAM object
-
Vicențiu Ciorbaru authored
An upgrade is still necessary however.
-
Vicențiu Ciorbaru authored
This bug is fixed by MDEV-10092. Add test case to check for regressions.
-
Vicențiu Ciorbaru authored
The bug was not visible in current HEAD. Introduced test case to catch regressions. Also improve error messages regarding distinct usage in window functions.
-
Vicențiu Ciorbaru authored
This issue is fixed by the patch for MDEV-10092. Add test case to check for regressions though.
-
Vicențiu Ciorbaru authored
The bug was caused by several issues. 2 problems in seek_io_cache. Due to wrong offsets used, we would end up seeking way too much (first change), or over the intended seek point (second change). Fixing it requires correctly detecting available data in buffer (first change), and not using "IO_SIZE alligned" reads. The second is needed because _my_b_cache_read adjusts the pos_in_file itself based on read_pos and read_end. Pretending buffer is empty when we want to force a read will aleviate this problem. Secondly, the big-table cursors didn't repect the interface definitions of always returning the rownumber that Table_read_cursor::fetch() would activate. At the same time, next(), prev() and move_to() should not perform any row activation.
-
Vicențiu Ciorbaru authored
Window functions need to be computed after applying the HAVING clause. An optimization that we have for regular, non-window function, cases is to apply having only during sending of the rows to the client. This allows rows that should be filtered from the temporary table used to store aggregation results to be stored there. This behaviour is undesireable for window functions, as we have to compute window functions on the result-set after HAVING is applied. Storing extra rows in the table leads to wrong values as the frame bounds might capture those -to be filtered afterwards- rows.
-