Skip to content

Commit

Permalink
Extend trx_trx library
Browse files Browse the repository at this point in the history
  • Loading branch information
romz-pl committed Sep 6, 2019
1 parent 64a9b65 commit 43b5e5c
Show file tree
Hide file tree
Showing 40 changed files with 129 additions and 63 deletions.
5 changes: 5 additions & 0 deletions storage/innobase/api/api0api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ this program; if not, write to the Free Software Foundation, Inc.,
3/20/2011 Jimmy Yang extracted from Embedded InnoDB
*******************************************************/

#include <innodb/trx_trx/trx_assign_read_view.h>
#include <innodb/trx_trx/trx_commit.h>
#include <innodb/trx_trx/trx_free_for_mysql.h>
#include <innodb/trx_trx/trx_allocate_for_mysql.h>
#include <innodb/trx_trx/trx_start_if_not_started.h>
#include <innodb/memory_check/memory_check.h>
#include <innodb/data_types/dfield_get_data.h>
#include <innodb/data_types/dfield_get_len.h>
Expand Down
1 change: 1 addition & 0 deletions storage/innobase/btr/btr0btr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
Created 6/2/1994 Heikki Tuuri
*******************************************************/

#include <innodb/trx_trx/trx_is_interrupted.h>
#include <innodb/page/page_zip_compress.h>
#include <innodb/page/page_zip_copy_recs.h>
#include <innodb/page/page_zip_empty_size.h>
Expand Down
1 change: 1 addition & 0 deletions storage/innobase/buf/buf0flu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include <sys/types.h>
#include <time.h>

#include <innodb/trx_trx/trx_is_interrupted.h>
#include <innodb/sync_mutex/mutex_destroy.h>
#include <innodb/buf_calc/buf_calc_page_new_checksum.h>
#include <innodb/buf_calc/buf_calc_page_old_checksum.h>
Expand Down
1 change: 1 addition & 0 deletions storage/innobase/buf/buf0lru.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
Created 11/5/1995 Heikki Tuuri
*******************************************************/

#include <innodb/trx_trx/trx_is_interrupted.h>
#include <innodb/memory_check/memory_check.h>
#include <innodb/logger/fatal.h>
#include <innodb/buf_calc/BlockReporter.h>
Expand Down
3 changes: 3 additions & 0 deletions storage/innobase/dict/dict0dict.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ this program; if not, write to the Free Software Foundation, Inc.,

#include "my_config.h"

#include <innodb/trx_trx/trx_commit_for_mysql.h>
#include <innodb/trx_trx/trx_free_for_background.h>
#include <innodb/trx_trx/trx_allocate_for_background.h>
#include <innodb/trx_trx/trx_set_dict_operation.h>
#include <innodb/page/page_zip_empty_size.h>
#include <innodb/page/page_zip_stat_per_index.h>
Expand Down
2 changes: 2 additions & 0 deletions storage/innobase/dict/dict0sdi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ this program; if not, write to the Free Software Foundation, Inc.,

#include <algorithm>

#include <innodb/trx_trx/trx_start_if_not_started.h>

#include <current_thd.h>
#include <sql_class.h>
#include <sql_show.h>
Expand Down
7 changes: 7 additions & 0 deletions storage/innobase/dict/dict0stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include <map>
#include <vector>

#include <innodb/trx_trx/trx_commit_for_mysql.h>
#include <innodb/trx_trx/trx_start_internal_read_only.h>
#include <innodb/trx_trx/trx_allocate_for_background.h>
#include <innodb/trx_trx/trx_free_for_background.h>
#include <innodb/trx_trx/trx_start_internal.h>
#include <innodb/trx_trx/trx_start_internal_read_only.h>
#include <innodb/trx_trx/trx_allocate_for_background.h>
#include <innodb/memory_check/memory_check.h>
#include <innodb/page/page_rec_get_next_non_del_marked.h>
#include <innodb/cmp/cmp_rec_rec_with_match.h>
Expand Down
1 change: 1 addition & 0 deletions storage/innobase/fil/fil0fil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The tablespace memory cache */
#include <fcntl.h>
#include <sys/types.h>

#include <innodb/trx_trx/trx_start_if_not_started_xa.h>
#include <innodb/memory_check/memory_check.h>
#include <innodb/clone/clone_mark_active.h>
#include <innodb/clone/clone_mark_abort.h>
Expand Down
1 change: 1 addition & 0 deletions storage/innobase/fts/fts0ast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
Created 2007/3/16 Sunny Bains.
***********************************************************************/

#include <innodb/trx_trx/trx_is_interrupted.h>
#include <innodb/allocator/ut_malloc_nokey.h>

#include <stdlib.h>
Expand Down
2 changes: 2 additions & 0 deletions storage/innobase/fts/fts0fts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ this program; if not, write to the Free Software Foundation, Inc.,
Full Text Search interface
***********************************************************************/

#include <innodb/trx_trx/trx_free_for_background.h>
#include <innodb/trx_trx/trx_allocate_for_background.h>
#include <innodb/trx_trx/trx_get_dict_operation.h>
#include <innodb/logger/fatal.h>
#include <innodb/data_types/dtype_get_charset_coll.h>
Expand Down
2 changes: 2 additions & 0 deletions storage/innobase/fts/fts0opt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include <time.h>
#include <zlib.h>

#include <innodb/trx_trx/trx_free_for_background.h>
#include <innodb/trx_trx/trx_allocate_for_background.h>
#include <innodb/data_types/dfield_get_data.h>
#include <innodb/data_types/dfield_get_len.h>
#include <innodb/memory/mem_heap_zalloc.h>
Expand Down
3 changes: 3 additions & 0 deletions storage/innobase/fts/fts0que.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ this program; if not, write to the Free Software Foundation, Inc.,
Completed 2011/7/10 Sunny and Jimmy Yang
*******************************************************/

#include <innodb/trx_trx/trx_is_interrupted.h>
#include <innodb/trx_trx/trx_free_for_background.h>
#include <innodb/trx_trx/trx_allocate_for_background.h>
#include <innodb/data_types/dfield_get_data.h>
#include <innodb/data_types/dfield_get_len.h>
#include <innodb/memory/ut_memcpy.h>
Expand Down
1 change: 1 addition & 0 deletions storage/innobase/fts/fts0sql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
Created 2007-03-27 Sunny Bains
*******************************************************/

#include <innodb/trx_trx/trx_commit_for_mysql.h>
#include <innodb/memory/mem_heap_printf.h>
#include <innodb/allocator/ut_malloc_nokey.h>
#include <innodb/string/ut_str3cat.h>
Expand Down
16 changes: 16 additions & 0 deletions storage/innobase/handler/ha_innodb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include "my_config.h"
#endif /* !UNIV_HOTBACKUP */

#include <innodb/trx_trx/trx_get_trx_by_xid.h>
#include <innodb/trx_trx/trx_recover_for_mysql.h>
#include <innodb/trx_trx/trx_mark_sql_stat_end.h>
#include <innodb/trx_trx/trx_prepare_for_mysql.h>
#include <innodb/trx_trx/trx_mark_sql_stat_end.h>
#include <innodb/trx_trx/trx_commit_complete_for_mysql.h>
#include <innodb/trx_trx/trx_assign_read_view.h>
#include <innodb/trx_trx/trx_commit_for_mysql.h>
#include <innodb/trx_trx/trx_assign_read_view.h>
#include <innodb/trx_trx/trx_free_for_background.h>
#include <innodb/trx_trx/flags.h>
#include <innodb/trx_trx/trx_start_if_not_started.h>
#include <innodb/trx_trx/trx_start_if_not_started_xa.h>
#include <innodb/trx_trx/trx_disconnect_prepared.h>
#include <innodb/trx_trx/trx_free_for_mysql.h>
#include <innodb/trx_trx/trx_allocate_for_mysql.h>
#include <innodb/trx_trx/trx_is_high_priority.h>
#include <innodb/trx_trx/trx_is_rseg_updated.h>
#include <innodb/trx_trx/trx_get_id_for_print.h>
Expand Down
2 changes: 2 additions & 0 deletions storage/innobase/handler/ha_innopart.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Created Nov 22, 2013 Mattias Jonsson */
#include <strfunc.h>
#include <new>

#include <innodb/trx_trx/trx_is_interrupted.h>
#include <innodb/trx_trx/trx_start_if_not_started.h>
#include <innodb/trx_trx/trx_get_error_index.h>
#include <innodb/data_types/dtuple_create.h>
#include <innodb/data_types/dtuple_set_n_fields.h>
Expand Down
2 changes: 2 additions & 0 deletions storage/innobase/handler/handler0alter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ this program; if not, write to the Free Software Foundation, Inc.,
Smart ALTER TABLE
*******************************************************/

#include <innodb/trx_trx/trx_assign_read_view.h>
#include <innodb/trx_trx/trx_start_if_not_started_xa.h>
#include <innodb/dict_mem/dict_add_col_name.h>
#include <innodb/dict_mem/dict_mem_fill_column_struct.h>
#include <innodb/dict_mem/dict_mem_table_add_col.h>
Expand Down
3 changes: 3 additions & 0 deletions storage/innobase/handler/i_s.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ this program; if not, write to the Free Software Foundation, Inc.,
Created July 18, 2007 Vasil Dimov
*******************************************************/

#include <innodb/trx_trx/flags.h>
#include <innodb/trx_trx/trx_free_for_background.h>
#include <innodb/trx_trx/trx_allocate_for_background.h>
#include <innodb/page/page_zip_reset_stat_per_index.h>
#include <innodb/page/page_zip_stat_per_index.h>
#include <innodb/memory/mem_heap_zalloc.h>
Expand Down
1 change: 1 addition & 0 deletions storage/innobase/ibuf/ibuf0ibuf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ this program; if not, write to the Free Software Foundation, Inc.,

#include <sys/types.h>

#include <innodb/trx_trx/trx_is_interrupted.h>
#include <innodb/dict_mem/dict_add_col_name.h>
#include <innodb/dict_mem/dict_mem_fill_column_struct.h>
#include <innodb/dict_mem/dict_mem_table_add_col.h>
Expand Down
71 changes: 9 additions & 62 deletions storage/innobase/include/trx0trx.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct lock_table_t;
#include "que0types.h"
#include "trx0xa.h"
#include "usr0types.h"
#include <innodb/vector/vector.h>

#ifndef UNIV_HOTBACKUP
#include "fts0fts.h"
#endif /* !UNIV_HOTBACKUP */
Expand All @@ -73,53 +73,11 @@ class ReadView;
// Forward declaration
class FlushObserver;

#include <innodb/trx_trx/trx_dummy_sess.h>
#include <innodb/trx_trx/trx_erase_lists.h>
#include <innodb/trx_trx/flags.h>


#ifndef UNIV_HOTBACKUP

#include <innodb/trx_trx/trx_set_flush_observer.h>
#include <innodb/trx_trx/trx_set_detailed_error.h>
#include <innodb/trx_trx/trx_set_detailed_error_from_file.h>
#include <innodb/trx_trx/trx_allocate_for_background.h>
#include <innodb/trx_trx/trx_allocate_for_mysql.h>
#include <innodb/trx_trx/trx_free_resurrected.h>
#include <innodb/trx_trx/trx_free_for_background.h>
#include <innodb/trx_trx/trx_free_prepared.h>
#include <innodb/trx_trx/trx_disconnect_plain.h>
#include <innodb/trx_trx/trx_disconnect_prepared.h>
#include <innodb/trx_trx/trx_free_for_mysql.h>
#include <innodb/trx_trx/trx_resurrect_locks.h>
#include <innodb/trx_trx/trx_lists_init_at_db_start.h>
#include <innodb/trx_trx/trx_start_if_not_started_xa_low.h>
#include <innodb/trx_trx/trx_start_if_not_started_low.h>
#include <innodb/trx_trx/trx_start_internal_low.h>
#include <innodb/trx_trx/trx_start_internal_read_only_low.h>
#include <innodb/trx_trx/trx_start_if_not_started_xa.h>
#include <innodb/trx_trx/trx_start_if_not_started.h>
#include <innodb/trx_trx/trx_start_internal.h>
#include <innodb/trx_trx/trx_start_internal_read_only.h>
#include <innodb/trx_trx/trx_commit.h>
#include <innodb/trx_trx/trx_commit_low.h>
#include <innodb/trx_trx/trx_cleanup_at_db_startup.h>
#include <innodb/trx_trx/trx_commit_for_mysql.h>
#include <innodb/trx_trx/trx_prepare_for_mysql.h>
#include <innodb/trx_trx/trx_recover_for_mysql.h>
#include <innodb/trx_trx/trx_get_trx_by_xid.h>
#include <innodb/trx_trx/trx_commit_complete_for_mysql.h>
#include <innodb/trx_trx/trx_mark_sql_stat_end.h>
#include <innodb/trx_trx/trx_assign_read_view.h>
#include <innodb/trx_trx/trx_commit_or_rollback_prepare.h>
#include <innodb/trx_trx/trx_commit_node_create.h>
#include <innodb/trx_trx/trx_commit_step.h>
#include <innodb/trx_trx/trx_print_low.h>
#include <innodb/trx_trx/trx_print_latched.h>
#include <innodb/trx_trx/trx_print.h>
#include <innodb/trx_trx/trx_assert_started.h>
#include <innodb/trx_trx/trx_is_interrupted.h>
#include <innodb/trx_trx/trx_is_strict.h>
#include <innodb/trx_trx/TRX_WEIGHT.h>

#include <innodb/trx_trx/trx_weight_ge.h>
#include <innodb/trx_trx/trx_assign_rseg_temp.h>
#include <innodb/trx_trx/trx_pool_init.h>
Expand All @@ -131,7 +89,11 @@ class FlushObserver;
#include <innodb/trx_trx/assert_trx_is_free.h>
#include <innodb/trx_trx/assert_trx_is_inactive.h>
#include <innodb/trx_trx/assert_trx_nonlocking_or_in_list.h>

#include <innodb/trx_trx/trx_rseg_type_t.h>
#include <innodb/trx_trx/trx_isolation_level.h>
#include <innodb/trx_trx/trx_is_started.h>
#include <innodb/trx_trx/commit_node_state.h>
#include <innodb/trx_trx/TrxInInnoDB.h>

#endif /* !UNIV_HOTBACKUP */

Expand All @@ -141,21 +103,13 @@ class FlushObserver;



#include <innodb/trx_trx/trx_rseg_type_t.h>





#ifndef UNIV_HOTBACKUP


#include <innodb/trx_trx/trx_isolation_level.h>
#include <innodb/trx_trx/trx_is_started.h>
#include <innodb/trx_trx/commit_node_state.h>



#ifndef UNIV_HOTBACKUP


/** Commit command node in a query graph */
Expand All @@ -165,13 +119,6 @@ struct commit_node_t {
};




#include <innodb/trx_trx/TrxInInnoDB.h>




#endif /* !UNIV_HOTBACKUP */

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <innodb/univ/univ.h>

#include <innodb/trx_trx/trx_t.h>
#include <innodb/trx_trx/trx_start_internal_read_only.h>
#include <innodb/trx_trx/trx_start_internal_read_only_low.h>

struct trx_t;

Expand Down
2 changes: 2 additions & 0 deletions storage/innobase/lock/lock0lock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ this program; if not, write to the Free Software Foundation, Inc.,

#define LOCK_MODULE_IMPLEMENTATION

#include <innodb/trx_trx/trx_print_low.h>
#include <innodb/trx_trx/trx_print_latched.h>
#include <innodb/trx_trx/trx_is_referenced.h>
#include <innodb/trx_trx/trx_is_high_priority.h>
#include <innodb/trx_trx/trx_arbitrate.h>
Expand Down
1 change: 1 addition & 0 deletions storage/innobase/lock/lock0wait.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ this program; if not, write to the Free Software Foundation, Inc.,

#define LOCK_MODULE_IMPLEMENTATION

#include <innodb/trx_trx/trx_is_interrupted.h>
#include <innodb/trx_trx/trx_is_high_priority.h>
#include <mysql/service_thd_wait.h>
#include <sys/types.h>
Expand Down
5 changes: 5 additions & 0 deletions storage/innobase/log/log0ddl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ this program; if not, write to the Free Software Foundation, Inc.,
Created 12/1/2016 Shaohua Wang
*******************************************************/

#include <innodb/trx_trx/trx_commit_for_mysql.h>
#include <innodb/trx_trx/trx_start_if_not_started.h>
#include <innodb/trx_trx/trx_start_internal.h>
#include <innodb/trx_trx/trx_free_for_background.h>
#include <innodb/trx_trx/trx_allocate_for_background.h>
#include <innodb/trx_trx/trx_set_dict_operation.h>
#include <innodb/cmp/cmp_dtuple_rec.h>
#include <innodb/memory/mem_heap_dup.h>
Expand Down
1 change: 1 addition & 0 deletions storage/innobase/pars/pars0pars.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
/* Historical note: Innobase executed its first SQL string (CREATE TABLE)
on 1/27/1998 */

#include <innodb/trx_trx/trx_commit_node_create.h>
#include <innodb/logger/fatal.h>
#include <innodb/sync_mutex/mutex_free.h>
#include <innodb/memory/mem_heap_strdup.h>
Expand Down
2 changes: 2 additions & 0 deletions storage/innobase/que/que0que.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ this program; if not, write to the Free Software Foundation, Inc.,

#include <stddef.h>

#include <innodb/trx_trx/trx_commit_step.h>

#include "dict0crea.h"
#include "eval0eval.h"
#include "eval0proc.h"
Expand Down
3 changes: 3 additions & 0 deletions storage/innobase/row/row0ftsort.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ this program; if not, write to the Free Software Foundation, Inc.,

#include <sys/types.h>

#include <innodb/trx_trx/trx_start_if_not_started.h>
#include <innodb/trx_trx/trx_free_for_background.h>
#include <innodb/trx_trx/trx_allocate_for_background.h>
#include <innodb/memory_check/memory_check.h>
#include <innodb/dict_mem/dict_mem_index_create.h>
#include <innodb/cmp/cmp_rec_rec_simple.h>
Expand Down
5 changes: 5 additions & 0 deletions storage/innobase/row/row0import.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ this program; if not, write to the Free Software Foundation, Inc.,
Created 2012-02-08 by Sunny Bains.
*******************************************************/

#include <innodb/trx_trx/trx_commit_for_mysql.h>
#include <innodb/trx_trx/trx_is_interrupted.h>
#include <innodb/trx_trx/trx_allocate_for_mysql.h>
#include <innodb/trx_trx/trx_start_if_not_started.h>
#include <innodb/trx_trx/trx_free_for_mysql.h>
#include <innodb/trx_trx/trx_set_dict_operation.h>
#include <innodb/trx_trx/trx_get_dict_operation.h>
#include <innodb/buf_calc/BlockReporter.h>
Expand Down
4 changes: 4 additions & 0 deletions storage/innobase/row/row0ins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ this program; if not, write to the Free Software Foundation, Inc.,
Created 4/20/1996 Heikki Tuuri
*******************************************************/

#include <innodb/trx_trx/trx_print_low.h>
#include <innodb/trx_trx/trx_start_if_not_started_xa.h>
#include <innodb/trx_trx/trx_set_detailed_error.h>
#include <innodb/trx_trx/trx_set_detailed_error_from_file.h>
#include <innodb/memory_check/memory_check.h>
#include <innodb/cmp/cmp_dtuple_rec.h>
#include <innodb/cmp/cmp_dtuple_rec_with_match.h>
Expand Down
2 changes: 2 additions & 0 deletions storage/innobase/row/row0log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ this program; if not, write to the Free Software Foundation, Inc.,
Created 2011-05-26 Marko Makela
*******************************************************/

#include <innodb/trx_trx/trx_is_interrupted.h>
#include <innodb/trx_trx/trx_is_interrupted.h>
#include <innodb/memory_check/memory_check.h>
#include <innodb/data_types/dfield_get_data.h>
#include <innodb/data_types/dfield_get_len.h>
Expand Down
Loading

0 comments on commit 43b5e5c

Please sign in to comment.