diff --git a/include/my_base.h b/include/my_base.h index 038045dde2a..1d59262f680 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -218,9 +218,7 @@ enum ha_extra_function { /** Start writing rows during ALTER TABLE...ALGORITHM=COPY. */ HA_EXTRA_BEGIN_ALTER_COPY, /** Finish writing rows during ALTER TABLE...ALGORITHM=COPY. */ - HA_EXTRA_END_ALTER_COPY, - /** IGNORE is being used for the insert statement */ - HA_EXTRA_IGNORE_INSERT + HA_EXTRA_END_ALTER_COPY }; /* Compatible option, to be deleted in 6.0 */ diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 66418679794..91f9c536096 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -9474,7 +9474,6 @@ int ha_partition::extra(enum ha_extra_function operation) case HA_EXTRA_STARTING_ORDERED_INDEX_SCAN: case HA_EXTRA_BEGIN_ALTER_COPY: case HA_EXTRA_END_ALTER_COPY: - case HA_EXTRA_IGNORE_INSERT: DBUG_RETURN(loop_partitions(extra_cb, &operation)); default: { diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 73044c60c20..b5c8542ca92 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2176,9 +2176,6 @@ int write_record(THD *thd, TABLE *table, COPY_INFO *info, select_result *sink) goto after_trg_or_ignored_err; } - /* Notify the engine about insert ignore operation */ - if (info->handle_duplicates == DUP_ERROR && info->ignore) - table->file->extra(HA_EXTRA_IGNORE_INSERT); after_trg_n_copied_inc: info->copied++; thd->record_first_successful_insert_id_in_cur_stmt(table->file->insert_id_for_cur_row); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index f7588890a4d..15c853d8b7b 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -11301,9 +11301,6 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, } else { - /* In case of alter ignore, notify the engine about it. */ - if (ignore) - to->file->extra(HA_EXTRA_IGNORE_INSERT); DEBUG_SYNC(thd, "copy_data_between_tables_before"); found_count++; mysql_stage_set_work_completed(thd->m_stage_progress_psi, found_count); diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 0db27a1e2d0..b440613c13f 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -15732,13 +15732,6 @@ ha_innobase::extra( case HA_EXTRA_RESET_STATE: reset_template(); trx->duplicates = 0; - /* fall through */ - case HA_EXTRA_IGNORE_INSERT: - /* HA_EXTRA_IGNORE_INSERT is very similar to - HA_EXTRA_IGNORE_DUP_KEY, but with one crucial difference: - we want !trx->duplicates for INSERT IGNORE so that - row_ins_duplicate_error_in_clust() will acquire a - shared lock instead of an exclusive lock. */ stmt_boundary: trx->end_bulk_insert(*m_prebuilt->table); trx->bulk_insert = false; diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp index 78a48b32f10..a39de1d991b 100644 --- a/storage/mroonga/ha_mroonga.cpp +++ b/storage/mroonga/ha_mroonga.cpp @@ -596,9 +596,6 @@ static const char *mrn_inspect_extra_function(enum ha_extra_function operation) inspected = "HA_EXTRA_NO_AUTOINC_LOCKING"; break; #endif - case HA_EXTRA_IGNORE_INSERT: - inspected = "HA_EXTRA_IGNORE_INSERT"; - break; } return inspected; }