summaryrefslogtreecommitdiff
path: root/storage/innobase/include/os0thread.h
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-24308: Windows improvementsMarko Mäkelä2020-12-031-19/+9
| | | | | This reverts commit e34e53b554e8c3e05e3bd918204cf7ba494b1ae3 and defines os_thread_sleep() is a macro on Windows.
* MDEV-24308: Revert for WindowsMarko Mäkelä2020-11-301-3/+9
| | | | | | | For some reason, InnoDB debug tests on Windows fail due to rw_lock_t if the function call overhead for some os_thread_ code is removed. This change worked fine on Windows in combination with MDEV-24142.
* MDEV-24308: Remove some os_thread_ functionsMarko Mäkelä2020-11-301-27/+4
| | | | | | | | | os_thread_pf(): Remove. os_thread_eq(), os_thread_yield(), os_thread_get_curr_id(): Define as macros. ut_print_timestamp(), ut_sprintf_timestamp(): Simplify.
* MDEV-23399 fixup: Avoid crash on Mariabackup shutdownMarko Mäkelä2020-10-261-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | innodb_preshutdown(): Terminate the encryption threads before the page cleaner thread can be shut down. innodb_shutdown(): Always wait for the encryption threads and page cleaner to shut down. srv_shutdown_all_bg_threads(): Wait for the encryption threads and the page cleaner to shut down. (After an aborted startup, innodb_shutdown() would not be called.) row_get_background_drop_list_len_low(): Remove. os_thread_count: Remove. Alternatively, at the end of srv_shutdown_all_bg_threads() we could try to wait longer for the count to reach 0. On some platforms, an assertion os_thread_count==0 could fail even after a small delay, even though in the core dump all threads would have exited. srv_shutdown_threads(): Renamed from srv_shutdown_all_bg_threads(). Do not wait for the page cleaner to shut down, because the later innodb_shutdown(), which may invoke logs_empty_and_mark_files_at_shutdown(), assumes that it exists.
* MDEV-16264 fixup: Remove unused code and dataMarko Mäkelä2020-09-301-29/+5
| | | | | | | | | | | | | | | | | | | | | | | LATCH_ID_OS_AIO_READ_MUTEX, LATCH_ID_OS_AIO_WRITE_MUTEX, LATCH_ID_OS_AIO_LOG_MUTEX, LATCH_ID_OS_AIO_IBUF_MUTEX, LATCH_ID_OS_AIO_SYNC_MUTEX: Remove. The tpool is not instrumented. lock_set_timeout_event(): Remove. srv_sys_mutex_key, srv_sys_t::mutex, SYNC_THREADS: Remove. srv_slot_t::suspended: Remove. We only ever assigned this data member true, so it is redundant. ib_wqueue_wait(), ib_wqueue_timedwait(): Remove. os_thread_join(): Remove. os_thread_create(), os_thread_exit(): Remove redundant parameters. These were missed in commit 5e62b6a5e06eb02cbde1e34e95e26f42d87fce02.
* Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-1/+1
|\
| * Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
| |\
| | * Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| | |\
| | | * Update FSF addressVicențiu Ciorbaru2019-05-111-1/+1
| | | |
| | | * 5.6.35vicentiu2017-01-071-1/+12
| | | |
* | | | MDEV-17441 - InnoDB transition to C++11 atomicsSergey Vojtovich2018-12-271-1/+1
|/ / / | | | | | | | | | os_thread_count transition to Atomic_counter.
* | | MDEV-12218 Clean up InnoDB parameter validationMarko Mäkelä2018-04-291-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bind more InnoDB parameters directly to MYSQL_SYSVAR and remove "shadow variables". innodb_change_buffering: Declare as ENUM, not STRING. innodb_flush_method: Declare as ENUM, not STRING. innodb_log_buffer_size: Bind directly to srv_log_buffer_size, without rounding it to a multiple of innodb_page_size. LOG_BUFFER_SIZE: Remove. SysTablespace::normalize_size(): Renamed from normalize(). innodb_init_params(): A new function to initialize and validate InnoDB startup parameters. innodb_init(): Renamed from innobase_init(). Invoke innodb_init_params() before actually trying to start up InnoDB. srv_start(bool): Renamed from innobase_start_or_create_for_mysql(). Added the input parameter create_new_db. SRV_ALL_O_DIRECT_FSYNC: Define only for _WIN32. xb_normalize_init_values(): Merge to innodb_init_param().
* | | Make possible to use clang on Windows (clang-cl)Vladislav Vaintroub2018-02-201-5/+1
|/ / | | | | | | | | | | -DWITH_ASAN can be used as well now, on x64 Fix many clang-cl warnings.
* | Add ATTRIBUTE_NORETURN and ATTRIBUTE_COLDMarko Mäkelä2017-08-311-4/+2
| | | | | | | | | | | | | | | | | | | | | | ATTRIBUTE_NORETURN is supported on all platforms (MSVS and GCC-like). It declares that a function will not return; instead, the thread or the whole process will terminate. ATTRIBUTE_COLD is supported starting with GCC 4.3. It declares that a function is supposed to be executed rarely. Rarely used error-handling functions and functions that emit messages to the error log should be tagged such.
* | Minor cleanup of InnoDB shutdownMarko Mäkelä2017-06-291-6/+0
| | | | | | | | | | | | | | os_thread_active(): Remove. srv_shutdown_all_bg_threads(): Assert that high-level threads have already exited. Do not sleep if os_thread_count=0.
* | 10.2 follow-up to MDEV-13039 innodb_fast_shutdown=0 crash due premature ↵Marko Mäkelä2017-06-121-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | purge shutdown before fts_optimize_shutdown() srv_start_state_t: Document the flags. Replace SRV_START_STATE_STAT with SRV_START_STATE_REDO. The srv_bg_undo_sources replaces the original use of SRV_START_STATE_STAT. dict_stats_thread_started, buf_dump_thread_started, buf_flush_page_cleaner_thread_started: Remove (unused). srv_shutdown_all_bg_threads(): Always wait for the I/O threads to exit, also in read-only mode. os_thread_free(): Remove.
* | InnoDB: Remove thread_mutexMarko Mäkelä2017-06-061-8/+0
| | | | | | | | | | | | Use my_atomic for updating os_thread_count. os_thread_init(): Remove.
* | Fix Bug#24605956 SERVER MAY CRASH DUE TO A GLIBC BUG IN HANDLING SHORT-LIVED ↵Vasil Dimov2017-04-261-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | DETACHED THREADS Avoid detaching and exiting from threads that may finish before the caller has returned from pthread_create(). Only exit from such threads, without detach and join with them later. Patch submitted by: Laurynas Biveinis <laurynas.biveinis@gmail.com> RB: 13983 Reviewed by: Sunny Bains <sunny.bains@oracle.com>
* | MDEV-12271 Port MySQL 8.0 Bug#23150562 REMOVE UNIV_MUST_NOT_INLINE AND ↵Marko Mäkelä2017-03-171-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UNIV_NONINL Also, remove empty .ic files that were not removed by my MySQL commit. Problem: InnoDB used to support a compilation mode that allowed to choose whether the function definitions in .ic files are to be inlined or not. This stopped making sense when InnoDB moved to C++ in MySQL 5.6 (and ha_innodb.cc started to #include .ic files), and more so in MySQL 5.7 when inline methods and functions were introduced in .h files. Solution: Remove all references to UNIV_NONINL and UNIV_MUST_NOT_INLINE from all files, assuming that the symbols are never defined. Remove the files fut0fut.cc and ut0byte.cc which only mattered when UNIV_NONINL was defined.
* | Windows : CloseHandle() returned by CreateThread().Vladislav Vaintroub2016-09-131-1/+1
| | | | | | | | | | Don't wait until os_thread_exit to close it. Remove code from innodb_shutdown to close handles on Windows.
* | Merge InnoDB 5.7 from mysql-5.7.14.Jan Lindström2016-09-081-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | Contains also: MDEV-10549 mysqld: sql/handler.cc:2692: int handler::ha_index_first(uchar*): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed. (branch bb-10.2-jan) Unlike MySQL, InnoDB still uses THR_LOCK in MariaDB MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan) enable tests that were fixed in MDEV-10549 MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan) fix main.innodb_mysql_sync - re-enable online alter for partitioned innodb tables
* | Merge InnoDB 5.7 from mysql-5.7.9.Jan Lindström2016-09-021-18/+33
|/ | | | | | | | | | | | | | | | | | | | | | | Contains also MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7 The failure happened because 5.7 has changed the signature of the bool handler::primary_key_is_clustered() const virtual function ("const" was added). InnoDB was using the old signature which caused the function not to be used. MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7 Fixed mutexing problem on lock_trx_handle_wait. Note that rpl_parallel and rpl_optimistic_parallel tests still fail. MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan) Reason: incorrect merge MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan) Reason: incorrect merge
* 5.6.31Sergei Golubchik2016-06-211-2/+2
|
* move to storage/innobaseSergei Golubchik2015-05-041-0/+154