MySQL 8.0.39
Source Code Documentation
|
#include <assert.h>
#include <sys/types.h>
#include "mem_root_deque.h"
#include "my_inttypes.h"
#include "my_sqlcommand.h"
#include "sql/query_result.h"
#include "sql/sql_cmd_dml.h"
#include "sql/sql_data_change.h"
#include "sql/table.h"
#include "sql/thr_malloc.h"
Go to the source code of this file.
Classes | |
class | Query_result_insert |
class | Query_result_create |
class | Sql_cmd_insert_base |
Base class for all INSERT and REPLACE statements. More... | |
class | Sql_cmd_insert_values |
Class that implements INSERT ... VALUES and REPLACE ... VALUES statements. More... | |
class | Sql_cmd_insert_select |
Class that implements INSERT ... SELECT and REPLACE ... SELECT statements. More... | |
Typedefs | |
using | List_item = mem_root_deque< Item * > |
Functions | |
bool | check_that_all_fields_are_given_values (THD *thd, TABLE *entry, Table_ref *table_list) |
Check that all fields with aren't null_fields are used. More... | |
void | prepare_triggers_for_insert_stmt (THD *thd, TABLE *table) |
Prepare triggers for INSERT-like statement. More... | |
bool | write_record (THD *thd, TABLE *table, COPY_INFO *info, COPY_INFO *update) |
Write a record to table with optional deletion of conflicting records, invoke proper triggers if needed. More... | |
bool | validate_default_values_of_unset_fields (THD *thd, TABLE *table) |
Validates default value of fields which are not specified in the column list of INSERT statement. More... | |
using List_item = mem_root_deque<Item *> |
Check that all fields with aren't null_fields are used.
thd | thread handler |
entry | table that's checked |
table_list | top-level table or view, used for generating error or warning message |
true | if all fields are given values |
Prepare triggers for INSERT-like statement.
thd | Thread handler |
table | Table to which insert will happen |
Validates default value of fields which are not specified in the column list of INSERT statement.
thd | thread context |
table | table to which values are inserted. |
Write a record to table with optional deletion of conflicting records, invoke proper triggers if needed.
thd | thread context |
table | table to which record should be written |
info | COPY_INFO structure describing handling of duplicates and which is used for counting number of records inserted and deleted. |
update | COPY_INFO structure describing the UPDATE part (only used for INSERT ON DUPLICATE KEY UPDATE) |
Once this record is written to the table buffer, any AFTER INSERT trigger will be invoked. If instead of inserting a new record we end up updating an old one, both ON UPDATE triggers will fire instead. Similarly both ON DELETE triggers will be invoked if are to delete conflicting records.
Call thd->transaction.stmt.mark_modified_non_trans_table() if table is a non-transactional table.
< Flag for fatal errors