⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 udf.result

📁 这是linux下运行的mysql软件包,可用于linux 下安装 php + mysql + apach 的网络配置
💻 RESULT
字号:
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 libraryCREATE 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';CREATE FUNCTION reverse_lookupRETURNS STRING SONAME 'udf_example.so';CREATE AGGREGATE FUNCTION avgcostRETURNS REAL SONAME 'udf_example.so';select myfunc_double();ERROR HY000: myfunc_double must have at least one argumentselect myfunc_double(1);myfunc_double(1)49.00select myfunc_double(78654);myfunc_double(78654)54.00select myfunc_nonexist();ERROR 42000: FUNCTION test.myfunc_nonexist does not existselect myfunc_int();myfunc_int()0select lookup();ERROR HY000: Wrong arguments to lookup;  Use the sourceselect lookup("127.0.0.1");lookup("127.0.0.1")127.0.0.1select lookup(127,0,0,1);ERROR HY000: Wrong arguments to lookup;  Use the sourceselect lookup("localhost");lookup("localhost")127.0.0.1select reverse_lookup();ERROR HY000: Wrong number of arguments to reverse_lookup;  Use the sourceselect reverse_lookup("127.0.0.1");select reverse_lookup(127,0,0,1);select reverse_lookup("localhost");reverse_lookup("localhost")NULLselect avgcost();ERROR HY000: wrong number of arguments: AVGCOST() requires two argumentsselect avgcost(100,23.76);ERROR HY000: wrong argument type: AVGCOST() requires an INT and a REALcreate table t1(sum int, price float(24));insert into t1 values(100, 50.00), (100, 100.00);select avgcost(sum, price) from t1;avgcost(sum, price)75.0000delete from t1;insert into t1 values(100, 54.33), (200, 199.99);select avgcost(sum, price) from t1;avgcost(sum, price)151.4367drop table t1;select metaphon('hello');metaphon('hello')HLCREATE PROCEDURE `XXX1`(in testval varchar(10))beginselect metaphon(testval);end//call XXX1('hello');metaphon(testval)HLdrop procedure xxx1;CREATE PROCEDURE `XXX2`()begindeclare testval varchar(10);set testval = 'hello';select metaphon(testval);end//call XXX2();metaphon(testval)HLdrop procedure xxx2;DROP FUNCTION metaphon;DROP FUNCTION myfunc_double;DROP FUNCTION myfunc_nonexist;ERROR 42000: FUNCTION test.myfunc_nonexist does not existDROP FUNCTION myfunc_int;DROP FUNCTION sequence;DROP FUNCTION lookup;DROP FUNCTION reverse_lookup;DROP FUNCTION avgcost;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -