summaryrefslogtreecommitdiff
path: root/innobase/row/row0upd.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/row/row0upd.c')
-rw-r--r--innobase/row/row0upd.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/innobase/row/row0upd.c b/innobase/row/row0upd.c
index b9e9b8c15c9..f8739b65c2f 100644
--- a/innobase/row/row0upd.c
+++ b/innobase/row/row0upd.c
@@ -77,8 +77,8 @@ index record. This is only used in foreign key checks and we can assume
that index does not contain column prefixes. */
static
ibool
-row_upd_changes_first_fields(
-/*=========================*/
+row_upd_changes_first_fields_binary(
+/*================================*/
/* out: TRUE if changes */
dtuple_t* entry, /* in: old value of index entry */
dict_index_t* index, /* in: index of entry */
@@ -196,7 +196,7 @@ row_upd_check_references_constraints(
if (foreign->referenced_index == index
&& (node->is_delete
- || row_upd_changes_first_fields(entry, index,
+ || row_upd_changes_first_fields_binary(entry, index,
node->update, foreign->n_fields))) {
if (foreign->foreign_table == NULL) {
@@ -287,7 +287,9 @@ upd_node_create(
node->select = NULL;
node->heap = mem_heap_create(128);
- node->magic_n = UPD_NODE_MAGIC_N;
+#ifdef UNIV_DEBUG
+ node->magic_n = UPD_NODE_MAGIC_N;
+#endif /* UNIV_DEBUG */
node->cmpl_info = 0;
@@ -1048,8 +1050,8 @@ index record. This is only used in foreign key checks and we can assume
that index does not contain column prefixes. */
static
ibool
-row_upd_changes_first_fields(
-/*=========================*/
+row_upd_changes_first_fields_binary(
+/*================================*/
/* out: TRUE if changes */
dtuple_t* entry, /* in: index entry */
dict_index_t* index, /* in: index of entry */
@@ -1074,15 +1076,16 @@ row_upd_changes_first_fields(
col = dict_field_get_col(ind_field);
col_pos = dict_col_get_clust_pos(col);
+ ut_a(ind_field->prefix_len == 0);
+
for (j = 0; j < n_upd_fields; j++) {
upd_field = upd_get_nth_field(update, j);
if (col_pos == upd_field->field_no
- && (ind_field->prefix_len > 0
- || 0 != cmp_dfield_dfield(
+ && !dfield_datas_are_binary_equal(
dtuple_get_nth_field(entry, i),
- &(upd_field->new_val)))) {
+ &(upd_field->new_val))) {
return(TRUE);
}
}
@@ -1804,6 +1807,7 @@ row_upd_step(
trx_start_if_not_started(trx);
node = thr->run_node;
+ ut_ad(node->magic_n == UPD_NODE_MAGIC_N);
sel_node = node->select;
@@ -1923,6 +1927,7 @@ row_upd_in_place_in_select(
node = que_node_get_parent(sel_node);
+ ut_ad(node->magic_n == UPD_NODE_MAGIC_N);
ut_ad(que_node_get_type(node) == QUE_NODE_UPDATE);
pcur = node->pcur;