mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#20028 (Function with select return no data)
This patch reverts a change introduced by Bug 6951, which incorrectly set thd->abort_on_warning for stored procedures. As per internal discussions about the SQL_MODE=TRADITIONAL, the correct behavior is to *not* abort on warnings even inside an INSERT/UPDATE trigger. Tests for Stored Procedures, Stored Functions, Triggers involving SQL_MODE have been included or revised, to reflect the intended behavior. (reposting approved patch, to work around source control issues, no review needed)
This commit is contained in:
@ -119,4 +119,13 @@ END|
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
CREATE FUNCTION sp_vars_div_zero() RETURNS INTEGER
|
||||
BEGIN
|
||||
DECLARE div_zero INTEGER;
|
||||
SELECT 1/0 INTO div_zero;
|
||||
RETURN div_zero;
|
||||
END|
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
delimiter ;|
|
||||
|
Reference in New Issue
Block a user