summaryrefslogtreecommitdiff
path: root/storage/csv
diff options
context:
space:
mode:
Diffstat (limited to 'storage/csv')
-rw-r--r--storage/csv/ha_tina.cc24
1 files changed, 3 insertions, 21 deletions
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 6bd8447720c..1b5098a7519 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -817,27 +817,9 @@ bool ha_tina::check_if_locking_is_allowed(uint sql_command,
uint count,
bool called_by_logger_thread)
{
- /*
- Deny locking of the log tables, which is incompatible with
- concurrent insert. Unless called from a logger THD:
- general_log_thd or slow_log_thd.
- */
- if (table->s->log_table &&
- sql_command != SQLCOM_TRUNCATE &&
- !(sql_command == SQLCOM_FLUSH &&
- type & REFRESH_LOG) &&
- !called_by_logger_thread &&
- (table->reginfo.lock_type >= TL_READ_NO_INSERT))
- {
- /*
- The check >= TL_READ_NO_INSERT denies all write locks
- plus the only read lock (TL_READ_NO_INSERT itself)
- */
- table->reginfo.lock_type == TL_READ_NO_INSERT ?
- my_error(ER_CANT_READ_LOCK_LOG_TABLE, MYF(0)) :
- my_error(ER_CANT_WRITE_LOCK_LOG_TABLE, MYF(0));
- return FALSE;
- }
+ if (!called_by_logger_thread)
+ return check_if_log_table_locking_is_allowed(sql_command, type, table);
+
return TRUE;
}