summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2019-12-02 11:48:37 +0300
committerAleksey Midenkov <midenok@gmail.com>2019-12-02 11:48:37 +0300
commit498a96a4789e58549ce87b5843e804e055ab327f (patch)
tree36da2d9f9c8180fbad55e0413c70f8c0702b68f0 /sql/table.h
parent57cab7cd5114d3ef47203118cddd3ad0a22f2861 (diff)
downloadmariadb-git-498a96a4789e58549ce87b5843e804e055ab327f.tar.gz
MDEV-20441 ER_CRASHED_ON_USAGE upon update on versioned Aria table
Turn read cache off for update and multi-update for versioned table. no_cache is reinited on each TABLE open because it is applicable for specific algorithms. As a side fix vers_insert_history_row() honors vers_write setting. Aria with row_format=fixed uses IO_CACHE of type READ_CACHE for sequential read in update loop. When history row is inserted inside this loop the cache misses it and fails with error. TODO: Currently maria_extra() does not support SEQ_READ_APPEND. Probably it might be possible to use this type of cache.
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/table.h b/sql/table.h
index 1dda70ae0da..ca5565250de 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1536,9 +1536,16 @@ public:
return s->versioned == type;
}
- bool versioned_write(vers_sys_type_t type= VERS_UNDEFINED) const
+ bool versioned_write() const
{
DBUG_ASSERT(versioned() || !vers_write);
+ return versioned() ? vers_write : false;
+ }
+
+ bool versioned_write(vers_sys_type_t type) const
+ {
+ DBUG_ASSERT(type);
+ DBUG_ASSERT(versioned() || !vers_write);
return versioned(type) ? vers_write : false;
}
@@ -1557,6 +1564,8 @@ public:
ulonglong vers_start_id() const;
ulonglong vers_end_id() const;
+ bool vers_check_update(List<Item> &items);
+
int delete_row();
void vers_update_fields();
void vers_update_end();