From f3f31eaa8e8a07adc0d6769f77f1ccfb129529de Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 24 Jan 2020 21:10:07 +0100 Subject: [PATCH] bugfix: in long uniques don't check for duplicates more than once in particular, after checking for duplicates in a partitioned table, do not re-check it for every partition individually --- sql/handler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/handler.cc b/sql/handler.cc index 806d91bdbc5..49a265a9f23 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -6647,7 +6647,7 @@ int handler::ha_write_row(const uchar *buf) mark_trx_read_write(); increment_statistics(&SSV::ha_write_count); - if (table->s->long_unique_table) + if (table->s->long_unique_table && this == table->file) { if (this->inited == RND) table->clone_handler_for_update();