Commit d8dd784f authored by unknown's avatar unknown

Remove test/udf_test and test/udf_test.res, since udf's are nowadays

tested by mysql-test-run.pl 


BitKeeper/deleted/.del-udf_test:
  Delete: tests/udf_test
BitKeeper/deleted/.del-udf_test.res:
  Delete: tests/udf_test.res
parent 88755cc8
......@@ -24,7 +24,7 @@ EXTRA_DIST = auto_increment.res auto_increment.tst \
insert_and_repair.pl \
grant.pl grant.res test_delayed_insert.pl \
pmail.pl mail_to_db.pl table_types.pl \
udf_test udf_test.res myisam-big-rows.tst \
myisam-big-rows.tst \
CMakeLists.txt
bin_PROGRAMS = mysql_client_test
......
#
# For this script to work, you need to compile and install the
# udf_example script !
#
CREATE FUNCTION metaphon RETURNS STRING SONAME "udf_example.so";
CREATE FUNCTION myfunc_double RETURNS REAL SONAME "udf_example.so";
CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "udf_example.so";
CREATE FUNCTION lookup RETURNS STRING SONAME "udf_example.so";
CREATE FUNCTION reverse_lookup RETURNS STRING SONAME "udf_example.so";
CREATE AGGREGATE FUNCTION avgcost RETURNS REAL SONAME "udf_example.so";
CREATE FUNCTION myfunc_argument_name RETURNS STRING SONAME "udf_example.so";
select metaphon("hello");
select myfunc_double("hello","world");
select myfunc_int(1,2,3),myfunc_int("1","11","111");
select lookup("localhost");
select reverse_lookup("127.0.0.1");
create temporary table t1 (a int,b double);
insert into t1 values (1,5),(1,4),(2,8),(3,9),(4,11);
select avgcost(a,b) from t1;
select avgcost(a,b) from t1 group by a;
select a, myfunc_argument_name(a), myfunc_argument_name(a as b) from t1;
drop table t1;
DROP FUNCTION metaphon;
DROP FUNCTION myfunc_double;
DROP FUNCTION myfunc_int;
DROP FUNCTION lookup;
DROP FUNCTION reverse_lookup;
DROP FUNCTION avgcost;
DROP FUNCTION myfunc_argument_name;
--------------
CREATE FUNCTION metaphon RETURNS STRING SONAME "udf_example.so"
--------------
Query OK, 0 rows affected
--------------
CREATE FUNCTION myfunc_double RETURNS REAL SONAME "udf_example.so"
--------------
Query OK, 0 rows affected
--------------
CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "udf_example.so"
--------------
Query OK, 0 rows affected
--------------
CREATE FUNCTION lookup RETURNS STRING SONAME "udf_example.so"
--------------
Query OK, 0 rows affected
--------------
CREATE FUNCTION reverse_lookup RETURNS STRING SONAME "udf_example.so"
--------------
Query OK, 0 rows affected
--------------
CREATE AGGREGATE FUNCTION avgcost RETURNS REAL SONAME "udf_example.so"
--------------
Query OK, 0 rows affected
--------------
CREATE FUNCTION myfunc_argument_name RETURNS STRING SONAME "udf_example.so"
--------------
Query OK, 0 rows affected
--------------
select metaphon("hello")
--------------
metaphon("hello")
HL
1 row in set
--------------
select myfunc_double("hello","world")
--------------
myfunc_double("hello","world")
108.40
1 row in set
--------------
select myfunc_int(1,2,3),myfunc_int("1","11","111")
--------------
myfunc_int(1,2,3) myfunc_int("1","11","111")
6 6
1 row in set
--------------
select lookup("localhost")
--------------
lookup("localhost")
127.0.0.1
1 row in set
--------------
select reverse_lookup("127.0.0.1")
--------------
reverse_lookup("127.0.0.1")
localhost
1 row in set
--------------
create temporary table t1 (a int,b double)
--------------
Query OK, 0 rows affected
--------------
insert into t1 values (1,5),(1,4),(2,8),(3,9),(4,11)
--------------
Query OK, 5 rows affected
Records: 0 Duplicates: 5 Warnings: 0
--------------
select avgcost(a,b) from t1
--------------
avgcost(a,b)
8.7273
1 row in set
--------------
select avgcost(a,b) from t1 group by a
--------------
avgcost(a,b)
4.5000
8.0000
9.0000
11.0000
4 rows in set
--------------
select a, myfunc_argument_name(a) from t1;
--------------
a myfunc_argument_name(a) myfunc_argument_name(a as b)
1 a b
1 a b
2 a b
3 a b
4 a b
5 rows in set
--------------
drop table t1
--------------
Query OK, 0 rows affected
--------------
DROP FUNCTION metaphon
--------------
Query OK, 0 rows affected
--------------
DROP FUNCTION myfunc_double
--------------
Query OK, 0 rows affected
--------------
DROP FUNCTION myfunc_int
--------------
Query OK, 0 rows affected
--------------
DROP FUNCTION lookup
--------------
Query OK, 0 rows affected
--------------
DROP FUNCTION reverse_lookup
--------------
Query OK, 0 rows affected
--------------
DROP FUNCTION avgcost
--------------
Query OK, 0 rows affected
--------------
DROP FUNCTION myfunc_argument_name;
--------------
Query OK, 0 rows affected
Bye
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment