MCPcopy Create free account
hub / github.com/MariaDB/server / prepare_for_replace

Function prepare_for_replace

sql/sql_insert.cc:706–721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704}
705
706int 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
723int finalize_replace(TABLE *table, enum_duplicates handle_duplicates,
724 bool ignore)

Callers 3

mysql_insertFunction · 0.85
prepareMethod · 0.85
mysql_loadFunction · 0.85

Calls 4

ha_table_flagsMethod · 0.80
prepare_for_modifyMethod · 0.80
extraMethod · 0.45

Tested by

no test coverage detected