summaryrefslogtreecommitdiff
path: root/mysql-test/t/create_drop_function.test
diff options
context:
space:
mode:
authorRucha Deodhar <rucha.deodhar@mariadb.com>2020-07-01 14:11:31 +0530
committerRucha Deodhar <rucha.deodhar@mariadb.com>2020-07-01 18:51:47 +0530
commit8bd599e89e75e364bf6b4ebfe2395f7e2fc49e9b (patch)
treefceea37cf1d85464eed2fd18ecaf901b57dda7c5 /mysql-test/t/create_drop_function.test
parent3bc89395529b099ef744953263ddc10b1f0ea1bd (diff)
downloadmariadb-git-bb-10.1-MDEV-22654.tar.gz
MDEV-22654: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'bb-10.1-MDEV-22654
failed in Diagnostics_area::set_ok_status on FUNCTION replace When there is REPLACE in the statement, sp_drop_routine_internal() returns 0 (SP_OK) on success which is then assigned to ret. So ret becomes false and the error state is lost. The expression inside DBUG_ASSERT() evaluates to false and thus the assertion failure.
Diffstat (limited to 'mysql-test/t/create_drop_function.test')
-rw-r--r--mysql-test/t/create_drop_function.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/create_drop_function.test b/mysql-test/t/create_drop_function.test
index e4d3d684cd5..3c4770e25e3 100644
--- a/mysql-test/t/create_drop_function.test
+++ b/mysql-test/t/create_drop_function.test
@@ -1,3 +1,5 @@
+source include/have_log_bin.inc;
+
SET timestamp=UNIX_TIMESTAMP('2014-09-30 08:00:00');
CREATE FUNCTION f1(str char(20))
@@ -39,3 +41,25 @@ DROP FUNCTION IF EXISTS f1;
SELECT body FROM mysql.proc WHERE name like 'f1';
DROP FUNCTION IF EXISTS f1;
+--echo #
+--echo # 10.1 Test
+--echo #
+--echo # MDEV-22654: Assertion `!is_set() || (m_status == DA_OK_BULK &&
+--echo # is_bulk_op())' failed in Diagnostics_area::set_ok_status on FUNCTION replace
+--echo #
+
+SET GLOBAL log_bin_trust_function_creators=0;
+
+CREATE FUNCTION f(c INT) RETURNS NUMERIC NO SQL RETURN 0;
+
+--error ER_BINLOG_UNSAFE_ROUTINE
+CREATE OR REPLACE FUNCTION f(c INT) RETURNS INT RETURN 0;
+
+--error ER_TOO_LONG_IDENT
+CREATE OR REPLACE FUNCTION sp1_thisisaveryverylongnamelongnameverylongname_thisisaveryverylongname234872934(a INT) RETURNS INT RETURN 0;
+
+DROP FUNCTION IF EXISTS f;
+
+SET GLOBAL log_bin_trust_function_creators=1;
+
+--echo # End of 10.1 Test