summaryrefslogtreecommitdiff
path: root/storage/innobase/que/que0que.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | |
* | | Merge 10.2 into 10.3Marko Mäkelä2019-04-271-2/+0
|\ \ \ | |/ /
| * | MDEV-19231 make DB_SUCCESS equal to 0Eugene Kosov2019-04-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a micro optimization. On most platforms CPUs has instructions to compare with 0 fast. DB_SUCCESS is the most popular outcome of functions and this patch optimized code like (err == DB_SUCCESS) BtrBulk::finish(): bogus assertion fixed fil_node_t::read_page0(): corrected usage of os_file_read() que_eval_sql(): bugus assertion removed. Apparently it checked that the field was assigned after having been zero-initialized at object creation. It turns out that the return type of os_file_read_func() was changed in mysql/mysql-server@98909cefbc37e54efc6452c7e95bccbf64ac9213 (MySQL 5.7) from ibool to dberr_t. The reviewer (if there was any) failed to point out that because of future merges, it could be a bad idea to change the return type of a function without changing the function name. This change was applied to MariaDB 10.2.2 in commit 2e814d4702d71a04388386a9f591d14a35980bfe but the MariaDB-specific code was not fully adjusted accordingly, e.g. in fil_node_open_file(). Essentially, code like !os_file_read(...) became dead code in MariaDB and later in Mariabackup 10.2, and we could be dealing with an uninitialized buffer after a failed page read.
* | | Merge 10.2 into 10.3Marko Mäkelä2018-11-191-5/+0
|\ \ \ | |/ /
| * | Remove many redundant #include from InnoDBMarko Mäkelä2018-11-191-5/+0
| | |
* | | Merge 10.2 into 10.3Marko Mäkelä2018-11-061-1/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | main.derived_cond_pushdown: Move all 10.3 tests to the end, trim trailing white space, and add an "End of 10.3 tests" marker. Add --sorted_result to tests where the ordering is not deterministic. main.win_percentile: Add --sorted_result to tests where the ordering is no longer deterministic.
| * | MDEV-17073 INSERT…ON DUPLICATE KEY UPDATE became more deadlock-proneMarko Mäkelä2018-11-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thd_rpl_stmt_based(): A new predicate to check if statement-based replication is active. (This can also hold when replication is not in use, but binlog is.) que_thr_stop(), row_ins_duplicate_error_in_clust(), row_ins_sec_index_entry_low(), row_ins(): On a duplicate key error, only lock all index records when statement-based replication is in use.
* | | Fix most -Wsign-conversion in InnoDBMarko Mäkelä2018-04-281-1/+1
| | | | | | | | | | | | Change innodb_buffer_pool_size, innodb_fill_factor to unsigned.
* | | MDEV-15914: Remove trx_t::undo_mutexMarko Mäkelä2018-04-261-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The trx_t::undo_mutex covered both some main-memory data structures (trx_undo_t) and access to undo pages. The trx_undo_t is only accessed by the thread that is associated with a running transaction. Likewise, each transaction has its private set of undo pages. The thread that is associated with an active transaction may lock multiple undo pages concurrently, but no other thread may lock multiple pages of a foreign transaction. Concurrent access to the undo logs of an active transaction is possible, but trx_undo_get_undo_rec_low() only locks one undo page at a time, without ever holding any undo_mutex. It seems that the trx_t::undo_mutex would have been necessary if multi-threaded execution or rollback of a single transaction had been implemented in InnoDB.
* | | Merge 10.2 into bb-10.2-extMarko Mäkelä2018-02-151-1/+0
|\ \ \ | |/ /
| * | Dead code removal: sess_tMarko Mäkelä2018-02-151-2/+1
| | | | | | | | | | | | | | | The session object is not really needed for anything. We can directly create and free the dummy purge_sys->query->trx.
* | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2018-02-081-6/+3
|\ \ \ | |/ /
| * | MDEV-15199 Referential integrity broken in ON DELETE CASCADEMarko Mäkelä2018-02-071-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-14222 Unnecessary 'cascade' memory allocation for every updated row when there is no FOREIGN KEY This reverts the MySQL 5.7.2 change https://github.com/mysql/mysql-server/commit/377774689bf6a16af74182753fe950d514c2c6dd which introduced these problems. MariaDB 10.2.2 inherited these problems in commit 2e814d4702d71a04388386a9f591d14a35980bfe. The FOREIGN KEY CASCADE and SET NULL operations implemented as procedural recursion are consuming more than 8 kilobytes of stack (9 stack frames) per iteration in a non-debug GNU/Linux AMD64 build. This is why we need to limit the maximum recursion depth to 15 steps instead of the 255 that it used to be in MySQL 5.7 and MariaDB 10.2. A corresponding change was made in MySQL 5.7.21 in https://github.com/mysql/mysql-server/commit/7b26dc98a624d5cdf79cd5eee455cb03e3bccb5a
* | | MDEV-14824 Assertion `!trx_is_started(trx)' failed in ↵Marko Mäkelä2018-01-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | innobase_start_trx_and_assign_read_view In CREATE SEQUENCE or CREATE TEMPORARY SEQUENCE, we should not start an InnoDB transaction for inserting the sequence status record into the underlying no-rollback table. Because we did this, a debug assertion failure would fail in START TRANSACTION WITH CONSISTENT SNAPSHOT after CREATE TEMPORARY SEQUENCE was executed. row_ins_step(): Do not start the transaction. Let the caller do that. que_thr_step(): Start the transaction before calling row_ins_step(). row_ins_clust_index_entry(): Skip locking and undo logging for no-rollback tables, even for temporary no-rollback tables. row_ins_index_entry(): Allow trx->id==0 for no-rollback tables. row_insert_for_mysql(): Do not start a transaction for no-rollback tables.
* | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-06-151-1/+2
|\ \ \ | |/ /
| * | Fix some printf format type mismatchMarko Mäkelä2017-06-061-1/+2
| | |
* | | Follow-up fixes for MDEV-10139 Support for InnoDB SEQUENCE objectsMarko Mäkelä2017-05-241-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because SEQUENCE objects or NO_ROLLBACK tables do not support locking or MVCC or transactions, avoid starting a transaction. row_upd_step(): Do not start a transaction. Let the caller do that. que_thr_step(): Call trx_start_if_not_started_xa() for QUE_NODE_UPDATE. (The InnoDB SQL parser is not used for accessing NO_ROLLBACK tables.) row_ins_step(): Correct a too strict assertion and comment about concurrency. Multiple concurrent readers are allowed. row_update_for_mysql_using_upd_graph(): Do not start the transaction for NO_ROLLBACK tables. row_search_mvcc(): For NO_ROLLBACK tables, skip locking even inside LOCK TABLES. Only call trx_start_if_not_started() at the start of a statement, not for each individual request.
* | MDEV-12271 Port MySQL 8.0 Bug#23150562 REMOVE UNIV_MUST_NOT_INLINE AND ↵Marko Mäkelä2017-03-171-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Shut down InnoDB after aborted startup.Marko Mäkelä2017-02-011-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes memory leaks in tests that cause InnoDB startup to fail. buf_pool_free_instance(): Also free buf_pool->flush_rbt, which would normally be freed when crash recovery finishes. fil_node_close_file(), fil_space_free_low(), fil_close_all_files(): Relax some debug assertions to tolerate !srv_was_started. innodb_shutdown(): Renamed from innobase_shutdown_for_mysql(). Changed the return type to void. Do not assume that all subsystems were started. que_init(), que_close(): Remove (empty functions). srv_init(), srv_general_init(): Remove as global functions. srv_free(): Allow srv_sys=NULL. srv_get_active_thread_type(): Only return SRV_PURGE if purge really is running. srv_shutdown_all_bg_threads(): Do not reset srv_start_state. It will be needed by innodb_shutdown(). innobase_start_or_create_for_mysql(): Always call srv_boot() so that innodb_shutdown() can assume that it was called. Make more subsystems dependent on SRV_START_STATE_STAT. srv_shutdown_bg_undo_sources(): Require SRV_START_STATE_STAT. trx_sys_close(): Do not assume purge_sys!=NULL. Do not call buf_dblwr_free(), because the doublewrite buffer can exist while the transaction system does not. logs_empty_and_mark_files_at_shutdown(): Do a faster shutdown if !srv_was_started. recv_sys_close(): Invoke dblwr.pages.clear() which would normally be invoked by buf_dblwr_process(). recv_recovery_from_checkpoint_start(): Always release log_sys->mutex. row_mysql_close(): Allow the subsystem not to exist.
* | Merge InnoDB 5.7 from mysql-5.7.14.Jan Lindström2016-09-081-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | 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-144/+115
|/ | | | | | | | | | | | | | | | | | | | | | | 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.24Sergei Golubchik2015-05-041-27/+1
|
* move to storage/innobaseSergei Golubchik2015-05-041-0/+1318