Assertion `lock_type != TL_UNLOCK && (lock_type == TL_IGNORE || file->lock.type == TL_UNLOCK)' failed in ha_maria::store_lock with DML, triggers, views

Bug #963603 reported by Elena Stepanova on 2012-03-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Medium
Michael Widenius

Bug Description

Version: '5.3.5-MariaDB-ga-debug-log'
mysqld: ha_maria.cc:2872: virtual THR_LOCK_DATA** ha_maria::store_lock(THD*, THR_LOCK_DATA**, thr_lock_type): Assertion `lock_type != TL_UNLOCK && (lock_type == TL_IGNORE || file->lock.type == TL_UNLOCK)' failed.
120324 4:06:06 [ERROR] mysqld got signal 6 ;

#8 0xb743e014 in __assert_fail () from /lib/libc.so.6
#9 0x0859d01a in ha_maria::store_lock (this=0x9609278, thd=0x93945b28, to=0x9750358,
    lock_type=TL_WRITE_CONCURRENT_INSERT) at ha_maria.cc:2871
#10 0x082c9355 in get_lock_data (thd=0x93945b28, table_ptr=0x96d3450, count=3, flags=2,
    write_lock_used=0x937de464) at lock.cc:956
#11 0x082c780f in mysql_lock_tables (thd=0x93945b28, tables=0x96d3450, count=3, flags=4,
    need_reopen=0x937de527) at lock.cc:210
#12 0x08338c61 in lock_tables (thd=0x93945b28, tables=0x95f7cf8, count=3,
    need_reopen=0x937de527) at sql_base.cc:5599
#13 0x08337fc8 in open_and_lock_tables_derived (thd=0x93945b28, tables=0x95f7cf8,
    derived=true) at sql_base.cc:5246
#14 0x082f2dd9 in open_and_lock_tables (thd=0x93945b28, tables=0x95f7cf8)
    at mysql_priv.h:1754
#15 0x08389896 in mysql_insert (thd=0x93945b28, table_list=0x95f7cf8, fields=...,
    values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR,
    ignore=false) at sql_insert.cc:670
#16 0x082e5b5c in mysql_execute_command (thd=0x93945b28) at sql_parse.cc:3232
#17 0x082ee438 in mysql_parse (thd=0x93945b28,
    rawbuf=0x95f7c18 "INSERT INTO `AA` ( `col_int_nokey` ) VALUES ( NULL )", length=52,
    found_semicolon=0x937df234) at sql_parse.cc:6152
#18 0x082e0e19 in dispatch_command (command=COM_QUERY, thd=0x93945b28,
    packet=0x93947cd1 "INSERT INTO `AA` ( `col_int_nokey` ) VALUES ( NULL )",
    packet_length=52) at sql_parse.cc:1228
#19 0x082e02c3 in do_command (thd=0x93945b28) at sql_parse.cc:923
#20 0x082dd249 in handle_one_connection (arg=0x93945b28) at sql_connect.cc:1193
#21 0xb76ccb25 in start_thread () from /lib/libpthread.so.0

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x95f7c18): INSERT INTO `AA` ( `col_int_nokey` ) VALUES ( NULL )
Connection ID (thread ID): 10
Status: NOT_KILLED

bzr version-info
revision-id: <email address hidden>
date: 2012-03-23 18:22:39 +0200
build-date: 2012-03-24 05:12:46 +0400
revno: 3470

Could not reproduce on maria-5.5 revno 3345 or maria-5.2 revno 3122.

# RQG grammar:
# cat assert.yy

query:
dml | ddl ;

dml:
INSERT INTO _table ( _field ) VALUES ( NULL ) |
DELETE FROM _table LIMIT 1 ;

ddl:
CREATE TRIGGER _letter AFTER INSERT ON _table FOR EACH ROW BEGIN dml ; END ;

# EOF

# Run as
perl runall.pl \
--no-mask \
--threads=4 \
--duration=600 \
--queries=100M \
--views \
--engine=Aria \
--grammar=assert.yy \
--basedir=<basedir>

# It fails for me in seconds after the test starts.

Related branches

Elena Stepanova (elenst) wrote :

I have set the importance to Medium for now, as I only see the problem on a debug version; the same test on a release build seems to run okay. If there is a hidden general issue, please adjust the importance accordingly.

Changed in maria:
milestone: none → 5.3
Michael Widenius (monty) on 2012-03-26
Changed in maria:
status: New → In Progress
Michael Widenius (monty) wrote :

Fixed in 5.3 tree. Will be in 5.3.6

Changed in maria:
status: In Progress → Fix Released
Elena Stepanova (elenst) on 2012-03-29
tags: added: assertion rqg
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers