Bug 457218

Summary: 'Explicit or implicit commit' error/server crash with concurrent transactions
Product: Red Hat Enterprise Linux 5 Reporter: Adam Stokes <astokes>
Component: mysqlAssignee: Tom Lane <tgl>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4CC: byte, david.bogen, hhorak, kvolny, patrickm, sghosh, syeghiay, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 09:45:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Stokes 2008-07-30 10:11:48 UTC
Description of problem:

Issue: It is a bug with mysql 5.0.45. http://bugs.mysql.com/bug.php?id=24989

Summary: Two concurrent transactions which update same table, the second
transaction consistently gives the following error
message.

ERROR 1422 (HY000): Explicit or implicit commit is not allowed in stored
function or trigger.

Status: I recreated the issue using the same version of mysql and mysql-server
in a RHEL 5 64 bit machine.

Procedure:

1) #yum install mysql; yum install mysql-server
2) downloaded 24989.tar.gz  from http://bugs.mysql.com/bug.php?id=24989
3) created a database 'rob'
4) #mysql -u root -p rob < schema.sql
5) opened mysql in two terminals (T1 and T2)
6) in T1 mysql> START TRANSACTION;
7) in T1 mysql> INSERT INTO data_staging (sensor_id, timestamp, value) VALUES
(1, NOW() + INTERVAL FLOOR(RAND() * 10000) MINUTE, 1);
8) in t1 mysql> SELECT sleep(10);


9) in T2 mysql> INSERT INTO data_staging (sensor_id, timestamp, value) VALUES
(1, NOW() + INTERVAL FLOOR(RAND() * 10000) MINUTE, 1);

10) in T1 mysql> INSERT INTO data_staging (sensor_id, timestamp, value) VALUES
(1, NOW() + INTERVAL FLOOR(RAND() * 10000) MINUTE, 1);

11) in T2 ERROR 1422 (HY000): Explicit or implicit commit is not allowed in
stored function or trigger.

How reproducible:

Always

Steps to Reproduce:

Check the problem description

Actual results:

ERROR 1422 (HY000): Explicit or implicit commit is not allowed in stored
function or trigger

Expected results:


Additional info:

MySQL server packages

mysql-5.0.45-7.el5
mysql-server-5.0.45-7.el5
mysql-5.0.45-7.el5

Comment 6 errata-xmlrpc 2009-09-02 09:45:49 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2009-1289.html