summaryrefslogtreecommitdiff
path: root/storage/innobase/fts
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-06 14:46:58 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-06 14:46:58 +0200
commit485dcb07d12db2309e21b06d46b3156a765495cb (patch)
tree90ed0ab3cbbc8c657e38919a34ab60f29dccf588 /storage/innobase/fts
parent4b5dc47f569f766287bd8f4801ab6b865868d01a (diff)
downloadmariadb-git-485dcb07d12db2309e21b06d46b3156a765495cb.tar.gz
MDEV-18637 Assertion `cache' failed in fts_init_recover_doc
I know no test case for this bug in 10.1. So a test case will be committed separately in 10.2 fts_reset_get_doc(): properly initialize fts_get_doc_t::cache
Diffstat (limited to 'storage/innobase/fts')
-rw-r--r--storage/innobase/fts/fts0fts.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc
index 75258bb8610..1ea3a8d2c60 100644
--- a/storage/innobase/fts/fts0fts.cc
+++ b/storage/innobase/fts/fts0fts.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, 2018, MariaDB Corporation.
+Copyright (c) 2016, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -736,6 +736,7 @@ fts_reset_get_doc(
memset(get_doc, 0x0, sizeof(*get_doc));
get_doc->index_cache = ind_cache;
+ get_doc->cache = cache;
}
ut_ad(ib_vector_size(cache->get_docs)
@@ -4801,8 +4802,9 @@ fts_tokenize_document(
ut_a(!doc->tokens);
ut_a(doc->charset);
- doc->tokens = rbt_create_arg_cmp(
- sizeof(fts_token_t), innobase_fts_text_cmp, (void*) doc->charset);
+ doc->tokens = rbt_create_arg_cmp(sizeof(fts_token_t),
+ innobase_fts_text_cmp,
+ (void*) doc->charset);
for (ulint i = 0; i < doc->text.f_len; i += inc) {
inc = fts_process_token(doc, result, i, 0);