summaryrefslogtreecommitdiff
path: root/plugin/fulltext/plugin_example.c
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2021-07-06 18:16:11 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2021-07-26 12:44:15 +0530
commite8d849ec8c36d0d98f658a75d5fc4f3294a79f13 (patch)
treec02dc7851cee8fa64798def9c692ac8dbf0f462f /plugin/fulltext/plugin_example.c
parentf29b3d6d8239d54e08868912093b16187086e133 (diff)
downloadmariadb-git-bb-10.2-MDEV-24088.tar.gz
MDEV-24088 Assertion in InnoDB's FTS code may be triggered by a repeated words fed to simple_parser pluginbb-10.2-MDEV-24088
- InnoDB simple parser fails while parsing the repeated word. This failure mainly because the simple parser fails to update the position of the keyword within the word. The patch is basically use the mysql/mysql-server@0c954c2289a75d90d1088356b1092437ebf45a1d to solve the issue.
Diffstat (limited to 'plugin/fulltext/plugin_example.c')
-rw-r--r--plugin/fulltext/plugin_example.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/fulltext/plugin_example.c b/plugin/fulltext/plugin_example.c
index fb8de478a9f..238daa9d678 100644
--- a/plugin/fulltext/plugin_example.c
+++ b/plugin/fulltext/plugin_example.c
@@ -148,7 +148,7 @@ static int simple_parser_deinit(MYSQL_FTPARSER_PARAM *param
static void add_word(MYSQL_FTPARSER_PARAM *param, const char *word, size_t len)
{
MYSQL_FTPARSER_BOOLEAN_INFO bool_info=
- { FT_TOKEN_WORD, 0, 0, 0, 0, ' ', 0 };
+ { FT_TOKEN_WORD, 0, 0, 0, 0, (word - param->doc), ' ', 0 };
param->mysql_add_word(param, word, (int)len, &bool_info);
}