| 2379 | } |
| 2380 | |
| 2381 | int Write_record::single_insert(ha_rows *inserted) |
| 2382 | { |
| 2383 | DBUG_EXECUTE_IF("rpl_write_record_small_sleep_gtid_100_200", |
| 2384 | { |
| 2385 | uint64 seq= thd->rgi_slave ? thd->rgi_slave->current_gtid.seq_no : 0; |
| 2386 | if (seq == 100 || seq == 200) |
| 2387 | my_sleep(20000); |
| 2388 | }); |
| 2389 | |
| 2390 | int error= table->file->ha_write_row(table->record[0]); |
| 2391 | if (unlikely(error)) |
| 2392 | { |
| 2393 | DEBUG_SYNC(thd, "write_row_noreplace"); |
| 2394 | if (!info->ignore || is_fatal_error(error)) |
| 2395 | return on_ha_error(error); |
| 2396 | if (!(thd->variables.old_behavior & |
| 2397 | OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE)) |
| 2398 | table->file->print_error(error, MYF(ME_WARNING)); |
| 2399 | table->file->restore_auto_increment(prev_insert_id); |
| 2400 | return 0; |
| 2401 | } |
| 2402 | return after_insert(inserted); |
| 2403 | } |
| 2404 | |
| 2405 | /** |
| 2406 | Write a record to table with optional deleting of conflicting records, |
nothing calls this directly
no test coverage detected