Mysql...

Posted by David N. Welton Fri, 17 Mar 2006 01:39:00 GMT
mysql> create table foo (bar int);
Query OK, 0 rows affected (0.00 sec)

mysql> insert into foo values ('');
Query OK, 1 row affected (0.00 sec)

Uh... it is not ok!

Lucky I caught that one, as an administrative interface was setting a value to 0 that should have just been NULL, meaning that instead of using a default value for a minimum threshold, it would have used 0, thus setting up a chain of events with unpleasant consequences.

2 comments |

Trackbacks

Use the following link to trackback from your own site:
http://journal.dedasys.com/trackbacks?article_id=114

  1. Ben Hutchings
    about {{count}} hours later:
    Friends don't let friends use MySQL. There's more information on the differences between MySQL and real SQL at http://sql-info.de/mysql/gotchas.html
  2. Dave Welton
    about {{count}} hours later:
    I use Postgresql myself whenever possible. This is an installation that I can't switch over, though.