From 485dcb07d12db2309e21b06d46b3156a765495cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 6 Mar 2019 14:46:58 +0200 Subject: 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 --- storage/innobase/fts/fts0fts.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'storage/innobase/fts') 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); -- cgit v1.2.1