mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Now one gets an error if one tries to insert an invalid value via a stored procedure in STRICT mode. (Bug #5907)
client/mysqldump.c: Changed some function and variable names to MySQL syntax Fixed indentation for last few pushes (No logic changes) mysql-test/r/strict.result: Test for bug #5907 (Traditional mode: invalid value can be inserted via a stored procedure) mysql-test/t/strict.test: Test for bug #5907 (Traditional mode: invalid value can be inserted via a stored procedure) sql/sql_base.cc: More comments sql/sql_error.cc: Ensure that PS gives error for invalid values in 'strict' mode
This commit is contained in:
@ -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;
|
||||
|
@ -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
|
||||
#
|
||||
|
Reference in New Issue
Block a user