diff --git a/tests/Makefile.am b/tests/Makefile.am index a19ffecbd14fd6423bce20cdbad3776f861c6baf..bd56570d8d4d190e54cf32c7131a389bd235c563 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 diff --git a/tests/udf_test b/tests/udf_test deleted file mode 100644 index 15ad640f9843412aa59cb1f4f454a8a6d9f943ae..0000000000000000000000000000000000000000 --- a/tests/udf_test +++ /dev/null @@ -1,33 +0,0 @@ -# -# 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; diff --git a/tests/udf_test.res b/tests/udf_test.res deleted file mode 100644 index de9e9969f3ac0bd3c47640679b6f677cc6b2dacc..0000000000000000000000000000000000000000 --- a/tests/udf_test.res +++ /dev/null @@ -1,175 +0,0 @@ --------------- -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