mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Merge mysql.com:/home/svoj/devel/mysql/BUG23526/mysql-5.0-engines2
into mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
This commit is contained in:
commit
bcbb50c1d2
5 changed files with 22 additions and 2 deletions
|
@ -121,6 +121,7 @@ typedef struct st_thr_lock {
|
|||
void (*get_status)(void*, int); /* When one gets a lock */
|
||||
void (*copy_status)(void*,void*);
|
||||
void (*update_status)(void*); /* Before release of write */
|
||||
void (*restore_status)(void*); /* Before release of read */
|
||||
my_bool (*check_status)(void *);
|
||||
} THR_LOCK;
|
||||
|
||||
|
|
|
@ -325,6 +325,15 @@ void mi_update_status(void* param)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void mi_restore_status(void *param)
|
||||
{
|
||||
MI_INFO *info= (MI_INFO*) param;
|
||||
info->state= &info->s->state.state;
|
||||
info->append_insert_at_end= 0;
|
||||
}
|
||||
|
||||
|
||||
void mi_copy_status(void* to,void *from)
|
||||
{
|
||||
((MI_INFO*) to)->state= &((MI_INFO*) from)->save_state;
|
||||
|
|
|
@ -504,6 +504,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
|
|||
share->lock.get_status=mi_get_status;
|
||||
share->lock.copy_status=mi_copy_status;
|
||||
share->lock.update_status=mi_update_status;
|
||||
share->lock.restore_status= mi_restore_status;
|
||||
share->lock.check_status=mi_check_status;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -731,6 +731,7 @@ int mi_unique_comp(MI_UNIQUEDEF *def, const byte *a, const byte *b,
|
|||
my_bool null_are_equal);
|
||||
void mi_get_status(void* param, int concurrent_insert);
|
||||
void mi_update_status(void* param);
|
||||
void mi_restore_status(void* param);
|
||||
void mi_copy_status(void* to,void *from);
|
||||
my_bool mi_check_status(void* param);
|
||||
void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows);
|
||||
|
|
|
@ -757,8 +757,16 @@ void thr_unlock(THR_LOCK_DATA *data)
|
|||
}
|
||||
else
|
||||
lock->write.last=data->prev;
|
||||
if (lock_type >= TL_WRITE_CONCURRENT_INSERT && lock->update_status)
|
||||
(*lock->update_status)(data->status_param);
|
||||
if (lock_type >= TL_WRITE_CONCURRENT_INSERT)
|
||||
{
|
||||
if (lock->update_status)
|
||||
(*lock->update_status)(data->status_param);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lock->restore_status)
|
||||
(*lock->restore_status)(data->status_param);
|
||||
}
|
||||
if (lock_type == TL_READ_NO_INSERT)
|
||||
lock->read_no_write_count--;
|
||||
data->type=TL_UNLOCK; /* Mark unlocked */
|
||||
|
|
Loading…
Reference in a new issue