[MDEV-2404] LP:963603 - Assertion `lock_type != TL_UNLOCK && (lock_type == TL_IGNORE || file->lock.type == TL_UNLOCK)' failed in ha_maria::store_lock with DML, triggers, views Created: 2012-03-24  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug963603.xml    

 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.

  1. RQG grammar:
  2. 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 ;

  1. EOF
  1. Run as
    perl runall.pl \
    --no-mask \
    --threads=4 \
    --duration=600 \
    --queries=100M \
    --views \
    --engine=Aria \
    --grammar=assert.yy \
    --basedir=<basedir>
  1. It fails for me in seconds after the test starts.


 Comments   
Comment by Elena Stepanova [ 2012-03-24 ]

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

Comment by Michael Widenius [ 2012-03-26 ]

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

Comment by Rasmus Johansson (Inactive) [ 2012-03-29 ]

Launchpad bug id: 963603

Generated at Thu Feb 08 06:41:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.