Red Hat Bugzilla – Bug 427102
mysql 5 triggers produces error Function with select return no data
Last modified: 2013-07-02 23:16:33 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:126.96.36.199) Gecko/20071122 Red Hat/188.8.131.52-7.el5 Firefox/184.108.40.206
Description of problem:
This bug has been reported upstream on the mysql web site:
Bug #20028 Function with select return no data
There's a patch for this bug:
Version-Release number of selected component (if applicable):
Steps to Reproduce:
perform INSERT, SELECT or UPDATE triggers on database tables.
Error on mysl CLI:
Reason: No data - zero rows fetched, selected, or processed
INSERT, SELECT or UPDATE triggers operations should have been carried on successfully.
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
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.
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 ...
Fixed in RHEL 5.2 update.