[MDEV-6601] Assertion `!thd->in_active_multi_stmt_transa ction() || thd->in_multi_stmt_transaction_mode()' failed on executing a stored procedure with commit Created: 2014-08-19  Updated: 2014-09-05  Resolved: 2014-09-05

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.39, 10.0.13
Fix Version/s: 5.5.40, 10.0.14

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

10.1-mdev5317/sql/sql_parse.cc:5141: int mysql_execute_command(THD*): Assertion `!thd->in_active_multi_stmt_transaction() || thd->in_multi_stmt_transaction_mode()' failed.
140819  1:19:15 [ERROR] mysqld got signal 6 ;
 
#6  0x00007f8f970d56f1 in *__GI___assert_fail (assertion=0x7f8f9a0ad3d8 "!thd->in_active_multi_stmt_transaction() || thd->in_multi_stmt_transaction_mode()", file=<optimized out>, line=5141, function=0x7f8f9a0ae8c0 "int mysql_execute_command(THD*)") at assert.c:81
#7  0x00007f8f997a1d57 in mysql_execute_command (thd=0x7f8f923ec070) at 10.1-mdev5317/sql/sql_parse.cc:5140
#8  0x00007f8f997a4ec6 in mysql_parse (thd=0x7f8f923ec070, rawbuf=0x7f8f8f378088 "begin not atomic\nstart transaction;\ncommit;\nend", length=47, parser_state=0x7f8f8fbb55e0) at 10.1-mdev5317/sql/sql_parse.cc:6466
#9  0x00007f8f9979757b in dispatch_command (command=COM_QUERY, thd=0x7f8f923ec070, packet=0x7f8f92ff9071 "begin not atomic\nstart transaction;\ncommit;\nend ", packet_length=48) at 10.1-mdev5317/sql/sql_parse.cc:1310
#10 0x00007f8f997968c0 in do_command (thd=0x7f8f923ec070) at 10.1-mdev5317/sql/sql_parse.cc:1007
#11 0x00007f8f998bf83d in do_handle_one_connection (thd_arg=0x7f8f923ec070) at 10.1-mdev5317/sql/sql_connect.cc:1379
#12 0x00007f8f998bf590 in handle_one_connection (arg=0x7f8f923ec070) at 10.1-mdev5317/sql/sql_connect.cc:1293
#13 0x00007f8f99e23ba6 in pfs_spawn_thread (arg=0x7f8f906ae970) at 10.1-mdev5317/storage/perfschema/pfs.cc:1860
#14 0x00007f8f98eaeb50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#15 0x00007f8f9718620d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

Stack trace from:

commit 6502f42f679e605fcdbd6c8b49d2813f553001b0
Author: Sergei Golubchik <serg@mariadb.org>
Date:   Mon Aug 18 14:28:48 2014 +0200

Test case:

--delimiter |
 
start transaction |
 
begin not atomic
start transaction;
commit;
end |



 Comments   
Comment by Sergei Golubchik [ 2014-08-19 ]

Same in 5.5:

delimiter |;
create procedure sp() begin
  commit;
end|
delimiter ;|
start transaction;
call sp();

Comment by Elena Stepanova [ 2014-08-19 ]

Indeed, sorry for not checking it earlier.
For a note, not reproducible on MySQL 5.5/5.6.

Comment by Sergei Golubchik [ 2014-08-19 ]

holyfoot, could you please check whether this patch is ok or whether we need to save/restore more server status bits? Thanks.

Generated at Thu Feb 08 07:13:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.