diff options
author | unknown <heikki@hundin.mysql.fi> | 2003-06-18 03:38:09 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2003-06-18 03:38:09 +0300 |
commit | fb94c5810c55fa1e33b084e3f9b2cecc7abe2a99 (patch) | |
tree | ec2b8adc625149caa37966c0a1b14335b6549011 | |
parent | 1efc292be6c92316b16eef70b289f6e1ab7f2a33 (diff) | |
download | mariadb-git-fb94c5810c55fa1e33b084e3f9b2cecc7abe2a99.tar.gz |
row0sel.c, row0ins.c:
Fix error in previous push
innobase/row/row0ins.c:
Fix error in previous push
innobase/row/row0sel.c:
Fix error in previous push
-rw-r--r-- | innobase/row/row0ins.c | 6 | ||||
-rw-r--r-- | innobase/row/row0sel.c | 16 |
2 files changed, 16 insertions, 6 deletions
diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index d36e5a9761e..e02859bc851 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -792,8 +792,10 @@ row_ins_foreign_check_on_constraint( clust_rec = btr_pcur_get_rec(cascade->pcur); - if (btr_pcur_get_low_match(cascade->pcur) - < dict_index_get_n_unique(clust_index)) { + if (!page_rec_is_user_rec(clust_rec) + || btr_pcur_get_low_match(cascade->pcur) + < dict_index_get_n_unique(clust_index)) { + fprintf(stderr, "InnoDB: error in cascade of a foreign key op\n" "InnoDB: index %s table %s\n", index->name, diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index afc01247347..a263de74e3e 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -609,8 +609,12 @@ row_sel_get_clust_rec( clust_rec = btr_pcur_get_rec(&(plan->clust_pcur)); - if (btr_pcur_get_low_match(&(plan->clust_pcur)) - < dict_index_get_n_unique(index)) { + /* Note: only if the search ends up on a non-infimum record is the + low_match value the real match to the search tuple */ + + if (!page_rec_is_user_rec(clust_rec) + || btr_pcur_get_low_match(&(plan->clust_pcur)) + < dict_index_get_n_unique(index)) { ut_a(rec_get_deleted_flag(rec)); ut_a(node->read_view); @@ -2322,8 +2326,12 @@ row_sel_get_clust_rec_for_mysql( clust_rec = btr_pcur_get_rec(prebuilt->clust_pcur); - if (btr_pcur_get_low_match(prebuilt->clust_pcur) - < dict_index_get_n_unique(clust_index)) { + /* Note: only if the search ends up on a non-infimum record is the + low_match value the real match to the search tuple */ + + if (!page_rec_is_user_rec(clust_rec) + || btr_pcur_get_low_match(prebuilt->clust_pcur) + < dict_index_get_n_unique(clust_index)) { /* In a rare case it is possible that no clust rec is found for a delete-marked secondary index record: if in row0umod.c |