diff options
author | unknown <gkodinov/kgeorge@macbook.gmz> | 2006-12-15 11:38:30 +0200 |
---|---|---|
committer | unknown <gkodinov/kgeorge@macbook.gmz> | 2006-12-15 11:38:30 +0200 |
commit | acf0636e2e127106e1101a7e0f217b12fb2ceeff (patch) | |
tree | df2f64395252ec20e031ba60b245723dca2b6671 /mysql-test/r/udf.result | |
parent | 2f78d5ca81e39c55aa918758a1f9b4e46ce76d74 (diff) | |
download | mariadb-git-acf0636e2e127106e1101a7e0f217b12fb2ceeff.tar.gz |
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
When deleting a user defined function MySQL must remove it from both the
in-memory hash table and the mysql.proc system table.
Finding (and removal therefore) from the internal hash table is case
insensitive (or whatever the default charset is), whereas finding and
removal from the system table is case sensitive.
As a result if you supply a function name that is not in the same character
case to DROP FUNCTION the server will remove the function only from the
in-memory hash table and will keep the row in mysql.proc system table.
This will cause inconsistency between the two structures (that is fixed
only by restarting the server).
Fixed by using the name in the precise case (from the in-memory hash table)
to delete the row in the mysql.proc system table.
mysql-test/r/udf.result:
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
- test case
mysql-test/t/udf.test:
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
- test case
sql/sql_udf.cc:
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
- use the exact function name in deleting from mysql.proc.
Diffstat (limited to 'mysql-test/r/udf.result')
-rw-r--r-- | mysql-test/r/udf.result | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/udf.result b/mysql-test/r/udf.result index eb5d771bcfe..64b7111bbc8 100644 --- a/mysql-test/r/udf.result +++ b/mysql-test/r/udf.result @@ -194,6 +194,17 @@ DROP FUNCTION sequence; DROP FUNCTION lookup; DROP FUNCTION reverse_lookup; DROP FUNCTION avgcost; +select * from mysql.func; +name ret dl type +CREATE FUNCTION is_const RETURNS STRING SONAME "UDF_EXAMPLE_LIB"; +select IS_const(3); +IS_const(3) +const +drop function IS_const; +select * from mysql.func; +name ret dl type +select is_const(3); +ERROR 42000: FUNCTION test.is_const does not exist CREATE FUNCTION is_const RETURNS STRING SONAME "UDF_EXAMPLE_LIB"; select is_const(3) as const, |