Skip to content

Commit

Permalink
InnoDB UPDATE cleanup
Browse files Browse the repository at this point in the history
row_upd_store_v_row(): Declare static

row_upd_clust_rec_by_insert(), row_upd_del_mark_clust_rec():
Pass the parameter 'foreign' only #ifdef WITH_WSREP
  • Loading branch information
dr-m committed Feb 7, 2018
1 parent b68dac8 commit 5d7e9fd
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions storage/innobase/row/row0upd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2103,6 +2103,7 @@ row_upd_eval_new_vals(
@param[in] update an update vector if it is update
@param[in] thd mysql thread handle
@param[in,out] mysql_table mysql table object */
static
void
row_upd_store_v_row(
upd_node_t* node,
Expand Down Expand Up @@ -2637,7 +2638,9 @@ row_upd_clust_rec_by_insert(
que_thr_t* thr, /*!< in: query thread */
ibool referenced,/*!< in: TRUE if index may be referenced in
a foreign key constraint */
ibool foreign, /*!< in: TRUE if index is foreign key index */
#ifdef WITH_WSREP
bool foreign,/*!< in: whether this is a foreign key */
#endif
mtr_t* mtr) /*!< in/out: mtr; gets committed here */
{
mem_heap_t* heap;
Expand Down Expand Up @@ -2925,7 +2928,9 @@ row_upd_del_mark_clust_rec(
ibool referenced,
/*!< in: TRUE if index may be referenced in
a foreign key constraint */
ibool foreign,/*!< in: TRUE if index is foreign key index */
#ifdef WITH_WSREP
bool foreign,/*!< in: whether this is a foreign key */
#endif
mtr_t* mtr) /*!< in: mtr; gets committed here */
{
btr_pcur_t* pcur;
Expand Down Expand Up @@ -3016,7 +3021,6 @@ row_upd_clust_step(
ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets;
ibool referenced;
ibool foreign = FALSE;
trx_t* trx = thr_get_trx(thr);

rec_offs_init(offsets_);
Expand All @@ -3026,8 +3030,7 @@ row_upd_clust_step(
referenced = row_upd_index_is_referenced(index, trx);

#ifdef WITH_WSREP
foreign = wsrep_row_upd_index_is_foreign(
index, thr_get_trx(thr));
const bool foreign = wsrep_row_upd_index_is_foreign(index, trx);
#endif

pcur = node->pcur;
Expand Down Expand Up @@ -3127,7 +3130,11 @@ row_upd_clust_step(

if (node->is_delete) {
err = row_upd_del_mark_clust_rec(
node, index, offsets, thr, referenced, foreign, &mtr);
node, index, offsets, thr, referenced,
#ifdef WITH_WSREP
foreign,
#endif
&mtr);

if (err == DB_SUCCESS) {
node->state = UPD_NODE_UPDATE_ALL_SEC;
Expand Down Expand Up @@ -3173,7 +3180,11 @@ row_upd_clust_step(
externally! */

err = row_upd_clust_rec_by_insert(
node, index, thr, referenced, foreign, &mtr);
node, index, thr, referenced,
#ifdef WITH_WSREP
foreign,
#endif
&mtr);
if (err != DB_SUCCESS) {

goto exit_func;
Expand Down

0 comments on commit 5d7e9fd

Please sign in to comment.