Skip to content

Commit

Permalink
Bug#18652854 INNODB MEMCACHED ASSERTION
Browse files Browse the repository at this point in the history
	     `!CONN_DATA->CRSR_TRX' FAILED

PROBLEM
-------

While calling the memcached command 
"flush_all" , we first try to initialize
the connection and transaction .If the 
transaction is in TRX_STATE_NOT_STARTED 
state we do not set CONN_DATA->CRSR_TRX
as NULL.This was causing the assert.

FIX
--- 
If the transaction is in TRX_STATE_NOT_STARTED
state ,we will reuse the transaction. 

[Approved by Jimmy #rb5469]
  • Loading branch information
Aditya A committed May 27, 2014
1 parent 820ecb0 commit 693a255
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions plugin/innodb_memcached/innodb_memcache/src/innodb_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,16 @@ innodb_conn_init(
read_crsr = conn_data->read_crsr;

if (lock_mode == IB_LOCK_TABLE_X) {
assert(!conn_data->crsr_trx);

conn_data->crsr_trx = ib_cb_trx_begin(
engine->trx_level, true, false);
if(!conn_data->crsr_trx) {
conn_data->crsr_trx = ib_cb_trx_begin(
engine->trx_level, true, false);
} else {
/* Write cursor transaction exists.
Reuse this transaction.*/
assert(ib_cb_trx_start(conn_data->crsr_trx,
engine->trx_level,
true, false, NULL));
}

err = innodb_api_begin(
engine,
Expand Down

0 comments on commit 693a255

Please sign in to comment.