mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Added regression test for bug#11763757 "56510: ERROR 42000:
FUNCTION DOES NOT EXIST IF NOT-PRIV USER RECONNECTS". The bug itself was fixed by the same patch as bug@11747137 "30977: CONCURRENT STATEMENT USING STORED FUNCTION AND DROP FUNCTION BREAKS SBR".
This commit is contained in:
parent
5db6d914ee
commit
3f0b267802
2 changed files with 63 additions and 12 deletions
|
@ -254,7 +254,6 @@ CREATE PROCEDURE p1(i INT) BEGIN END;
|
||||||
DROP PROCEDURE p1;
|
DROP PROCEDURE p1;
|
||||||
DELETE FROM mysql.user WHERE User='mysqltest_1';
|
DELETE FROM mysql.user WHERE User='mysqltest_1';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
set @@global.concurrent_insert= @old_concurrent_insert;
|
|
||||||
#
|
#
|
||||||
# Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
|
# Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
|
||||||
#
|
#
|
||||||
|
@ -288,3 +287,25 @@ DROP FUNCTION f1;
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
# -- End of 5.1 tests
|
# -- End of 5.1 tests
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Test for bug#11763757 "56510: ERROR 42000: FUNCTION DOES NOT EXIST
|
||||||
|
# IF NOT-PRIV USER RECONNECTS ".
|
||||||
|
#
|
||||||
|
# The real problem was that server was unable handle properly stored
|
||||||
|
# functions in databases which names contained dot.
|
||||||
|
#
|
||||||
|
DROP DATABASE IF EXISTS `my.db`;
|
||||||
|
create database `my.db`;
|
||||||
|
use `my.db`;
|
||||||
|
CREATE FUNCTION f1(a int) RETURNS INT RETURN a;
|
||||||
|
# Create new connection.
|
||||||
|
USE `my.db`;
|
||||||
|
SELECT f1(1);
|
||||||
|
f1(1)
|
||||||
|
1
|
||||||
|
SELECT `my.db`.f1(2);
|
||||||
|
`my.db`.f1(2)
|
||||||
|
2
|
||||||
|
# Switching to default connection.
|
||||||
|
DROP DATABASE `my.db`;
|
||||||
|
set @@global.concurrent_insert= @old_concurrent_insert;
|
||||||
|
|
|
@ -371,16 +371,6 @@ DELETE FROM mysql.user WHERE User='mysqltest_1';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Restore global concurrent_insert value. Keep in the end of the test file.
|
|
||||||
#
|
|
||||||
|
|
||||||
set @@global.concurrent_insert= @old_concurrent_insert;
|
|
||||||
|
|
||||||
# Wait till all disconnects are completed
|
|
||||||
--source include/wait_until_count_sessions.inc
|
|
||||||
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
|
--echo # Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -449,7 +439,47 @@ DROP FUNCTION f1;
|
||||||
--disconnect con1
|
--disconnect con1
|
||||||
--disconnect con2
|
--disconnect con2
|
||||||
|
|
||||||
|
|
||||||
--echo # ------------------------------------------------------------------
|
--echo # ------------------------------------------------------------------
|
||||||
--echo # -- End of 5.1 tests
|
--echo # -- End of 5.1 tests
|
||||||
--echo # ------------------------------------------------------------------
|
--echo # ------------------------------------------------------------------
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Test for bug#11763757 "56510: ERROR 42000: FUNCTION DOES NOT EXIST
|
||||||
|
--echo # IF NOT-PRIV USER RECONNECTS ".
|
||||||
|
--echo #
|
||||||
|
--echo # The real problem was that server was unable handle properly stored
|
||||||
|
--echo # functions in databases which names contained dot.
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP DATABASE IF EXISTS `my.db`;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
create database `my.db`;
|
||||||
|
use `my.db`;
|
||||||
|
|
||||||
|
CREATE FUNCTION f1(a int) RETURNS INT RETURN a;
|
||||||
|
|
||||||
|
--echo # Create new connection.
|
||||||
|
connect (addcon, localhost, root,,);
|
||||||
|
connection addcon;
|
||||||
|
USE `my.db`;
|
||||||
|
SELECT f1(1);
|
||||||
|
SELECT `my.db`.f1(2);
|
||||||
|
|
||||||
|
--echo # Switching to default connection.
|
||||||
|
connection default;
|
||||||
|
disconnect addcon;
|
||||||
|
DROP DATABASE `my.db`;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Restore global concurrent_insert value. Keep in the end of the test file.
|
||||||
|
#
|
||||||
|
|
||||||
|
set @@global.concurrent_insert= @old_concurrent_insert;
|
||||||
|
|
||||||
|
# Wait till all disconnects are completed
|
||||||
|
--source include/wait_until_count_sessions.inc
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue