Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c4d22fda
Commit
c4d22fda
authored
Nov 21, 2009
by
Konstantin Osipov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport the test case for Bug#31881 "A statement is not aborted immediately if an error
inside a stored routine" from 6.0-codebase.
parent
7c3855f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
0 deletions
+70
-0
mysql-test/r/errors.result
mysql-test/r/errors.result
+36
-0
mysql-test/t/errors.test
mysql-test/t/errors.test
+34
-0
No files found.
mysql-test/r/errors.result
View file @
c4d22fda
...
...
@@ -55,6 +55,42 @@ Error 1054 Unknown column 'b' in 'field list'
INSERT INTO t1 SELECT b FROM t1;
ERROR 42S22: Unknown column 'b' in 'field list'
DROP TABLE t1;
flush status;
drop table if exists t1, t2;
create table t1 (a int unique);
create table t2 (a int);
drop function if exists f1;
Warnings:
Note 1305 FUNCTION f1 does not exist
drop function if exists f2;
Warnings:
Note 1305 FUNCTION f2 does not exist
create function f1() returns int
begin
insert into t1 (a) values (1);
insert into t1 (a) values (1);
return 1;
end|
create function f2() returns int
begin
insert into t2 (a) values (1);
return 2;
end|
flush status;
select f1(), f2();
ERROR 23000: Duplicate entry '1' for key 'a'
show status like 'Com_insert';
Variable_name Value
Com_insert 2
select * from t1;
a
1
select * from t2;
a
drop table t1;
drop table t2;
drop function f1;
drop function f2;
SET NAMES utf8;
SET sql_quote_show_create= _binary x'5452C39C45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR\xC3\x9CE'
...
...
mysql-test/t/errors.test
View file @
c4d22fda
...
...
@@ -68,6 +68,40 @@ INSERT INTO t1 SELECT b FROM t1;
DROP
TABLE
t1
;
# End of 5.0 tests
flush
status
;
--
disable_warnings
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
create
table
t1
(
a
int
unique
);
create
table
t2
(
a
int
);
drop
function
if
exists
f1
;
drop
function
if
exists
f2
;
delimiter
|
;
create
function
f1
()
returns
int
begin
insert
into
t1
(
a
)
values
(
1
);
insert
into
t1
(
a
)
values
(
1
);
return
1
;
end
|
create
function
f2
()
returns
int
begin
insert
into
t2
(
a
)
values
(
1
);
return
2
;
end
|
delimiter
;
|
flush
status
;
--
error
1062
select
f1
(),
f2
();
show
status
like
'Com_insert'
;
select
*
from
t1
;
select
*
from
t2
;
drop
table
t1
;
drop
table
t2
;
drop
function
f1
;
drop
function
f2
;
#
# testing the value encoding in the error messages of set_var
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment