1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

slave_open_temp_tables to Atomic_counter

This commit is contained in:
Sergey Vojtovich
2020-04-15 20:38:25 +04:00
parent 10cdf5230d
commit 4bd9f82a8f
6 changed files with 12 additions and 31 deletions

View File

@ -1137,9 +1137,7 @@ TABLE *THD::open_temporary_table(TMP_TABLE_SHARE *share,
/* Increment Slave_open_temp_table_definitions status variable count. */
if (rgi_slave)
{
thread_safe_increment32(&slave_open_temp_tables);
}
slave_open_temp_tables++;
DBUG_PRINT("tmptable", ("Opened table: '%s'.'%s table: %p",
table->s->db.str,
@ -1245,7 +1243,7 @@ void THD::close_temporary_table(TABLE *table)
/* Natural invariant of temporary_tables */
DBUG_ASSERT(slave_open_temp_tables || !temporary_tables);
/* Decrement Slave_open_temp_table_definitions status variable count. */
thread_safe_decrement32(&slave_open_temp_tables);
slave_open_temp_tables--;
}
DBUG_VOID_RETURN;