| 704 | } |
| 705 | |
| 706 | int prepare_for_replace(TABLE *table, enum_duplicates handle_duplicates, |
| 707 | bool ignore) |
| 708 | { |
| 709 | bool create_lookup_handler= handle_duplicates != DUP_ERROR; |
| 710 | if (ignore || handle_duplicates != DUP_ERROR) |
| 711 | { |
| 712 | create_lookup_handler= true; |
| 713 | table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); |
| 714 | if (table->file->ha_table_flags() & HA_DUPLICATE_POS) |
| 715 | { |
| 716 | if (table->file->ha_rnd_init_with_error(false)) |
| 717 | return 1; |
| 718 | } |
| 719 | } |
| 720 | return table->file->prepare_for_modify(true, create_lookup_handler); |
| 721 | } |
| 722 | |
| 723 | int finalize_replace(TABLE *table, enum_duplicates handle_duplicates, |
| 724 | bool ignore) |
no test coverage detected