diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2019-10-23 17:00:12 +0530 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-25 16:17:59 +0300 |
commit | bd22650bbcb3d4d64da186311fd04fb935096cd2 (patch) | |
tree | fd694468f3675e6be2f5e12be6084cf2419beafe /storage/xtradb | |
parent | 790a74d22beeadbd75dcc84dca03b3b450acd8bf (diff) | |
download | mariadb-git-bd22650bbcb3d4d64da186311fd04fb935096cd2.tar.gz |
MDEV-19073 FTS row mismatch after crash recovery
InnoDB stores synced_doc_id + 1 value in FTS_CONFIG table. But
while reading the synced doc id from FTS_CONFIG table after restart,
InnoDB should read synced_doc_id - 1 to get the actual synced
doc id value.
Diffstat (limited to 'storage/xtradb')
-rw-r--r-- | storage/xtradb/fts/fts0fts.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/storage/xtradb/fts/fts0fts.cc b/storage/xtradb/fts/fts0fts.cc index 1cf5c818a9e..6dbe5e0e2a0 100644 --- a/storage/xtradb/fts/fts0fts.cc +++ b/storage/xtradb/fts/fts0fts.cc @@ -2739,6 +2739,10 @@ retry: } if (read_only) { + /* InnoDB stores actual synced_doc_id value + 1 in + FTS_CONFIG table. Reduce the value by 1 while reading + after startup. */ + if (*doc_id) *doc_id -= 1; goto func_exit; } |