summaryrefslogtreecommitdiff
path: root/storage/maria/ma_locking.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/maria/ma_locking.c')
-rw-r--r--storage/maria/ma_locking.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/storage/maria/ma_locking.c b/storage/maria/ma_locking.c
index d8f815b2a50..d5985a68c13 100644
--- a/storage/maria/ma_locking.c
+++ b/storage/maria/ma_locking.c
@@ -303,6 +303,8 @@ int _ma_writeinfo(register MARIA_HA *info, uint operation)
/* transactional tables flush their state at Checkpoint */
if (operation)
{ /* Two threads can't be here */
+ CRASH_IF_S3_TABLE(info->s); /* S3 readonly doesn't come here */
+
olderror= my_errno; /* Remember last error */
#ifdef MARIA_EXTERNAL_LOCKING
@@ -446,6 +448,7 @@ int _ma_mark_file_changed_now(register MARIA_SHARE *share)
*/
if (!share->temporary)
{
+ CRASH_IF_S3_TABLE(share);
mi_int2store(buff,share->state.open_count);
buff[2]=1; /* Mark that it's changed */
if (my_pwrite(share->kfile.file, buff, sizeof(buff),
@@ -458,6 +461,7 @@ int _ma_mark_file_changed_now(register MARIA_SHARE *share)
if (share->base.born_transactional &&
!(share->state.org_changed & STATE_NOT_MOVABLE))
{
+ CRASH_IF_S3_TABLE(share);
/* Lock table to current installation */
if (_ma_set_uuid(share, 0) ||
(share->state.create_rename_lsn == LSN_NEEDS_NEW_STATE_LSNS &&
@@ -518,6 +522,7 @@ int _ma_decrement_open_count(MARIA_HA *info, my_bool lock_tables)
/* Its not fatal even if we couldn't get the lock ! */
if (share->state.open_count > 0)
{
+ CRASH_IF_S3_TABLE(share);
share->state.open_count--;
share->changed= 1; /* We have to update state */
/*
@@ -548,9 +553,15 @@ void _ma_mark_file_crashed(MARIA_SHARE *share)
{
uchar buff[2];
DBUG_ENTER("_ma_mark_file_crashed");
+ CRASH_IF_S3_TABLE(share);
share->state.changed|= STATE_CRASHED;
+ if (share->no_status_updates)
+ DBUG_VOID_RETURN; /* Safety */
+
mi_int2store(buff, share->state.changed);
+
+
/*
We can ignore the errors, as if the mark failed, there isn't anything
else we can do; The user should already have got an error that the
@@ -606,6 +617,7 @@ my_bool _ma_set_uuid(MARIA_SHARE *share, my_bool reset_uuid)
bzero(buff, sizeof(buff));
uuid= buff;
}
+ CRASH_IF_S3_TABLE(share);
return (my_bool) my_pwrite(share->kfile.file, uuid, MY_UUID_SIZE,
mi_uint2korr(share->state.header.base_pos),
MYF(MY_NABP));