- 28 Jul, 2020 4 commits
-
-
Dan Solodko authored
-
Daniel Black authored
FreeBSD's inbuilt default jemalloc means its pointless to do a package search on it. The paths are already set by the system defaults.
-
Daniel Black authored
riscv64 fails to build because the use of #include <atomic> needs to link with -latomic. per https://github.com/riscv/riscv-gnu-toolchain/issues/183#issuecomment-253721765
-
Krunal Bauskar authored
RocksDB fails to build on arm64: undefined reference to `crc32c_arm64(unsigned int, unsigned char const*, unsigned int)' MariaDB uses storage/rocksdb/build_rocksdb.cmake to compile RocksDB. Said cmake missed adding crc32c_arm64 compilation target so if machine native architecture supported crc32 then complier would enable usage of function defined in crc32c_arm64 causing the listed error. Added crc32c_arm64 complition target. closes #1642
-
- 27 Jul, 2020 4 commits
-
-
Daniel Black authored
FreeBSD doesn't have bash installed by default and sh has sufficient job control for this test. $ mysql-test/mtr --mem --max-test-fail=30 --force --parallel=1 rocksdb.concurrent_alter Logging: /home/dan/mariadb-server-10.5/mysql-test/mysql-test-run.pl --mem --max-test-fail=30 --force --parallel=1 rocksdb.concurrent_alter vardir: /usr/home/dan/build-mariadb-server-10.5/mysql-test/var Checking leftover processes... Removing old var directory... Creating var directory '/usr/home/dan/build-mariadb-server-10.5/mysql-test/var'... - symlinking 'var' to '/tmp/var_auto_P81m' Checking supported features... MariaDB Version 10.5.4-MariaDB - SSL connections supported - binaries built with wsrep patch Collecting tests... Installing system database... ============================================================================== TEST RESULT TIME (ms) or COMMENT -------------------------------------------------------------------------- worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019 rocksdb.concurrent_alter 'write_committed' [ pass ] 16348 rocksdb.concurrent_alter 'write_prepared' [ pass ] 16771 -------------------------------------------------------------------------- The servers were restarted 1 times Spent 33.119 of 41 seconds executing testcases Completed: All 2 tests were successful. $ uname -a FreeBSD freebsd 12.1-RELEASE-p6 FreeBSD 12.1-RELEASE-p6 GENERIC amd64
-
Thirunarayanan Balathandayuthapani authored
commit ad6171b9 (MDEV-22456) introduced code to buf_page_create() that would lazily drop adaptive hash index entries for an index that has been evicted from the data dictionary cache. Unfortunately, that call was missing adequate protection. While the btr_search_drop_page_hash_index(block) was executing, the block could be reused for something else. buf_page_create(): If btr_search_drop_page_hash_index() must be invoked, pin the block before releasing the buf_pool->page_hash lock, so that the block cannot be grabbed by other threads.
-
Jan Lindström authored
-
Varun Gupta authored
Removed an unnecessary ifndef which was printing the window name for a named window only in the case of debug build. The print() for the window function should behave in the same way on both release and debug builds.
-
- 24 Jul, 2020 4 commits
-
-
Thirunarayanan Balathandayuthapani authored
MDEV-14711 Assertion `mode == 16 || mode == 12 || !fix_block->page.file_page_was_freed' failed in buf_page_get_gen (rollback requesting a freed undo page) Problem: ======= In buf_cur_optimistic_latch_leaves(), requesting a left block with BTR_GET after releasing current block. But there is no guarantee that left block could be still available. Fix: ==== (1) In btr_cur_optimistic_latch_leaves(), replace the BUF_GET with BUF_GET_POSSIBLY_FREED for fetching left block. (2) Once InnoDB acquires left block, it should check FIL_PAGE_NEXT with current block page number. If not, release cursor->left_block and return false.
-
mkaruza authored
Fixed by new recording test recording
-
sjaakola authored
The sporadic test hangs happen because of mutex dealock between innodb background threads and two test connection executions. The test sets variable innodb_disallow_writes, which blocks all writes to filesyste. The test logic is to execute an INSERT, which should hang because of filesytstem writes are blocked, and through another session verify by SELECT that this hanging happens. The SELECT session will then release innodb_disallow_writes blocking. However, filesystem write blocking affects also innodb background threads and they may hang while keeping some other resources locked. As an example, in one test hang situation, buffer pool access was blocked. And, if buffer pool is blocked, the test connections will be blocked as well, and the SELECT session will not be able to continue to release the innodb_disallow_writes. The fix in this commit is refactoring of the test logic. The test will now set first innodb_disallow_writes blocking, and then record a hash of data directory's filesystem contents. This works as checksum of the state of data on the datadirectory. Then some SQL load is tried on both nodes, these sessions will be blocking due to frozen file system state. The test will have a short sleep to allow innodb background threads to loop and possibly encounter innodb_disallow_writes blocking as well. After the sleep, the test will record file system checksun for the second time, and then release the innodb_disallow-writes blocking. Finally, the two checksums are compared, they should be identical to verify that nothing was written on datadirectory during the test execution. The checksum is implemented by md5sum hash over all files found in datadirectory by find command. all these file hashes are hashed together by one more md5sum. The test therefore depends on md5sum and find. find may work differently with some OS distributions, e.g. freebsd may be problematic.
-
Jan Lindström authored
Add wait_condition
-
- 23 Jul, 2020 3 commits
-
-
Thirunarayanan Balathandayuthapani authored
Problem: ======== dict_load_table_one() doesn't handle the scenario where clustered index page is FIL_NULL when DICT_ERR_IGNORE_INDEX_ROOT mode is set. Fix: ==== InnoDB should set the file_unreadable when it can't find the clustered index root page.
-
Thirunarayanan Balathandayuthapani authored
- Due to commit fe95cb2e (MDEV-16125), InnoDB master thread does not need to call srv_resume_thread() and therefore there is no need to wake up the thread. Due to the above patch, InnoDB should remove the following dead code. srv_check_activity(): Makes the parameter as in,out and returns the recent activity value innobase_active_small(): Removed srv_active_wake_master_thread(): Removed srv_wake_master_thread(): Removed srv_active_wake_master_thread_low(): Removed Simplify srv_master_thread() and remove switch cases, added the assert. Replace srv_wake_master_thread() with srv_inc_activity_count() INNOBASE_WAKE_INTERVAL: Removed
-
Sujatha authored
MDEV-14203: rpl.rpl_extra_col_master_myisam, rpl.rpl_slave_load_tmpdir_not_exist failed in buildbot with a warning Problem: ======= rpl.rpl_slave_load_tmpdir_not_exist 'stmt' w3 [ fail ] Found warnings/errors in server log file! Test ended at 2017-09-27 20:34:55 [Warning] Master is configured to log replication events with checksum, but will not send such events to slaves that cannot process them ^ Found warnings in /mnt/buildbot/build/mariadb-10.2.10/mysql-test/var/3/log/mysqld.1.err ok Analysis: ======== When slave tries to connect to master 'get_master_version_and_clock' function is invoked to perform elaborated slave-master handshake. During this process slave server queries master server, to know if it is checksum aware and at the same time master is notified about its CRC-awareness. The master's side instant value of @@global.binlog_checksum is stored in the dump thread's uservar area as well as cached locally to become known in consensus by master and slave. Post hand-shake slave requests master for binlog dump. It sends 'COM_BINLOG_DUMP'. This command is sent to master by 'cli_advanced_command' call. If there is some temporary network failure during this request_dump call, 'end_server' is invoked to close the current connection between master and slave. Upon connection close the dump thread on the master gets terminated and it clears the 'uservar' data it got through master-slave handshake. The 'COM_BINLOG_DUMP' command is sent once again without master-slave handshake. Since the checksum data is not available with new dump thread a warning gets reported. Fix: === Upon network write error donot attempt reconnect, proceed to master-slave handshake. This ensures that master is aware of slave's capability to use checksums.
-
- 22 Jul, 2020 3 commits
-
-
Thirunarayanan Balathandayuthapani authored
__pthread_cond_timedwait() in page cleaner hangs if os time moved backwards.Workaround could be waking up the page cleaner thread in logs_empty_and_mark_files_at_shutdown(). But there is possibility that server could hang when server is running. So InnoDB should wake up page cleaner thread periodically in srv_master_do_idle_tasks().
-
Thirunarayanan Balathandayuthapani authored
There can be multiple MLOG_CHECKPOINT record for the same checkpoint. During recovery, InnoDB could encounter the previous MLOG_CHECKPOINT for the checkpoint lsn. So the assertion mlog_checkpoint_lsn <= recovered_lsn is wrong.
-
Nikita Malyavin authored
-
- 21 Jul, 2020 2 commits
-
-
Nikita Malyavin authored
-
Nikita Malyavin authored
* Allocate items on thd->mem_root while refixing vcol exprs * Make vcol tree changes register and roll them back after the statement is executed. Explanation: Due to collation implementation specifics an Item tree could change while fixing. The tricky thing here is to make it on a proper arena. It's usually not a problem when a field is deterministic, however, makes a pain vice-versa, during allocation allocating. A non-deterministic field should be refixed on each statement, since it depends on the environment state. Changing the tree will be temporary and therefore it should be reverted after the statement execution.
-
- 20 Jul, 2020 4 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
When InnoDB is extending a data file, it is updating the FSP_SIZE field in the first page of the data file. In commit 8451e090 (MDEV-11556) we removed a work-around for this bug and made recovery stricter, by making it track changes to FSP_SIZE via redo log records, and extend the data files before any changes are being applied to them. It turns out that the function fsp_fill_free_list() is not crash-safe with respect to this when it is initializing the change buffer bitmap page (page 1, or generally, N*innodb_page_size+1). It uses a separate mini-transaction that is committed (and will be written to the redo log file) before the mini-transaction that actually extended the data file. Hence, recovery can observe a reference to a page that is beyond the current end of the data file. fsp_fill_free_list(): Initialize the change buffer bitmap page in the same mini-transaction. The rest of the changes are fixing a bug that the use of the separate mini-transaction was attempting to work around. Namely, we must ensure that no other thread will access the change buffer bitmap page before our mini-transaction has been committed and all page latches have been released. That is, for read-ahead as well as neighbour flushing, we must avoid accessing pages that might not yet be durably part of the tablespace. fil_space_t::committed_size: The size of the tablespace as persisted by mtr_commit(). fil_space_t::max_page_number_for_io(): Limit the highest page number for I/O batches to committed_size. MTR_MEMO_SPACE_X_LOCK: Replaces MTR_MEMO_X_LOCK for fil_space_t::latch. mtr_x_space_lock(): Replaces mtr_x_lock() for fil_space_t::latch. mtr_memo_slot_release_func(): When releasing MTR_MEMO_SPACE_X_LOCK, copy space->size to space->committed_size. In this way, read-ahead or flushing will never be invoked on pages that do not yet exist according to FSP_SIZE.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 18 Jul, 2020 1 commit
-
-
Varun Gupta authored
-
- 16 Jul, 2020 5 commits
-
-
Julius Goryavsky authored
-
Julius Goryavsky authored
-
Julius Goryavsky authored
Server auto-sets lower_case_file_system value based on default datadir's behavior instead of instead of using the directory specified by the user through the configuration file or command line options. This patch fixes this problem.
-
Julius Goryavsky authored
Server auto-sets lower_case_file_system value based on default datadir's behavior instead of instead of using the directory specified by the user through the configuration file or command line options. This patch fixes this problem.
-
Marko Mäkelä authored
In commit 0f90728b (MDEV-16809) we introduced the configuration option innodb_log_optimize_ddl for controlling whether native index creation or table-rebuild in InnoDB should avoid writing full redo log. Fungo Wang reported that this option is causing occasional failures. The reason is that pages may be written to data files in an inconsistent state. Applying log records to such inconsistent pages may fail. The solution is to always invoke PageBulk::finish() before page latches may be released, to ensure that the page contents is in a consistent state. Something similar was implemented in MySQL 8.0.13: mysql/mysql-server@d1254b947354e0f5b7223b09c521bd85f22e1e31 buf_block_t::skip_flush_check: Remove. Suppressing consistency checks is a bad idea. PageBulk::needs_finish(): New predicate: Determine whether PageBulk::finish() must fix up the page. PageBulk::init(): Clear PAGE_DIRECTION to ensure that needs_finish() will hold. We change the field from PAGE_NO_DIRECTION to 0 and back without writing redo log. This trick avoids the need to introduce any new data member to PageBulk. PageBulk::insert(): Replace some high-level accessors to bypass debug assertions related to PAGE_HEAP_TOP that we will be violating until finish() has been executed. PageBulk::finish(): Tolerate m_rec_no==0. We must invoke this also on an empty page, to ensure that PAGE_HEAP_TOP is initialized. PageBulk::commit(): Always invoke finish(). PageBulk::release(), BtrBulk::pageSplit(), BtrBulk::storeExt(), BtrBulk::finish(): Invoke PageBulk::finish().
-
- 15 Jul, 2020 5 commits
-
-
Marko Mäkelä authored
page_simple_validate_old(), page_simple_validate_new(): Require PAGE_N_DIR_SLOTS to be at least 2.
-
Marko Mäkelä authored
MDEV-22721 (commit eba2d10a) inadvertently introduced an infinite loop. page_validate(): Remove the infinite loop.
-
Vladislav Vaintroub authored
-
Daniel Black authored
-Wl,-z,relro,-z,now are linker flags and should be checked as such. TODO: perform module, exe shared checks separately rather than a pure linker check.
-
Varun Gupta authored
An oveflow was happening on windows because on Windows sizeof(ulong) is 4 bytes while it is 8 bytes on Linux. Switched avg_frequency and avg length for column statistics to ulonglong. Switched avg_frequency for index statistics to ulonglong.
-
- 14 Jul, 2020 5 commits
-
-
Marko Mäkelä authored
The only InnoDB change between MySQL 5.7.30 and MySQL 5.7.31 that is applicable to MariaDB Server was applied in commit 8d061996 (MDEV-23161).
-
Marko Mäkelä authored
-
Marko Mäkelä authored
The only InnoDB changes between Percona XtraDB Server 5.6.47-87.0 and 5.6.48-88.0 are related to InnoDB changes between MySQL 5.6.47 and MySQL 5.6.48, which we had already applied.
-
Marko Mäkelä authored
There were no InnoDB changes between MySQL 5.6.48 and MySQL 5.6.49.
-
Marko Mäkelä authored
This issue was originally reported by Fungo Wang, along with a fix, as MySQL Bug #98990. His suggested fix was applied as part of mysql/mysql-server@a003fc373d1adb3ccea353b5d7d83f6c4c552383 and released in MySQL 5.7.31. i_s_metrics_fill(): Add the missing call to Field::set_notnull(), and simplify some code.
-