MariaDB [vuln]> select @@SQL_MODE, @@GLOBAL.SQL_MODE;
|
+-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+
|
| @@SQL_MODE | @@GLOBAL.SQL_MODE |
|
+-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+
|
| STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
|
+-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+
|
1 row in set (0.000 sec)
|
|
MariaDB [vuln]> create table tbl1 (id varchar(20));
|
Query OK, 0 rows affected (0.005 sec)
|
|
MariaDB [vuln]> insert into tbl1 values ('abc');
|
Query OK, 1 row affected (0.001 sec)
|
|
MariaDB [vuln]> update tbl1 set id='x' where id=0;
|
ERROR 1292 (22007): Truncated incorrect DECIMAL value: 'abc'
|
|
MariaDB [vuln]> delete from tbl1 where id=0;
|
Query OK, 1 row affected, 1 warning (0.001 sec)
|
|
MariaDB [vuln]> show warnings;
|
+---------+------+------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+------------------------------------------+
|
| Warning | 1292 | Truncated incorrect DECIMAL value: 'abc' |
|
+---------+------+------------------------------------------+
|
1 row in set (0.000 sec)
|
|
MariaDB [vuln]> select * from tbl1;
|
Empty set (0.000 sec)
|
|
MariaDB [vuln]> select version();
|
+-----------------------------------------+
|
| version() |
|
+-----------------------------------------+
|
| 10.11.2-MariaDB-1:10.11.2+maria~ubu2204 |
|
+-----------------------------------------+
|
1 row in set (0.000 sec)
|