Bug 427102 - mysql 5 triggers produces error Function with select return no data
mysql 5 triggers produces error Function with select return no data
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mysql (Show other bugs)
5.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
http://bugs.mysql.com/bug.php?id=20028
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-31 13:25 EST by Marcelo Giles
Modified: 2013-07-02 23:16 EDT (History)
2 users (show)

See Also:
Fixed In Version: 5.0.45-7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-25 20:56:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marcelo Giles 2007-12-31 13:25:57 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20071122 Red Hat/1.5.0.12-7.el5 Firefox/1.5.0.12

Description of problem:
This bug has been reported upstream on the mysql web site:

Bug #20028 Function with select return no data
http://bugs.mysql.com/bug.php ?id=20028

There's a patch for this bug:

http://lists.mysql.com/commits/13211

Version-Release number of selected component (if applicable):
mysql-server-5.0.22-2.1.0.1

How reproducible:
Always


Steps to Reproduce:
perform INSERT, SELECT or UPDATE triggers on database tables.

Actual Results:
Error on mysl CLI:
Reason: No data - zero rows fetched, selected, or processed 

Expected Results:
INSERT, SELECT or UPDATE triggers operations should have been carried on successfully.

Additional info:
Patch proposed on mysql.com:

ChangeSet@stripped, 2006-10-05 20:26:07-07:00, malff@weblab.(none) +8 -0
 Bug#20028 (Function with select return no data)
 
 Before this change, THD::abort_on_warning was set in sp_head::execute,
 causing Stored Procedures, Stored Functions and Triggers to treat warnings
 as errors when executing in a strict SQL_MODE.
 
 After this change, THD::abort_on_warning is set in process_triggers in
 sql/sql_trigger.cc, which only affects triggers. Only INSERT and UPDATE
 triggers can elevate the abort_on_warning flag, which does not affect
 DELETE triggers.
 
 This fix is a revision of the change done for 6951, it produces the
 same results for the INSERT and UPDATE triggers in strict mode, while not
 causing side effects in DELETE triggers, Stored Procedures or Stored
 Functions, which -- according to the definition of a STRICT mode -- should
 not produre errors when no insert or update is performed.
Comment 1 Tom Lane 2007-12-31 17:45:35 EST
We are planning to rebase mysql to 5.0.45 (or later) in RHEL 5.2.  That should take care of this bug, along 
with boatloads of others ...
Comment 5 Tom Lane 2008-05-25 20:56:01 EDT
Fixed in RHEL 5.2 update.

Note You need to log in before you can comment on or make changes to this bug.