November 2019
Beginner to intermediate
470 pages
11h 59m
English
We don't want to turn this into a why MariaDB is bad chapter, but I wanted to add a final example here, which I consider to be of high importance:
MariaDB [test]> UPDATE data SET id = NULL WHERE id = 1;Query OK, 1 row affected, 1 warning (0.01 sec)Rows matched: 1 Changed: 1 Warnings: 1
The id column was explicitly marked as NOT NULL:
MariaDB [test]> SELECT * FROM data; +----+------+ | id | data | +----+------+ | 0 | 9.99 | +----+------+ 1 row in set (0.00 sec)
Obviously, MySQL and MariaDB think that null and zero are the same thing. Let me try to explain the problem here with a simple analogy: if you know your wallet is empty, it isn't the same as not knowing how much you have. As I am writing these lines, I don't know ...
Read now
Unlock full access