mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug#21554 (sp_cache.cc: violates C++ aliasing rules)
The problem reported is a compile bug, reported by the development GCC team with GCC 4.2. The original issue can no longer be reproduced in MySQL 5.1, since the configure script no longer define HAVE_ATOMIC_ADD, which caused the Linux atomic functions to be used (and cause a problem with an invalid cast). This patch implements some code cleanup for 5.1 only, which was identified during the investigation of this issue. With this patch, statistics maintained in THD::status_var are by definition owned by the running thread, and do not need to be protected against race conditions. These statistics are maintained by the status_var_* helpers, which do not require any lock.
This commit is contained in:
@@ -2538,7 +2538,7 @@ bool Delayed_insert::handle_inserts(void)
|
||||
|
||||
if (table->s->blob_fields)
|
||||
free_delayed_insert_blobs(table);
|
||||
thread_safe_sub(delayed_rows_in_use,1,&LOCK_delayed_status);
|
||||
thread_safe_decrement(delayed_rows_in_use,&LOCK_delayed_status);
|
||||
thread_safe_increment(delayed_insert_writes,&LOCK_delayed_status);
|
||||
pthread_mutex_lock(&mutex);
|
||||
|
||||
|
Reference in New Issue
Block a user