Skip to content

Commit

Permalink
SQL: open TRT only after versioned write [#305][fixes #321]
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgs authored and midenok committed Nov 20, 2017
1 parent 655360b commit 72574f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mysql-test/suite/innodb/r/monitor.result
Expand Up @@ -418,7 +418,7 @@ max_count_reset, min_count_reset, count_reset, status
from information_schema.innodb_metrics
where name like "metadata%";
name max_count min_count count max_count_reset min_count_reset count_reset status
metadata_table_handles_opened 3 NULL 3 3 NULL 3 enabled
metadata_table_handles_opened 2 NULL 2 2 NULL 2 enabled
metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_disable = module_metadata;
Expand All @@ -428,7 +428,7 @@ max_count_reset, min_count_reset, count_reset, status
from information_schema.innodb_metrics
where name like "metadata%";
name max_count min_count count max_count_reset min_count_reset count_reset status
metadata_table_handles_opened 3 NULL 3 NULL NULL 0 disabled
metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled
metadata_table_handles_closed 1 NULL 1 NULL NULL 0 disabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_reset_all = module_metadata;
Expand Down
2 changes: 1 addition & 1 deletion sql/sql_table.cc
Expand Up @@ -7430,7 +7430,7 @@ static bool mysql_inplace_alter_table(THD *thd,

{
TR_table trt(thd, true);
if (table->file->native_versioned() && trt != *table_list)
if (thd->vers_update_trt && trt != *table_list)
{
if (opt_transaction_registry && trt.update())
return true;
Expand Down

0 comments on commit 72574f7

Please sign in to comment.