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
e726bbb3
Commit
e726bbb3
authored
Apr 05, 2005
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
parents
a226b4af
1be0a0c8
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
66 deletions
+105
-66
client/mysqldump.c
client/mysqldump.c
+60
-55
mysql-test/r/strict.result
mysql-test/r/strict.result
+12
-0
mysql-test/t/strict.test
mysql-test/t/strict.test
+15
-0
sql/sql_base.cc
sql/sql_base.cc
+2
-2
sql/sql_error.cc
sql/sql_error.cc
+16
-9
No files found.
client/mysqldump.c
View file @
e726bbb3
This diff is collapsed.
Click to expand it.
mysql-test/r/strict.result
View file @
e726bbb3
...
...
@@ -1173,4 +1173,16 @@ col1
0000-00-00 00:00:00
NULL
drop table t1;
create table t1 (col1 tinyint);
drop procedure if exists t1;
Warnings:
Note 1305 PROCEDURE t1 does not exist
create procedure t1 () begin declare exit handler for sqlexception
select'a'; insert into t1 values (200); end;|
call t1();
ERROR 22003: Out of range value adjusted for column 'col1' at row 1
select * from t1;
col1
drop procedure t1;
drop table t1;
set sql_mode=@org_mode;
mysql-test/t/strict.test
View file @
e726bbb3
...
...
@@ -1031,6 +1031,21 @@ insert into t1 select * from t1;
select
*
from
t1
;
drop
table
t1
;
#
# Test of inserting an invalid value via a stored procedure (Bug #5907)
#
create
table
t1
(
col1
tinyint
);
drop
procedure
if
exists
t1
;
delimiter
|
;
create
procedure
t1
()
begin
declare
exit
handler
for
sqlexception
select
'a'
;
insert
into
t1
values
(
200
);
end
;
|
delimiter
;
|
--
error
1264
call
t1
();
select
*
from
t1
;
drop
procedure
t1
;
drop
table
t1
;
#
# Restore mode
#
...
...
sql/sql_base.cc
View file @
e726bbb3
...
...
@@ -692,11 +692,11 @@ TABLE_LIST *find_table_in_list(TABLE_LIST *table,
/*
Test that table is unique
Test that table is unique
(It's only exists once in the table list)
SYNOPSIS
unique_table()
table table which should be ch
a
ked
table table which should be ch
ec
ked
table_list list of tables
NOTE: to exclude derived tables from check we use following mechanism:
...
...
sql/sql_error.cc
View file @
e726bbb3
...
...
@@ -116,15 +116,6 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
if
(
thd
->
query_id
!=
thd
->
warn_id
)
mysql_reset_errors
(
thd
,
0
);
thd
->
got_warning
=
1
;
if
(
thd
->
spcont
&&
thd
->
spcont
->
find_handler
(
code
,
((
int
)
level
>=
(
int
)
MYSQL_ERROR
::
WARN_LEVEL_WARN
&&
thd
->
really_abort_on_warning
())
?
MYSQL_ERROR
::
WARN_LEVEL_ERROR
:
level
))
{
DBUG_RETURN
(
NULL
);
}
/* Abort if we are using strict mode and we are not using IGNORE */
if
((
int
)
level
>=
(
int
)
MYSQL_ERROR
::
WARN_LEVEL_WARN
&&
...
...
@@ -132,14 +123,30 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
{
/* Avoid my_message() calling push_warning */
bool
no_warnings_for_error
=
thd
->
no_warnings_for_error
;
sp_rcontext
*
spcont
=
thd
->
spcont
;
thd
->
no_warnings_for_error
=
1
;
thd
->
spcont
=
0
;
thd
->
killed
=
THD
::
KILL_BAD_DATA
;
my_message
(
code
,
msg
,
MYF
(
0
));
thd
->
spcont
=
spcont
;
thd
->
no_warnings_for_error
=
no_warnings_for_error
;
/* Store error in error list (as my_message() didn't do it in this case */
level
=
MYSQL_ERROR
::
WARN_LEVEL_ERROR
;
}
if
(
thd
->
spcont
&&
thd
->
spcont
->
find_handler
(
code
,
((
int
)
level
>=
(
int
)
MYSQL_ERROR
::
WARN_LEVEL_WARN
&&
thd
->
really_abort_on_warning
())
?
MYSQL_ERROR
::
WARN_LEVEL_ERROR
:
level
))
{
DBUG_RETURN
(
NULL
);
}
if
(
thd
->
warn_list
.
elements
<
thd
->
variables
.
max_error_count
)
{
/*
...
...
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