mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Backport of:
---------------------------------------------------------------------- ChangeSet@1.2571, 2008-04-08 12:30:06+02:00, vvaintroub@wva. +122 -0 Bug#32082 : definition of VOID in my_global.h conflicts with Windows SDK headers VOID macro is now removed. Its usage is replaced with void cast. In some cases, where cast does not make much sense (pthread_*, printf, hash_delete, my_seek), cast is ommited.
This commit is contained in:
@@ -1033,7 +1033,7 @@ static bool check_view_insertability(THD * thd, TABLE_LIST *view)
|
||||
|
||||
DBUG_ASSERT(view->table != 0 && view->field_translation != 0);
|
||||
|
||||
VOID(bitmap_init(&used_fields, used_fields_buff, table->s->fields, 0));
|
||||
(void) bitmap_init(&used_fields, used_fields_buff, table->s->fields, 0);
|
||||
bitmap_clear_all(&used_fields);
|
||||
|
||||
view->contain_auto_increment= 0;
|
||||
@@ -1766,11 +1766,11 @@ public:
|
||||
pthread_mutex_init(&mutex,MY_MUTEX_INIT_FAST);
|
||||
pthread_cond_init(&cond,NULL);
|
||||
pthread_cond_init(&cond_client,NULL);
|
||||
VOID(pthread_mutex_lock(&LOCK_thread_count));
|
||||
pthread_mutex_lock(&LOCK_thread_count);
|
||||
delayed_insert_threads++;
|
||||
delayed_lock= global_system_variables.low_priority_updates ?
|
||||
TL_WRITE_LOW_PRIORITY : TL_WRITE;
|
||||
VOID(pthread_mutex_unlock(&LOCK_thread_count));
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
}
|
||||
~Delayed_insert()
|
||||
{
|
||||
@@ -1780,7 +1780,7 @@ public:
|
||||
delete row;
|
||||
if (table)
|
||||
close_thread_tables(&thd);
|
||||
VOID(pthread_mutex_lock(&LOCK_thread_count));
|
||||
pthread_mutex_lock(&LOCK_thread_count);
|
||||
pthread_mutex_destroy(&mutex);
|
||||
pthread_cond_destroy(&cond);
|
||||
pthread_cond_destroy(&cond_client);
|
||||
@@ -1789,8 +1789,8 @@ public:
|
||||
thd.security_ctx->user= thd.security_ctx->host=0;
|
||||
thread_count--;
|
||||
delayed_insert_threads--;
|
||||
VOID(pthread_mutex_unlock(&LOCK_thread_count));
|
||||
VOID(pthread_cond_broadcast(&COND_thread_count)); /* Tell main we are ready */
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
pthread_cond_broadcast(&COND_thread_count); /* Tell main we are ready */
|
||||
}
|
||||
|
||||
/* The following is for checking when we can delete ourselves */
|
||||
@@ -2262,7 +2262,7 @@ static void end_delayed_insert(THD *thd)
|
||||
|
||||
void kill_delayed_threads(void)
|
||||
{
|
||||
VOID(pthread_mutex_lock(&LOCK_delayed_insert)); // For unlink from list
|
||||
pthread_mutex_lock(&LOCK_delayed_insert); // For unlink from list
|
||||
|
||||
I_List_iterator<Delayed_insert> it(delayed_threads);
|
||||
Delayed_insert *di;
|
||||
@@ -2287,7 +2287,7 @@ void kill_delayed_threads(void)
|
||||
pthread_mutex_unlock(&di->thd.mysys_var->mutex);
|
||||
}
|
||||
}
|
||||
VOID(pthread_mutex_unlock(&LOCK_delayed_insert)); // For unlink from list
|
||||
pthread_mutex_unlock(&LOCK_delayed_insert); // For unlink from list
|
||||
}
|
||||
|
||||
|
||||
@@ -3499,7 +3499,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
|
||||
|
||||
if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE))
|
||||
{
|
||||
VOID(pthread_mutex_lock(&LOCK_open));
|
||||
pthread_mutex_lock(&LOCK_open);
|
||||
if (reopen_name_locked_table(thd, create_table, FALSE))
|
||||
{
|
||||
quick_rm_table(create_info->db_type, create_table->db,
|
||||
@@ -3508,7 +3508,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
|
||||
}
|
||||
else
|
||||
table= create_table->table;
|
||||
VOID(pthread_mutex_unlock(&LOCK_open));
|
||||
pthread_mutex_unlock(&LOCK_open);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user