summaryrefslogtreecommitdiff
path: root/storage/innobase/row/row0mysql.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/row/row0mysql.cc')
-rw-r--r--storage/innobase/row/row0mysql.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index 64f750d0f13..67167f19c70 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -1337,7 +1337,10 @@ error_exit:
return(err);
}
- if (dict_table_has_fts_index(table)) {
+ if (dict_table_has_fts_index(table)
+ && (!table->versioned()
+ || !node->row->fields[table->vers_end].vers_history_row())) {
+
doc_id_t doc_id;
/* Extract the doc id from the hidden FTS column */
@@ -1543,7 +1546,7 @@ row_fts_update_or_delete(
ut_a(dict_table_has_fts_index(prebuilt->table));
/* Deletes are simple; get them out of the way first. */
- if (node->is_delete == PLAIN_DELETE) {
+ if (node->is_delete) {
/* A delete affects all FTS indexes, so we pass NULL */
fts_trx_add_op(trx, table, old_doc_id, FTS_DELETE, NULL);
} else {
@@ -1552,7 +1555,7 @@ row_fts_update_or_delete(
if (new_doc_id == 0) {
ib::error() << "InnoDB FTS: Doc ID cannot be 0";
- return(DB_FTS_INVALID_DOCID);
+ DBUG_RETURN(DB_FTS_INVALID_DOCID);
}
row_fts_do_update(trx, table, old_doc_id, new_doc_id);
}
@@ -1984,7 +1987,7 @@ row_update_cascade_for_mysql(
return(DB_FOREIGN_EXCEED_MAX_CASCADE);
}
- const trx_t* trx = thr_get_trx(thr);
+ trx_t* trx = thr_get_trx(thr);
if (table->versioned()) {
if (node->is_delete == PLAIN_DELETE) {