Skip to content

Commit

Permalink
Daemon: TRT check respects --transaction-registry [#302]
Browse files Browse the repository at this point in the history
  • Loading branch information
midenok committed Nov 17, 2017
1 parent 3fc943c commit f39df03
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sql/handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ int ha_commit_trans(THD *thd, bool all)
for (Ha_trx_info *hi= ha_info; hi; hi= hi->next())
{
handlerton *ht= hi->ht();
if (transaction_registry &&
if (opt_transaction_registry &&
(ht->flags & HTON_NATIVE_SYS_VERSIONING) &&
(thd->lex->sql_command == SQLCOM_ALTER_TABLE ?
hi->is_trx_tmp_read_write() :
Expand Down
4 changes: 2 additions & 2 deletions sql/mysqld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ ulonglong slave_skipped_errors;
ulong feature_files_opened_with_delayed_keys= 0, feature_check_constraint= 0;
ulonglong denied_connections;
my_decimal decimal_zero;
my_bool transaction_registry= 1;
my_bool opt_transaction_registry= 1;

/*
Maximum length of parameter value which can be set through
Expand Down Expand Up @@ -6027,7 +6027,7 @@ int mysqld_main(int argc, char **argv)
if (Events::init((THD*) 0, opt_noacl || opt_bootstrap))
unireg_abort(1);

if (!opt_bootstrap)
if (!opt_bootstrap && opt_transaction_registry)
{
THD *thd = new THD(0);
thd->thread_stack= (char*) &thd;
Expand Down
2 changes: 1 addition & 1 deletion sql/mysqld.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ extern my_bool encrypt_tmp_disk_tables, encrypt_tmp_files;
extern ulong encryption_algorithm;
extern const char *encryption_algorithm_names[];
extern const char *quoted_string;
extern my_bool transaction_registry;
extern my_bool opt_transaction_registry;

#ifdef HAVE_PSI_INTERFACE
#ifdef HAVE_MMAP
Expand Down
2 changes: 1 addition & 1 deletion sql/sql_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7432,7 +7432,7 @@ static bool mysql_inplace_alter_table(THD *thd,
TR_table trt(thd, true);
if (table->file->native_versioned())
{
if (transaction_registry && trt.update())
if (opt_transaction_registry && trt.update())
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion sql/sys_vars.cc
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ static Sys_var_enum Sys_vers_alter_history(
static Sys_var_mybool Sys_transaction_registry(
"transaction_registry",
"Enable or disable update of transaction_registry",
GLOBAL_VAR(transaction_registry), CMD_LINE(OPT_ARG),
GLOBAL_VAR(opt_transaction_registry), CMD_LINE(OPT_ARG),
DEFAULT(TRUE));

static Sys_var_ulonglong Sys_binlog_cache_size(
Expand Down
2 changes: 1 addition & 1 deletion sql/vtmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ VTMD_table::update(THD *thd, const char* archive_name)
}

quit:
if (!result && transaction_registry)
if (!result && opt_transaction_registry)
{
TR_table trt(thd, true);
result= trt.update();
Expand Down

0 comments on commit f39df03

Please sign in to comment.