|
dberr_t | row_ins_check_foreign_constraint (bool check_ref, dict_foreign_t *foreign, dict_table_t *table, dtuple_t *entry, que_thr_t *thr) |
| Checks if foreign key constraint fails for an index entry. More...
|
|
ins_node_t * | ins_node_create (ulint ins_type, dict_table_t *table, mem_heap_t *heap) |
| Creates an insert node struct. More...
|
|
void | ins_node_set_new_row (ins_node_t *node, dtuple_t *row) |
| Sets a new row to insert for an INS_DIRECT node. More...
|
|
dberr_t | row_ins_clust_index_entry_low (uint32_t flags, ulint mode, dict_index_t *index, ulint n_uniq, dtuple_t *entry, que_thr_t *thr, bool dup_chk_only) |
| Tries to insert an entry into a clustered index, ignoring foreign key constraints. More...
|
|
dberr_t | row_ins_sec_index_entry_low (uint32_t flags, ulint mode, dict_index_t *index, mem_heap_t *offsets_heap, mem_heap_t *heap, dtuple_t *entry, trx_id_t trx_id, que_thr_t *thr, bool dup_chk_only) |
| Tries to insert an entry into a secondary index. More...
|
|
dberr_t | row_ins_index_entry_set_vals (const dict_index_t *index, dtuple_t *entry, const dtuple_t *row) |
| Sets the values of the dtuple fields in entry from the values of appropriate columns in row. More...
|
|
dberr_t | row_ins_clust_index_entry (dict_index_t *index, dtuple_t *entry, que_thr_t *thr, bool dup_chk_only) |
| Inserts an entry into a clustered index. More...
|
|
dberr_t | row_ins_sec_index_entry (dict_index_t *index, dtuple_t *entry, que_thr_t *thr, bool dup_chk_only) |
| Inserts an entry into a secondary index. More...
|
|
que_thr_t * | row_ins_step (que_thr_t *thr) |
| Inserts a row to a table. More...
|
|
Insert into a table.
Created 4/20/1996 Heikki Tuuri
Sets a new row to insert for an INS_DIRECT node.
This function is only used if we have constructed the row separately, which is a rare case; this function is quite slow. in: new row (or first row) for the node
This function is only used if we have constructed the row separately, which is a rare case; this function is quite slow.
- Parameters
-
node | in: insert node |
row | in: new row (or first row) for the node |
Inserts an entry into a clustered index.
Tries first optimistic, then pessimistic descent down the tree. If the entry matches enough to a delete marked record, performs the insert by updating or delete unmarking the delete marked record.
- Returns
- DB_SUCCESS, DB_LOCK_WAIT, DB_DUPLICATE_KEY, or some other error code in: if true, just do duplicate check and return. don't execute actual insert.
Tries first optimistic, then pessimistic descent down the tree. If the entry matches enough to a delete marked record, performs the insert by updating or delete unmarking the delete marked record.
- Returns
- DB_SUCCESS, DB_LOCK_WAIT, DB_DUPLICATE_KEY, or some other error code
- Parameters
-
index | in: clustered index |
entry | in/out: index entry to insert |
thr | in: query thread |
dup_chk_only | in: if true, just do duplicate check and return. don't execute actual insert. |
Tries to insert an entry into a clustered index, ignoring foreign key constraints.
If a record with the same unique key is found, the other record is necessarily marked deleted by a committed transaction, or a unique key violation error occurs. The delete marked record is then updated to an existing record, and we must write an undo log record on the delete marked record.
- Parameters
-
[in] | flags | Undo logging and locking flags. |
[in] | mode | BTR_MODIFY_LEAF or BTR_MODIFY_TREE, depending on whether we wish optimistic or pessimistic descent down the index tree. |
[in] | index | Clustered index. |
[in] | n_uniq | 0 or index->n_uniq. |
[in] | entry | Index entry to insert. |
[in] | thr | Query thread, or nullptr if flags & (BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG) and a duplicate can't occur. |
[in] | dup_chk_only | If true, just do duplicate check and return. don't execute actual insert. |
- Return values
-
DB_SUCCESS | on success |
DB_LOCK_WAIT | on lock wait when !(flags & BTR_NO_LOCKING_FLAG) |
DB_FAIL | if retry with BTR_MODIFY_TREE is needed |
- Returns
- error code
Inserts an entry into a secondary index.
Tries first optimistic, then pessimistic descent down the tree. If the entry matches enough to a delete marked record, performs the insert by updating or delete unmarking the delete marked record.
- Returns
- DB_SUCCESS, DB_LOCK_WAIT, DB_DUPLICATE_KEY, or some other error code in: if true, just do duplicate check and return. don't execute actual insert.
Tries first optimistic, then pessimistic descent down the tree. If the entry matches enough to a delete marked record, performs the insert by updating or delete unmarking the delete marked record.
- Returns
- DB_SUCCESS, DB_LOCK_WAIT, DB_DUPLICATE_KEY, or some other error code
- Parameters
-
index | in: secondary index |
entry | in/out: index entry to insert |
thr | in: query thread |
dup_chk_only | in: if true, just do duplicate check and return. don't execute actual insert. |