mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
After merge fixes
innobase/include/univ.i: Auto merged innobase/row/row0ins.c: After merge fixes of Jan Lindström's patch to 4.1
This commit is contained in:
commit
2ecd83a37b
2 changed files with 9 additions and 20 deletions
|
@ -80,8 +80,10 @@ memory is read outside the allocated blocks. */
|
||||||
|
|
||||||
/* Make a non-inline debug version */
|
/* Make a non-inline debug version */
|
||||||
|
|
||||||
|
#ifdef DBUG_ON
|
||||||
|
# define UNIV_DEBUG
|
||||||
|
#endif /* DBUG_ON */
|
||||||
/*
|
/*
|
||||||
#define UNIV_DEBUG
|
|
||||||
#define UNIV_MEM_DEBUG
|
#define UNIV_MEM_DEBUG
|
||||||
#define UNIV_IBUF_DEBUG
|
#define UNIV_IBUF_DEBUG
|
||||||
#define UNIV_SYNC_DEBUG
|
#define UNIV_SYNC_DEBUG
|
||||||
|
|
|
@ -1120,7 +1120,6 @@ row_ins_check_foreign_constraint(
|
||||||
dict_table_t* check_table;
|
dict_table_t* check_table;
|
||||||
dict_index_t* check_index;
|
dict_index_t* check_index;
|
||||||
ulint n_fields_cmp;
|
ulint n_fields_cmp;
|
||||||
ibool unique_search;
|
|
||||||
rec_t* rec;
|
rec_t* rec;
|
||||||
btr_pcur_t pcur;
|
btr_pcur_t pcur;
|
||||||
ibool moved;
|
ibool moved;
|
||||||
|
@ -1240,14 +1239,6 @@ run_again:
|
||||||
|
|
||||||
dtuple_set_n_fields_cmp(entry, foreign->n_fields);
|
dtuple_set_n_fields_cmp(entry, foreign->n_fields);
|
||||||
|
|
||||||
if (dict_index_get_n_unique(check_index) <= foreign->n_fields) {
|
|
||||||
/* We can just set a LOCK_REC_NOT_GAP type lock */
|
|
||||||
|
|
||||||
unique_search = TRUE;
|
|
||||||
} else {
|
|
||||||
unique_search = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
btr_pcur_open(check_index, entry, PAGE_CUR_GE,
|
btr_pcur_open(check_index, entry, PAGE_CUR_GE,
|
||||||
BTR_SEARCH_LEAF, &pcur, &mtr);
|
BTR_SEARCH_LEAF, &pcur, &mtr);
|
||||||
|
|
||||||
|
@ -1289,17 +1280,13 @@ run_again:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Found a matching record */
|
/* Found a matching record. Lock only
|
||||||
ulint lock_type;
|
a record because we can allow inserts
|
||||||
|
into gaps */
|
||||||
|
|
||||||
if (unique_search) {
|
err = row_ins_set_shared_rec_lock(
|
||||||
lock_type = LOCK_REC_NOT_GAP;
|
LOCK_REC_NOT_GAP,
|
||||||
} else {
|
rec, check_index, thr);
|
||||||
lock_type = LOCK_ORDINARY;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = row_ins_set_shared_rec_lock(lock_type,
|
|
||||||
rec, check_index, offsets, thr);
|
|
||||||
|
|
||||||
if (err != DB_SUCCESS) {
|
if (err != DB_SUCCESS) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue