summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/sp.result')
-rw-r--r--mysql-test/r/sp.result35
1 files changed, 30 insertions, 5 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index ca6a3b495aa..0aa56291690 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -4440,7 +4440,7 @@ create table t3 (id int not null primary key, county varchar(25))|
insert into t3 (id, county) values (1, 'York')|
create procedure bug15441(c varchar(25))
begin
-update t3 set id=2, county=values(c);
+update t3 set id=2, county=value(c);
end|
call bug15441('county')|
ERROR 42S22: Unknown column 'c' in 'field list'
@@ -4451,7 +4451,7 @@ declare c varchar(25) default "hello";
insert into t3 (id, county) values (1, county)
on duplicate key update county= values(county);
select * from t3;
-update t3 set id=2, county=values(id);
+update t3 set id=2, county=value(id);
select * from t3;
end|
call bug15441('Yale')|
@@ -4810,8 +4810,8 @@ select routine_name,routine_schema from information_schema.routines where
routine_schema like 'bug18344%'|
routine_name routine_schema
bug18344 bug18344_012345678901
-bug18344_2 bug18344_012345678901
bug18344 bug18344_0123456789012
+bug18344_2 bug18344_012345678901
bug18344_2 bug18344_0123456789012
drop database bug18344_012345678901|
drop database bug18344_0123456789012|
@@ -5324,7 +5324,7 @@ DROP PROCEDURE bug21414|
set names utf8|
drop database if exists това_е_дълго_име_за_база_данни_нали|
create database това_е_дълго_име_за_база_данни_нали|
-INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','', 'utf8', 'utf8_general_ci', 'utf8_general_ci', 'n/a')|
+INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','', 'utf8', 'utf8_general_ci', 'utf8_general_ci', 'n/a', 'NONE')|
call това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго()|
ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
drop database това_е_дълго_име_за_база_данни_нали|
@@ -5742,7 +5742,7 @@ SELECT @@max_sp_recursion_depth|
CALL bug23760_test_row_count2(2)|
SELECT ROW_COUNT()|
ROW_COUNT()
-1
+16
SELECT * FROM bug23760_log ORDER BY id|
id reason ammount
1 Test is working 7
@@ -8538,3 +8538,28 @@ DROP FUNCTION f1;
DROP FUNCTION f2;
DROP FUNCTION f3;
DROP TABLE t1;
+# Test affected rows from an sp
+create table t1 (a int);
+create procedure p1()
+begin
+insert into t1 values(1);
+insert into t1 values(2);
+end;
+$$
+create procedure p2()
+begin
+insert into t1 values(1);
+call p1();
+select row_count();
+insert into t1 values(2);
+insert into t1 values(2);
+end;
+$$
+CALL p2();
+row_count()
+2
+affected rows: 1
+affected rows: 5
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+drop table t1;