Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5b6a4f25
Commit
5b6a4f25
authored
Jan 29, 2014
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue on wsrep_kill_victim mutexing order error. Furthermore, fixed merge
errors found on mysql-test suite testing.
parent
86d47038
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
23 deletions
+33
-23
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+5
-3
storage/innobase/lock/lock0lock.cc
storage/innobase/lock/lock0lock.cc
+7
-5
storage/innobase/row/row0ins.cc
storage/innobase/row/row0ins.cc
+5
-5
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+1
-0
storage/xtradb/lock/lock0lock.cc
storage/xtradb/lock/lock0lock.cc
+6
-3
storage/xtradb/row/row0ins.cc
storage/xtradb/row/row0ins.cc
+9
-7
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
5b6a4f25
...
@@ -3476,6 +3476,11 @@ innobase_commit_low(
...
@@ -3476,6 +3476,11 @@ innobase_commit_low(
/*================*/
/*================*/
trx_t
*
trx
)
/*!< in: transaction handle */
trx_t
*
trx
)
/*!< in: transaction handle */
{
{
if
(
trx_is_started
(
trx
))
{
trx_commit_for_mysql
(
trx
);
}
#ifdef WITH_WSREP
#ifdef WITH_WSREP
THD
*
thd
=
(
THD
*
)
trx
->
mysql_thd
;
THD
*
thd
=
(
THD
*
)
trx
->
mysql_thd
;
const
char
*
tmp
=
0
;
const
char
*
tmp
=
0
;
...
@@ -3493,10 +3498,7 @@ innobase_commit_low(
...
@@ -3493,10 +3498,7 @@ innobase_commit_low(
#endif
/* WSREP_PROC_INFO */
#endif
/* WSREP_PROC_INFO */
}
}
#endif
/* WITH_WSREP */
#endif
/* WITH_WSREP */
if
(
trx_is_started
(
trx
))
{
trx_commit_for_mysql
(
trx
);
}
#ifdef WITH_WSREP
#ifdef WITH_WSREP
if
(
wsrep_on
((
void
*
)
thd
))
{
thd_proc_info
(
thd
,
tmp
);
}
if
(
wsrep_on
((
void
*
)
thd
))
{
thd_proc_info
(
thd
,
tmp
);
}
#endif
/* WITH_WSREP */
#endif
/* WITH_WSREP */
...
...
storage/innobase/lock/lock0lock.cc
View file @
5b6a4f25
...
@@ -1582,17 +1582,17 @@ lock_rec_other_has_expl_req(
...
@@ -1582,17 +1582,17 @@ lock_rec_other_has_expl_req(
#endif
/* UNIV_DEBUG */
#endif
/* UNIV_DEBUG */
#ifdef WITH_WSREP
#ifdef WITH_WSREP
static
void
static
void
wsrep_kill_victim
(
const
trx_t
*
const
trx
,
const
lock_t
*
lock
)
{
wsrep_kill_victim
(
const
trx_t
*
const
trx
,
const
lock_t
*
lock
)
{
ut_ad
(
lock_mutex_own
());
ut_ad
(
lock_mutex_own
());
ut_ad
(
trx_mutex_own
(
lock
->
trx
));
ut_ad
(
trx_mutex_own
(
lock
->
trx
));
int
bf_this
=
wsrep_thd_is_brute_force
(
trx
->
mysql_thd
);
int
bf_this
=
wsrep_thd_is_brute_force
(
trx
->
mysql_thd
);
int
bf_other
=
int
bf_other
=
wsrep_thd_is_brute_force
(
lock
->
trx
->
mysql_thd
);
wsrep_thd_is_brute_force
(
lock
->
trx
->
mysql_thd
);
if
((
bf_this
&&
!
bf_other
)
||
if
((
bf_this
&&
!
bf_other
)
||
(
bf_this
&&
bf_other
&&
wsrep_trx_order_before
(
(
bf_this
&&
bf_other
&&
wsrep_trx_order_before
(
trx
->
mysql_thd
,
lock
->
trx
->
mysql_thd
)))
{
trx
->
mysql_thd
,
lock
->
trx
->
mysql_thd
)))
{
if
(
lock
->
trx
->
lock
.
que_state
==
TRX_QUE_LOCK_WAIT
)
{
if
(
lock
->
trx
->
lock
.
que_state
==
TRX_QUE_LOCK_WAIT
)
{
if
(
wsrep_debug
)
if
(
wsrep_debug
)
fprintf
(
stderr
,
"WSREP: BF victim waiting
\n
"
);
fprintf
(
stderr
,
"WSREP: BF victim waiting
\n
"
);
...
@@ -4656,9 +4656,11 @@ lock_table_other_has_incompatible(
...
@@ -4656,9 +4656,11 @@ lock_table_other_has_incompatible(
&&
(
wait
||
!
lock_get_wait
(
lock
)))
{
&&
(
wait
||
!
lock_get_wait
(
lock
)))
{
#ifdef WITH_WSREP
#ifdef WITH_WSREP
if
(
wsrep_debug
)
if
(
wsrep_debug
)
fprintf
(
stderr
,
"WSREP: table lock abort"
);
fprintf
(
stderr
,
"WSREP: table lock abort"
);
trx_mutex_enter
(
lock
->
trx
);
wsrep_kill_victim
((
trx_t
*
)
trx
,
(
lock_t
*
)
lock
);
wsrep_kill_victim
((
trx_t
*
)
trx
,
(
lock_t
*
)
lock
);
trx_mutex_exit
(
lock
->
trx
);
#endif
#endif
return
(
lock
);
return
(
lock
);
...
...
storage/innobase/row/row0ins.cc
View file @
5b6a4f25
...
@@ -1277,21 +1277,21 @@ row_ins_foreign_check_on_constraint(
...
@@ -1277,21 +1277,21 @@ row_ins_foreign_check_on_constraint(
cascade
->
state
=
UPD_NODE_UPDATE_CLUSTERED
;
cascade
->
state
=
UPD_NODE_UPDATE_CLUSTERED
;
err
=
row_update_cascade_for_mysql
(
thr
,
cascade
,
foreign
->
foreign_table
);
#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
,
FALSE
);
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
,
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
,
"InnoDB: error: table %s has the counter 0"
"InnoDB: error: table %s has the counter 0"
...
...
storage/innobase/row/row0mysql.cc
View file @
5b6a4f25
...
@@ -5182,6 +5182,7 @@ row_check_index_for_mysql(
...
@@ -5182,6 +5182,7 @@ row_check_index_for_mysql(
dtuple_get_nth_field
(
prev_entry
,
i
)))
{
dtuple_get_nth_field
(
prev_entry
,
i
)))
{
contains_null
=
TRUE
;
contains_null
=
TRUE
;
break
;
}
}
}
}
...
...
storage/xtradb/lock/lock0lock.cc
View file @
5b6a4f25
...
@@ -1590,11 +1590,14 @@ lock_rec_other_has_expl_req(
...
@@ -1590,11 +1590,14 @@ lock_rec_other_has_expl_req(
#endif
/* UNIV_DEBUG */
#endif
/* UNIV_DEBUG */
#ifdef WITH_WSREP
#ifdef WITH_WSREP
static
void
static
void
wsrep_kill_victim
(
trx_t
*
trx
,
lock_t
*
lock
)
{
wsrep_kill_victim
(
trx_t
*
trx
,
lock_t
*
lock
)
{
ut_ad
(
lock_mutex_own
());
ut_ad
(
trx_mutex_own
(
lock
->
trx
));
int
bf_this
=
wsrep_thd_is_brute_force
(
trx
->
mysql_thd
);
int
bf_this
=
wsrep_thd_is_brute_force
(
trx
->
mysql_thd
);
int
bf_other
=
int
bf_other
=
wsrep_thd_is_brute_force
(
lock
->
trx
->
mysql_thd
);
wsrep_thd_is_brute_force
(
lock
->
trx
->
mysql_thd
);
if
((
bf_this
&&
!
bf_other
)
||
if
((
bf_this
&&
!
bf_other
)
||
(
bf_this
&&
bf_other
&&
wsrep_trx_order_before
(
(
bf_this
&&
bf_other
&&
wsrep_trx_order_before
(
trx
->
mysql_thd
,
lock
->
trx
->
mysql_thd
)))
{
trx
->
mysql_thd
,
lock
->
trx
->
mysql_thd
)))
{
...
...
storage/xtradb/row/row0ins.cc
View file @
5b6a4f25
...
@@ -1277,19 +1277,21 @@ row_ins_foreign_check_on_constraint(
...
@@ -1277,19 +1277,21 @@ row_ins_foreign_check_on_constraint(
cascade
->
state
=
UPD_NODE_UPDATE_CLUSTERED
;
cascade
->
state
=
UPD_NODE_UPDATE_CLUSTERED
;
err
=
row_update_cascade_for_mysql
(
thr
,
cascade
,
foreign
->
foreign_table
);
#ifdef WITH_WSREP
#ifdef WITH_WSREP
if
(
err
==
DB_SUCCESS
)
{
err
=
(
dberr_t
)
wsrep_append_foreign_key
(
err
=
(
dberr_t
)
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
,
FALSE
);
}
if
(
err
!=
DB_SUCCESS
)
{
fprintf
(
stderr
,
"WSREP: foreign key append failed: %d
\n
"
,
err
);
}
else
#endif
/* WITH_WSREP */
#endif
/* WITH_WSREP */
err
=
row_update_cascade_for_mysql
(
thr
,
cascade
,
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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment