diff options
author | Monty <monty@mariadb.org> | 2020-08-11 18:26:36 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-08-11 18:26:36 +0300 |
commit | 1ff23d0cd70d576a0f4e512ce332cff348591d36 (patch) | |
tree | dfd45db682e6ef545e8f84afd1420e28b7303df9 /storage/csv/ha_cache.h | |
parent | 36590b33a6175739f1fd7ee6427b1b5b4224bd3e (diff) | |
download | mariadb-git-columnstore_cache.tar.gz |
Fixed bug in free locks that caused rows in cache to not be properly flushedcolumnstore_cache
Fixed by doing adding external_lock(F_UNLCK) in free_locks.
I also moved unlock of cache_handler to be after changing lock type of
cached tables to ensure that no one can use cached table while this is
happening (as cache table is locked with write lock).
I also fixed a wrong mutex order bug in ha_cache::flush_insert_cache()
Other things:
- Addded share::cached_rows to track inserted rows. This is only used
for asserts to check the number of rows in the cache.
- Fixed wrong mysql_file_chsize() in case of repair
Diffstat (limited to 'storage/csv/ha_cache.h')
-rw-r--r-- | storage/csv/ha_cache.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/csv/ha_cache.h b/storage/csv/ha_cache.h index 5d2b033c83b..35301322dd8 100644 --- a/storage/csv/ha_cache.h +++ b/storage/csv/ha_cache.h @@ -27,8 +27,10 @@ class ha_cache_share const char *name; uint open_count; public: + ulonglong cached_rows; THR_LOCK org_lock; - friend ha_cache_share *find_cache_share(const char *name); + friend ha_cache_share *find_cache_share(const char *name, + ulonglong cached_rows); void close(); }; @@ -37,7 +39,7 @@ class ha_cache :public ha_tina { typedef ha_tina parent; int original_lock_type; - bool insert_command; + bool insert_command, cache_locked; public: uint lock_counter; |