Comment 4 for bug 535528

Revision history for this message
Stewart Smith (stewart) wrote :

The following patch will hit the assert when running the embedded_innodb test suite

=== modified file 'plugin/embedded_innodb/embedded_innodb_engine.cc'
--- plugin/embedded_innodb/embedded_innodb_engine.cc 2010-09-27 09:04:26 +0000
+++ plugin/embedded_innodb/embedded_innodb_engine.cc 2010-09-28 05:40:05 +0000
@@ -617,20 +617,7 @@ THR_LOCK_DATA **EmbeddedInnoDBCursor::st
                                                  THR_LOCK_DATA **to,
                                                  thr_lock_type lock_type)
 {
- /* Currently, we can get a transaction start by ::store_lock
- instead of beginTransaction, startStatement.
-
- See https://bugs.launchpad.net/drizzle/+bug/535528
-
- all stemming from the transactional engine interface needing
- a severe amount of immodium.
- */
-
- if(*get_trx(session) == NULL)
- {
- static_cast<EmbeddedInnoDBEngine*>(getEngine())->
- doStartTransaction(session, START_TRANS_NO_OPTIONS);
- }
+ assert((*get_trx(session)) != NULL);

#2 0x00007ffff52bc941 in *__GI___assert_fail (
    assertion=0x7ffff27ae746 "(*get_trx(session)) != __null",
    file=<value optimized out>, line=620,
    function=0x7ffff27b0f00 "virtual drizzled::THR_LOCK_DATA** EmbeddedInnoDBCursor::store_lock(drizzled::Session*, drizzled::THR_LOCK_DATA**, drizzled::thr_lock_type)") at assert.c:81
#3 0x00007ffff278db11 in EmbeddedInnoDBCursor::store_lock (this=0x183e1b0,
    session=0x1836f20, to=0x183edc8,
    lock_type=drizzled::TL_WRITE_CONCURRENT_INSERT)
    at plugin/embedded_innodb/embedded_innodb_engine.cc:620
#4 0x00000000007075c5 in get_lock_data (session=0x1836f20,
    table_ptr=0x183c7c0, count=1, should_lock=true,
    write_lock_used=0x7fffdef91728) at drizzled/lock.cc:631
#5 0x000000000070661f in drizzled::mysql_lock_tables (session=0x1836f20,
    tables=0x183c7c0, count=1, flags=4, need_reopen=0x7fffdef917ef)
    at drizzled/lock.cc:193
#6 0x000000000079d342 in drizzled::Session::lock_tables (this=0x1836f20,
    tables=0x183c228, count=1, need_reopen=0x7fffdef917ef)
    at drizzled/sql_base.cc:2307
#7 0x000000000078355c in drizzled::Session::openTablesLock (this=0x1836f20,
---Type <return> to continue, or q <return> to quit---
    tables=0x183c228) at drizzled/session.cc:1889
#8 0x00000000007aafc7 in drizzled::mysql_insert (session=0x1836f20,
    table_list=0x183c228, fields=..., values_list=..., update_fields=...,
    update_values=..., duplic=drizzled::DUP_ERROR, ignore=false)
    at drizzled/sql_insert.cc:258
#9 0x000000000080ad65 in drizzled::statement::Insert::execute (this=0x1851e30)
    at drizzled/statement/insert.cc:57
#10 0x00000000007bc762 in mysql_execute_command (session=0x1836f20)
    at drizzled/sql_parse.cc:479
#11 0x00000000007bd524 in drizzled::mysql_parse (session=0x1836f20,
    inBuf=0x18327b8 "INSERT INTO t1 VALUES ('40004712','000001','0010',9)",
    length=52) at drizzled/sql_parse.cc:750
#12 0x00000000007bc0b6 in drizzled::dispatch_command (
    command=drizzled::COM_QUERY, session=0x1836f20,
    packet=0x1832f11 "INSERT INTO t1 VALUES ('40004712','000001','0010',9)",
    packet_length=52) at drizzled/sql_parse.cc:224
#13 0x000000000077e82d in drizzled::Session::executeStatement (this=0x1836f20)
    at drizzled/session.cc:677