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

Method prepare2

sql/sql_insert.cc:4460–4480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4458*/
4459
4460int select_insert::prepare2(JOIN *)
4461{
4462 DBUG_ENTER("select_insert::prepare2");
4463 switch_to_nullable_trigger_fields(*fields, table);
4464 if (table->validate_default_values_of_unset_fields(thd))
4465 DBUG_RETURN(1);
4466 if (thd->lex->describe)
4467 DBUG_RETURN(0);
4468 if (thd->lex->current_select->options & OPTION_BUFFER_RESULT &&
4469 thd->locked_tables_mode <= LTM_LOCK_TABLES &&
4470 !table->s->long_unique_table)
4471 table->file->ha_start_bulk_insert((ha_rows) 0);
4472
4473 /* Same as the other variants of INSERT */
4474 if (sel_result &&
4475 sel_result->send_result_set_metadata(
4476 thd->lex->returning()->returning_list,
4477 Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
4478 DBUG_RETURN(1);
4479 DBUG_RETURN(0);
4480}
4481
4482
4483void select_insert::reset_for_next_ps_execution()

Callers 5

prepare_resultMethod · 0.45
exec_innerMethod · 0.45
change_resultMethod · 0.45
change_resultMethod · 0.45
postponed_prepareMethod · 0.45

Tested by

no test coverage detected