"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "storage/xtradb/row/row0ins.cc" between
mariadb-10.2.21.tar.gz and mariadb-10.2.22.tar.gz

About: MariaDB is a relational database management system (a drop-in replacement for MySQL). Stable (GA) release (10.2).

row0ins.cc  (mariadb-10.2.21):row0ins.cc  (mariadb-10.2.22)
skipping to change at line 58 skipping to change at line 58
#include "lock0lock.h" #include "lock0lock.h"
#include "log0log.h" #include "log0log.h"
#include "eval0eval.h" #include "eval0eval.h"
#include "data0data.h" #include "data0data.h"
#include "usr0sess.h" #include "usr0sess.h"
#include "buf0lru.h" #include "buf0lru.h"
#include "fts0fts.h" #include "fts0fts.h"
#include "fts0types.h" #include "fts0types.h"
#include "m_string.h" #include "m_string.h"
#ifdef WITH_WSREP
#include <mysql/service_wsrep.h>
#include "../../../wsrep/wsrep_api.h"
#include "wsrep_mysqld_c.h"
#endif /* WITH_WSREP */
/************************************************************************* /*************************************************************************
IMPORTANT NOTE: Any operation that generates redo MUST check that there IMPORTANT NOTE: Any operation that generates redo MUST check that there
is enough space in the redo log before for that operation. This is is enough space in the redo log before for that operation. This is
done by calling log_free_check(). The reason for checking the done by calling log_free_check(). The reason for checking the
availability of the redo log space before the start of the operation is availability of the redo log space before the start of the operation is
that we MUST not hold any synchonization objects when performing the that we MUST not hold any synchonization objects when performing the
check. check.
If you make a change in this module make sure that no codepath is If you make a change in this module make sure that no codepath is
introduced where a call to log_free_check() is bypassed. */ introduced where a call to log_free_check() is bypassed. */
skipping to change at line 942 skipping to change at line 948
ptr = strchr(buf, '/'); ptr = strchr(buf, '/');
ut_a(ptr); ut_a(ptr);
*ptr = '\0'; *ptr = '\0';
innobase_invalidate_query_cache(thr_get_trx(thr), buf, len); innobase_invalidate_query_cache(thr_get_trx(thr), buf, len);
mem_free(buf); mem_free(buf);
} }
#ifdef WITH_WSREP #ifdef WITH_WSREP
dberr_t wsrep_append_foreign_key(trx_t *trx, dberr_t wsrep_append_foreign_key(trx_t *trx,
dict_foreign_t* foreign, dict_foreign_t* foreign,
const rec_t* clust_rec, const rec_t* clust_rec,
dict_index_t* clust_index, dict_index_t* clust_index,
ibool referenced, ibool referenced,
ibool shared); enum wsrep_key_type key_type);
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
/*********************************************************************//** /*********************************************************************//**
Perform referential actions or checks when a parent row is deleted or updated Perform referential actions or checks when a parent row is deleted or updated
and the constraint had an ON DELETE or ON UPDATE condition which was not and the constraint had an ON DELETE or ON UPDATE condition which was not
RESTRICT. RESTRICT.
@return DB_SUCCESS, DB_LOCK_WAIT, or error code */ @return DB_SUCCESS, DB_LOCK_WAIT, or error code */
static MY_ATTRIBUTE((nonnull, warn_unused_result)) static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t dberr_t
row_ins_foreign_check_on_constraint( row_ins_foreign_check_on_constraint(
skipping to change at line 1305 skipping to change at line 1311
ut_a(cascade->pcur->rel_pos == BTR_PCUR_ON); ut_a(cascade->pcur->rel_pos == BTR_PCUR_ON);
cascade->state = UPD_NODE_UPDATE_CLUSTERED; cascade->state = UPD_NODE_UPDATE_CLUSTERED;
#ifdef WITH_WSREP #ifdef WITH_WSREP
err = wsrep_append_foreign_key( err = wsrep_append_foreign_key(
thr_get_trx(thr), thr_get_trx(thr),
foreign, foreign,
clust_rec, clust_rec,
clust_index, clust_index,
FALSE, FALSE); FALSE, WSREP_KEY_EXCLUSIVE);
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
fprintf(stderr, fprintf(stderr,
"WSREP: foreign key append failed: %d\n", err); "WSREP: foreign key append failed: %d\n", err);
} else } else
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
err = row_update_cascade_for_mysql(thr, cascade, err = row_update_cascade_for_mysql(thr, cascade,
foreign->foreign_table); foreign->foreign_table);
if (foreign->foreign_table->n_foreign_key_checks_running == 0) { if (foreign->foreign_table->n_foreign_key_checks_running == 0) {
fprintf(stderr, fprintf(stderr,
skipping to change at line 1655 skipping to change at line 1661
case DB_SUCCESS_LOCKED_REC: case DB_SUCCESS_LOCKED_REC:
case DB_SUCCESS: case DB_SUCCESS:
break; break;
default: default:
goto end_scan; goto end_scan;
} }
if (check_ref) { if (check_ref) {
err = DB_SUCCESS; err = DB_SUCCESS;
#ifdef WITH_WSREP #ifdef WITH_WSREP
if (!wsrep_on(trx->mysql_thd)) {
goto end_scan;
}
enum wsrep_key_type key_type;
if (upd_node != NULL) {
key_type = WSREP_KEY_SHARED;
} else {
switch (wsrep_certification_rules
) {
default:
case WSREP_CERTIFICATION_RULES_ST
RICT:
key_type = WSREP_KEY_EXCL
USIVE;
break;
case WSREP_CERTIFICATION_RULES_OP
TIMIZED:
key_type = WSREP_KEY_SEMI
;
break;
}
}
err = wsrep_append_foreign_key( err = wsrep_append_foreign_key(
thr_get_trx(thr), trx,
foreign, foreign,
rec, rec,
check_index, check_index,
check_ref, check_ref,
(upd_node) ? TRUE : FALSE); key_type);
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
goto end_scan; goto end_scan;
} else if (foreign->type != 0) { } else if (foreign->type != 0) {
/* There is an ON UPDATE or ON DELETE /* There is an ON UPDATE or ON DELETE
condition: check them in a separate condition: check them in a separate
function */ function */
err = row_ins_foreign_check_on_constraint ( err = row_ins_foreign_check_on_constraint (
thr, foreign, &pcur, entry, thr, foreign, &pcur, entry,
&mtr); &mtr);
 End of changes. 6 change blocks. 
8 lines changed or deleted 37 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)