sp-error.result
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· RESULT 代码 · 共 1,455 行 · 第 1/3 页
RESULT
1,455 行
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN drop user 'mysqltest_1'; END |ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.CREATE FUNCTION bug_13627_f() returns int BEGIN drop user 'mysqltest_1'; return 1; END |ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN rename user 'mysqltest_2' to 'mysqltest_1'; END |ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.CREATE FUNCTION bug_13627_f() returns int BEGIN rename user 'mysqltest_2' to 'mysqltest_1'; return 1; END |ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN create view v1 as select 1; END |ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.CREATE FUNCTION bug_13627_f() returns int BEGIN create view v1 as select 1; return 1; END |ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN alter view v1 as select 1; END |ERROR 0A000: ALTER VIEW is not allowed in stored proceduresCREATE FUNCTION bug_13627_f() returns int BEGIN alter view v1 as select 1; return 1; END |ERROR 0A000: ALTER VIEW is not allowed in stored proceduresCREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN drop view v1; END |ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.CREATE FUNCTION bug_13627_f() returns int BEGIN drop view v1; return 1; END |ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN create trigger tr2 before insert on t1 for each row do select 1; END |ERROR 2F003: Can't create a TRIGGER from within another stored routineCREATE FUNCTION bug_13627_f() returns int BEGIN create trigger tr2 before insert on t1 for each row do select 1; return 1; END |ERROR 2F003: Can't create a TRIGGER from within another stored routineCREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN drop function bug_13627_f; END |ERROR HY000: Can't drop or alter a FUNCTION from within another stored routineCREATE FUNCTION bug_13627_f() returns int BEGIN drop function bug_13627_f; return 1; END |ERROR HY000: Can't drop or alter a FUNCTION from within another stored routineCREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN create function f2 () returns int return 1; END |ERROR 2F003: Can't create a FUNCTION from within another stored routineCREATE FUNCTION bug_13627_f() returns int BEGIN create function f2 () returns int return 1; return 1; END |ERROR 2F003: Can't create a FUNCTION from within another stored routineCREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROWBEGINCREATE TEMPORARY TABLE t2 (a int);DROP TEMPORARY TABLE t2;END |CREATE FUNCTION bug_13627_f() returns intBEGINCREATE TEMPORARY TABLE t2 (a int);DROP TEMPORARY TABLE t2;return 1;END |drop table t1|drop function bug_13627_f|drop function if exists bug12329;Warnings:Note 1305 FUNCTION bug12329 does not existcreate table t1 as select 1 a;create table t2 as select 1 a;create function bug12329() returns int return (select a from t1);prepare stmt1 from 'select bug12329()';execute stmt1;bug12329()1drop function bug12329;create function bug12329() returns int return (select a+100 from t2);select bug12329();bug12329()101execute stmt1;ERROR 42S02: Table 'test.t2' doesn't existdeallocate prepare stmt1;drop function bug12329;drop table t1, t2;create database mysqltest1;use mysqltest1;drop database mysqltest1;create function f1() returns int return 1;ERROR 3D000: No database selectedcreate procedure p1(out param1 int)beginselect count(*) into param1 from t3;end|ERROR 3D000: No database selecteduse test;DROP PROCEDURE IF EXISTS bug13037_p1;DROP PROCEDURE IF EXISTS bug13037_p2;DROP PROCEDURE IF EXISTS bug13037_p3;CREATE PROCEDURE bug13037_p1()BEGINIF bug13037_foo THENSELECT 1;END IF;END|CREATE PROCEDURE bug13037_p2()BEGINSET @bug13037_foo = bug13037_bar;END|CREATE PROCEDURE bug13037_p3()BEGINSELECT bug13037_foo;END|CALL bug13037_p1();ERROR 42S22: Unknown column 'bug13037_foo' in 'field list'CALL bug13037_p2();ERROR 42S22: Unknown column 'bug13037_bar' in 'field list'CALL bug13037_p3();ERROR 42S22: Unknown column 'bug13037_foo' in 'field list'CALL bug13037_p1();ERROR 42S22: Unknown column 'bug13037_foo' in 'field list'CALL bug13037_p2();ERROR 42S22: Unknown column 'bug13037_bar' in 'field list'CALL bug13037_p3();ERROR 42S22: Unknown column 'bug13037_foo' in 'field list'DROP PROCEDURE bug13037_p1;DROP PROCEDURE bug13037_p2;DROP PROCEDURE bug13037_p3;create database mysqltest1;create database mysqltest2;use mysqltest1;drop database mysqltest1;create procedure mysqltest2.p1() select version();create procedure p2() select version();ERROR 3D000: No database selecteduse mysqltest2;show procedure status;Db Name Type Definer Modified Created Security_type Commentmysqltest2 p1 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER drop database mysqltest2;use test;DROP FUNCTION IF EXISTS bug13012|CREATE FUNCTION bug13012() RETURNS INTBEGINREPAIR TABLE t1;RETURN 1;END|ERROR 0A000: Not allowed to return a result set from a functionCREATE FUNCTION bug13012() RETURNS INTBEGINBACKUP TABLE t1 TO '/tmp';RETURN 1;END|ERROR 0A000: Not allowed to return a result set from a functionCREATE FUNCTION bug13012() RETURNS INTBEGINRESTORE TABLE t1 FROM '/tmp';RETURN 1;END|ERROR 0A000: Not allowed to return a result set from a functioncreate table t1 (a int)|CREATE PROCEDURE bug13012_1() REPAIR TABLE t1|CREATE FUNCTION bug13012_2() RETURNS INTBEGINCALL bug13012_1();RETURN 1;END|SELECT bug13012_2()|ERROR 0A000: Not allowed to return a result set from a functiondrop table t1|drop procedure bug13012_1|drop function bug13012_2|drop function if exists bug11555_1;drop function if exists bug11555_2;drop view if exists v1, v2, v3, v4;create function bug11555_1() returns int return (select max(i) from t1);create function bug11555_2() returns int return bug11555_1();create view v1 as select bug11555_1();drop view v1;create view v2 as select bug11555_2();drop view v2;create table t1 (i int);create view v1 as select bug11555_1();create view v2 as select bug11555_2();create view v3 as select * from v1;drop table t1;select * from v1;ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use themselect * from v2;ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use themselect * from v3;ERROR HY000: View 'test.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use themcreate view v4 as select * from v1;drop view v1, v2, v3, v4;drop function bug11555_1;drop function bug11555_2;create table t1 (i int);create table t2 (i int);create trigger t1_ai after insert on t1 for each row insert into t2 values (new.i);create view v1 as select * from t1;drop table t2;insert into v1 values (1);ERROR 42S02: Table 'test.t2' doesn't existdrop trigger t1_ai;create function bug11555_1() returns int return (select max(i) from t2);create trigger t1_ai after insert on t1 for each row set @a:=bug11555_1();insert into v1 values (2);ERROR 42S02: Table 'test.t2' doesn't existdrop function bug11555_1;drop table t1;drop view v1;drop procedure if exists ` bug15658`;create procedure ``() select 1;ERROR 42000: Incorrect routine name ''create procedure ` `() select 1;ERROR 42000: Incorrect routine name ' 'create procedure `bug15658 `() select 1;ERROR 42000: Incorrect routine name 'bug15658 'create procedure ``.bug15658() select 1;ERROR 42000: Incorrect database name ''create procedure `x `.bug15658() select 1;ERROR 42000: Incorrect database name 'x 'create procedure ` bug15658`() select 1;call ` bug15658`();11show procedure status;Db Name Type Definer Modified Created Security_type Commenttest bug15658 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER drop procedure ` bug15658`;drop function if exists bug14270;drop table if exists t1;create table t1 (s1 int primary key);create function bug14270() returns intbeginload index into cache t1;return 1;end|ERROR 0A000: Not allowed to return a result set from a functioncreate function bug14270() returns intbegincache index t1 key (`primary`) in keycache1;return 1;end|ERROR 0A000: Not allowed to return a result set from a functiondrop table t1;drop procedure if exists bug15091;create procedure bug15091()begindeclare selectstr varchar(6000) default ' ';declare conditionstr varchar(5000) default '';set selectstr = concat(selectstr,' and ',c.operatorid,'in (',conditionstr, ')');end|call bug15091();ERROR 42S02: Unknown table 'c' in field listdrop procedure bug15091;drop function if exists bug16896;create aggregate function bug16896() returns int return 1;ERROR 42000: AGGREGATE is not supported for stored functionsDROP PROCEDURE IF EXISTS bug14702;CREATE IF NOT EXISTS PROCEDURE bug14702()BEGINEND;ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS PROCEDURE bug14702()BEGINEND' at line 1CREATE PROCEDURE IF NOT EXISTS bug14702()BEGINEND;ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS bug14702()BEGINEND' at line 1DROP TABLE IF EXISTS t1;CREATE TABLE t1 (i INT);CREATE PROCEDURE bug20953() CREATE VIEW v AS SELECT 1 INTO @a;ERROR HY000: View's SELECT contains a 'INTO' clauseCREATE PROCEDURE bug20953() CREATE VIEW v AS SELECT 1 INTO DUMPFILE "file";ERROR HY000: View's SELECT contains a 'INTO' clauseCREATE PROCEDURE bug20953() CREATE VIEW v AS SELECT 1 INTO OUTFILE "file";ERROR HY000: View's SELECT contains a 'INTO' clauseCREATE PROCEDURE bug20953()CREATE VIEW v AS SELECT i FROM t1 PROCEDURE ANALYSE();ERROR HY000: View's SELECT contains a 'PROCEDURE' clauseCREATE PROCEDURE bug20953() CREATE VIEW v AS SELECT 1 FROM (SELECT 1) AS d1;ERROR HY000: View's SELECT contains a subquery in the FROM clauseCREATE PROCEDURE bug20953(i INT) CREATE VIEW v AS SELECT i;ERROR HY000: View's SELECT contains a variable or parameterCREATE PROCEDURE bug20953()BEGINDECLARE i INT;CREATE VIEW v AS SELECT i;END |ERROR HY000: View's SELECT contains a variable or parameterPREPARE stmt FROM "CREATE VIEW v AS SELECT ?";ERROR HY000: View's SELECT contains a variable or parameterDROP TABLE t1;drop tables if exists t1;drop procedure if exists bug24491;create table t1 (id int primary key auto_increment, value varchar(10));insert into t1 (id, value) values (1, 'FIRST'), (2, 'SECOND'), (3, 'THIRD');create procedure bug24491()insert into t1 (id, value) select * from (select 4 as i, 'FOURTH' as v) as y on duplicate key update v = 'DUP';call bug24491();ERROR 42S22: Unknown column 'v' in 'field list'call bug24491();ERROR 42S22: Unknown column 'v' in 'field list'drop procedure bug24491;create procedure bug24491()insert into t1 (id, value) select * from (select 4 as id, 'FOURTH' as value) as y on duplicate key update y.value = 'DUP';call bug24491();ERROR 42S22: Unknown column 'y.value' in 'field list'call bug24491();ERROR 42S22: Unknown column 'y.value' in 'field list'drop procedure bug24491;drop tables t1;DROP FUNCTION IF EXISTS bug18914_f1;DROP FUNCTION IF EXISTS bug18914_f2;DROP PROCEDURE IF EXISTS bug18914_p1;DROP PROCEDURE IF EXISTS bug18914_p2;DROP TABLE IF EXISTS t1, t2;CREATE TABLE t1 (i INT);CREATE PROCEDURE bug18914_p1() CREATE TABLE t2 (i INT);CREATE PROCEDURE bug18914_p2() DROP TABLE IF EXISTS no_such_table;CREATE FUNCTION bug18914_f1() RETURNS INTBEGINCALL bug18914_p1();RETURN 1;END |CREATE FUNCTION bug18914_f2() RETURNS INTBEGINCALL bug18914_p2();RETURN 1;END |CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROWCALL bug18914_p1();INSERT INTO t1 VALUES (1);ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.SELECT bug18914_f1();ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.SELECT bug18914_f2();ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.SELECT * FROM t2;ERROR 42S02: Table 'test.t2' doesn't existDROP FUNCTION bug18914_f1;DROP FUNCTION bug18914_f2;DROP PROCEDURE bug18914_p1;DROP PROCEDURE bug18914_p2;DROP TABLE t1;drop table if exists bogus_table_20713;drop function if exists func_20713_a;drop function if exists func_20713_b;create table bogus_table_20713( id int(10) not null primary key);insert into bogus_table_20713 values (1), (2), (3);create function func_20713_a() returns int(11)begindeclare id int;declare continue handler for sqlexception set id=null;set @in_func := 1;set id = (select id from bogus_table_20713 where id = 3);set @in_func := 2;return id;end//create function func_20713_b() returns int(11)begindeclare id int;declare continue handler for sqlstate value '42S02' set id=null;set @in_func := 1;set id = (select id from bogus_table_20713 where id = 3);set @in_func := 2;return id;end//set @in_func := 0;select func_20713_a();func_20713_a()NULLselect @in_func;@in_func2set @in_func := 0;select func_20713_b();func_20713_b()NULLselect @in_func;@in_func2drop table bogus_table_20713;set @in_func := 0;select func_20713_a();func_20713_a()NULLselect @in_func;@in_func2set @in_func := 0;select func_20713_b();func_20713_b()NULLselect @in_func;@in_func2drop function if exists func_20713_a;drop function if exists func_20713_b;drop table if exists table_25345_a;drop table if exists table_25345_b;drop procedure if exists proc_25345;drop function if exists func_25345;drop function if exists func_25345_b;create table table_25345_a (a int);create table table_25345_b (b int);create procedure proc_25345()begindeclare c1 cursor for select a from table_25345_a;declare c2 cursor for select b from table_25345_b;select 1 as result;end ||create function func_25345() returns int(11)begincall proc_25345();return 1;end ||create function func_25345_b() returns int(11)begindeclare c1 cursor for select a from table_25345_a;declare c2 cursor for select b from table_25345_b;return 1;end ||call proc_25345();result1select func_25345();ERROR 0A000: Not allowed to return a result set from a functionselect func_25345_b();func_25345_b()1drop table table_25345_a;call proc_25345();result1select func_25345();ERROR 0A000: Not allowed to return a result set from a functionselect func_25345_b();func_25345_b()1drop table table_25345_b;drop procedure proc_25345;drop function func_25345;drop function func_25345_b;create procedure proc_26503_error_1()beginretry:repeatbegindeclare continue handler for sqlexceptionbeginiterate retry;endselect "do something";enduntil true end repeat retry;end//ERROR 42000: ITERATE with no matching label: retrycreate procedure proc_26503_error_2()beginretry:repeatbegindeclare continue handler for sqlexceptioniterate retry;select "do something";enduntil true end repeat retry;end//ERROR 42000: ITERATE with no matching label: retrycreate procedure proc_26503_error_3()beginretry:repeatbegindeclare continue handler for sqlexceptionbeginleave retry;endselect "do something";enduntil true end repeat retry;end//ERROR 42000: LEAVE with no matching label: retrycreate procedure proc_26503_error_4()beginretry:repeatbegindeclare continue handler for sqlexceptionleave retry;select "do something";enduntil true end repeat retry;end//ERROR 42000: LEAVE with no matching label: retry
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?