Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2072 06/03/10 12:12:08 msvensson@neptunus.(none) +3 -0
Update test results for udf
Remove STANDARD define when compile udf_example.so
sql/Makefile.am
1.116 06/03/10 12:12:03 msvensson@neptunus.(none) +0 -1
Remove the "STANDARD" define when compiling udf_example.so
mysql-test/t/udf.test
1.3 06/03/10 12:12:03 msvensson@neptunus.(none) +9 -3
Update test try to create, use and drop a non existing function
Disable the result from "reverse_lookup" as it is config dependent
mysql-test/r/udf.result
1.3 06/03/10 12:12:03 msvensson@neptunus.(none) +8 -7
Update results
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/bug11835/my50-bug11835
--- 1.115/sql/Makefile.am 2006-03-10 10:41:00 +01:00
+++ 1.116/sql/Makefile.am 2006-03-10 12:12:03 +01:00
@@ -156,7 +156,6 @@
# For testing of udf_example.so
noinst_LTLIBRARIES= udf_example.la
udf_example_la_SOURCES= udf_example.cc
-udf_example_la_CXXFLAGS= -DSTANDARD
udf_example_la_LDFLAGS= -module -rpath $(pkglibdir)
--- 1.2/mysql-test/r/udf.result 2006-03-10 10:41:00 +01:00
+++ 1.3/mysql-test/r/udf.result 2006-03-10 12:12:03 +01:00
@@ -1,8 +1,9 @@
drop table if exists t1;
CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so';
CREATE FUNCTION myfunc_double RETURNS REAL SONAME 'udf_example.so';
+CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME 'udf_example.so';
+ERROR HY000: Can't find function 'myfunc_nonexist' in library
CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME 'udf_example.so';
-ERROR HY000: Can't find function 'myfunc_int_init' in library
CREATE FUNCTION sequence RETURNS INTEGER SONAME "udf_example.so";
CREATE FUNCTION lookup RETURNS STRING SONAME 'udf_example.so';
CREATE FUNCTION reverse_lookup
@@ -17,8 +18,11 @@
select myfunc_double(78654);
myfunc_double(78654)
54.00
+select myfunc_nonexist();
+ERROR 42000: FUNCTION test.myfunc_nonexist does not exist
select myfunc_int();
-ERROR 42000: FUNCTION test.myfunc_int does not exist
+myfunc_int()
+0
select lookup();
ERROR HY000: Wrong arguments to lookup; Use the source
select lookup("127.0.0.1");
@@ -32,11 +36,7 @@
select reverse_lookup();
ERROR HY000: Wrong number of arguments to reverse_lookup; Use the source
select reverse_lookup("127.0.0.1");
-reverse_lookup("127.0.0.1")
-localhost
select reverse_lookup(127,0,0,1);
-reverse_lookup(127,0,0,1)
-localhost
select reverse_lookup("localhost");
reverse_lookup("localhost")
NULL
@@ -78,8 +78,9 @@
drop procedure xxx2;
DROP FUNCTION metaphon;
DROP FUNCTION myfunc_double;
+DROP FUNCTION myfunc_nonexist;
+ERROR 42000: FUNCTION test.myfunc_nonexist does not exist
DROP FUNCTION myfunc_int;
-ERROR 42000: FUNCTION test.myfunc_int does not exist
DROP FUNCTION sequence;
DROP FUNCTION lookup;
DROP FUNCTION reverse_lookup;
--- 1.2/mysql-test/t/udf.test 2006-03-10 10:41:00 +01:00
+++ 1.3/mysql-test/t/udf.test 2006-03-10 12:12:03 +01:00
@@ -17,9 +17,8 @@
CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so';
CREATE FUNCTION myfunc_double RETURNS REAL SONAME 'udf_example.so';
-# myfunc_int does not have a myfunc_int_init function and can
-# not be loaded unless server is started with --allow-suspicious-udfs
--error ER_CANT_FIND_DL_ENTRY
+CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME 'udf_example.so';
CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME 'udf_example.so';
CREATE FUNCTION sequence RETURNS INTEGER SONAME "udf_example.so";
CREATE FUNCTION lookup RETURNS STRING SONAME 'udf_example.so';
@@ -33,6 +32,7 @@
select myfunc_double(1);
select myfunc_double(78654);
--error 1305
+select myfunc_nonexist();
select myfunc_int();
--error 0
select lookup();
@@ -42,9 +42,14 @@
select lookup("localhost");
--error 0
select reverse_lookup();
+
+# These two functions should return "localhost", but it's
+# depending on configuration, so just call them and don't log the result
+--disable_result_log
select reverse_lookup("127.0.0.1");
---error 0
select reverse_lookup(127,0,0,1);
+--enable_result_log
+
select reverse_lookup("localhost");
--error 0
select avgcost();
@@ -94,6 +99,7 @@
DROP FUNCTION metaphon;
DROP FUNCTION myfunc_double;
--error ER_SP_DOES_NOT_EXIST
+DROP FUNCTION myfunc_nonexist;
DROP FUNCTION myfunc_int;
DROP FUNCTION sequence;
DROP FUNCTION lookup;
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2072) | msvensson | 10 Mar |