diff options
-rw-r--r-- | handler/ha_innodb.cc | 6 | ||||
-rw-r--r-- | include/sync0rw.ic | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index f4a096068e3..fadc0ecc314 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -9494,7 +9494,7 @@ static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay, static MYSQL_SYSVAR_LONG(additional_mem_pool_size, innobase_additional_mem_pool_size, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.", - NULL, NULL, 1*1024*1024L, 512*1024L, ~0L, 1024); + NULL, NULL, 1*1024*1024L, 512*1024L, LONG_MAX, 1024); static MYSQL_SYSVAR_ULONG(autoextend_increment, srv_auto_extend_increment, PLUGIN_VAR_RQCMDARG, @@ -9529,7 +9529,7 @@ static MYSQL_SYSVAR_LONG(force_recovery, innobase_force_recovery, static MYSQL_SYSVAR_LONG(log_buffer_size, innobase_log_buffer_size, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "The size of the buffer which InnoDB uses to write log to the log files on disk.", - NULL, NULL, 1024*1024L, 256*1024L, ~0L, 1024); + NULL, NULL, 1024*1024L, 256*1024L, LONG_MAX, 1024); static MYSQL_SYSVAR_LONGLONG(log_file_size, innobase_log_file_size, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, @@ -9549,7 +9549,7 @@ static MYSQL_SYSVAR_LONG(mirrored_log_groups, innobase_mirrored_log_groups, static MYSQL_SYSVAR_LONG(open_files, innobase_open_files, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "How many files at the maximum InnoDB keeps open at the same time.", - NULL, NULL, 300L, 10L, ~0L, 0); + NULL, NULL, 300L, 10L, LONG_MAX, 0); static MYSQL_SYSVAR_ULONG(sync_spin_loops, srv_n_spin_wait_rounds, PLUGIN_VAR_RQCMDARG, diff --git a/include/sync0rw.ic b/include/sync0rw.ic index 98025367127..8096933d7d9 100644 --- a/include/sync0rw.ic +++ b/include/sync0rw.ic @@ -640,9 +640,7 @@ rw_lock_x_unlock_func( But we shouldn't keep an ID of not-owner. */ lock->writer_thread = -1; - /* atomic operation may be safer about memory order. */ - rw_lock_set_writer(lock, RW_LOCK_NOT_LOCKED); - __sync_synchronize(); + __sync_lock_test_and_set(&(lock->writer),RW_LOCK_NOT_LOCKED); } #else lock->writer_count--; |