[MDEV-20828] Procedure call not modifying data is affected by strict SQL mode Created: 2019-10-14  Updated: 2019-10-14

Status: Open
Project: MariaDB Server
Component/s: Server
Affects Version/s: 5.5, 10.1, 10.2, 10.3, 10.4
Fix Version/s: 10.5

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None


 Description   

create procedure pr(a int) select a;
set sql_mode='';
call pr('foo');
set sql_mode='STRICT_ALL_TABLES';
call pr('foo');
drop procedure pr;

10.5 fa843790

MariaDB [test]> set sql_mode='';
Query OK, 0 rows affected (0.000 sec)
 
MariaDB [test]> call pr('foo');
+------+
| a    |
+------+
|    0 |
+------+
1 row in set (0.000 sec)
 
Query OK, 0 rows affected, 1 warning (0.000 sec)
 
MariaDB [test]> set sql_mode='STRICT_ALL_TABLES';
Query OK, 0 rows affected (0.000 sec)
 
MariaDB [test]> call pr('foo');
ERROR 1366 (22007): Incorrect integer value: 'foo' for column ``.``.`a` at row 1

Note: if it's indeed a bug, feel free to adjust the fix version as you deem fit.



 Comments   
Comment by Sergei Golubchik [ 2019-10-14 ]

I would think that SP variables are not "tables", so they should not be affected by STRICT_ALL_TABLES. When we'll have a generic strict mode — then yes.

Generated at Thu Feb 08 09:02:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.