summaryrefslogtreecommitdiff
path: root/storage/maria/ma_state.h
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-01-11 16:38:21 +0200
committerMonty <monty@mariadb.org>2018-01-11 16:39:29 +0200
commit1f18bd630a6b29b427dc5da01077e4f20fb60e01 (patch)
tree73e53979f48e554db1391283e53a2847fce19a8f /storage/maria/ma_state.h
parentbdcd7f79e4a33e08bae31a86cee98e23ff6824ff (diff)
downloadmariadb-git-1f18bd630a6b29b427dc5da01077e4f20fb60e01.tar.gz
MDEV-8200 aria bug with insert select and lock tables
This bug happens when locking the same Aria "transactional" table (page format) more then once with LOCK TABLES and inserting into one of them with INSERT ... SELECT when the table is empty. Fixed by ensuring we don't use fast bulk insert if table is opened twice with LOCK TABLES (as this changes table->s->state) Code changes: - Added use_count to MARIA_USED_TABLES to be able to check if table is opened twice for a statement/lock table - Don't clear history or reset info->start_state if we don't have versioning. One reason for the bug was was that info->start_state was set to point to different states for the two tables. If there is no versioning info->start_state should always point to info->s->state.common. Other things: - Fixed also some typos that was noticed while scanning the code - More DBUG_PRINT
Diffstat (limited to 'storage/maria/ma_state.h')
-rw-r--r--storage/maria/ma_state.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/storage/maria/ma_state.h b/storage/maria/ma_state.h
index 2903986e32a..d662b9899f8 100644
--- a/storage/maria/ma_state.h
+++ b/storage/maria/ma_state.h
@@ -34,6 +34,7 @@ typedef struct st_used_tables {
struct st_maria_share *share;
MARIA_STATUS_INFO state_current;
MARIA_STATUS_INFO state_start;
+ uint use_count;
} MARIA_USED_TABLES;