Details
Description
I don't know if this is really a bug, but this behavior is different from the one we rely on, with this SQL_MODE:
MariaDB [test]> SELECT @@session.SQL_MODE; +-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | @@session.SQL_MODE | +-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +-------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) MariaDB [test]> CREATE TABLE t (c INT NULL DEFAULT 0) ENGINE=CONNECT TABLE_TYPE=DOS FILE_NAME='t.dos'; Query OK, 0 rows affected (0.09 sec) MariaDB [test]> INSERT INTO t VALUES (0), (DEFAULT); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 MariaDB [test]> SELECT * FROM t; +------+ | c | +------+ | NULL | | NULL | +------+ 2 rows in set (0.00 sec)
Both the DEFAULT 0 clause and the explicit 0 INSERT specify a value that is not supported for this data format. The strict mode is meant to prevent silent data changes. But even without strict mode, maybe a warnings is expected?
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Indeed CONNECT handles NULL's in a specific way.
See the CONNECT documentation "NULL handling" chapter page 10.
Note: I am not sure this was added to the online documentation. You can contact me at:
bertrandop@gmail.com
to get the latest documentation in doc or pdf format.