Just to join Ovid in his recent rants...
My co-worker and I have just spent the last forty five minutes with a bug that boils down to this "interesting" behaviour...
create temporary table the_dates (d date not null default '0000-00-00');
insert into the_dates values ('0000-00-00');
So far so normal.... but:
mysql> select count(*) from the_dates where d is null;
+----------+
| count(*) |
+----------+
| 1 |
+----------+
1 row in set (0.00 sec)
mysql> select count(*) from the_dates where d is not null;
+----------+
| count(*) |
+----------+
| 1 |
+----------+
1 row in set (0.00 sec)
.... sigh....
Aargh! (Score:2)
Why, why, why do people insist upon using this piece of crap database? The arguments I get into typically go like this:
Them: "But MySQL is faster."
Ovid: "Do you have benchmarks?"
Them: "No, but MySQL is still faster than other databases."
Ovid: "Have you benchmarked your app with other databases?"
Them: "No, but others swear up and down that it's faster."
Ovid: "So you feel that fast is more important that correct answers?"
Them: "But I already know MySQL."
Ovid: "That's a fair point. The Postg
Re: (Score:1)
Re: (Score:1)
"I fear change. I shall keep my bushes."
Re: (Score:2)
I chose PostgreSQL for my own project, and I haven't regretted it one bit. Plus, you can claim it's "enterprise software" to keep the PHB's happy now that it ships with Solaris 10 by default. I think you can even get a service contract with Sun for it if you want (but I'd have to double check).
Re: (Score:1)
1. PHP
2. Having a company pushing it
3. A few years there where Pg wasn't moving much
4. Much easier to manage accounts, just connect remotely as root and start creating accounts.
Re: (Score:1)
All databases suck, but in different ways. MySQL, however, seems special.
Re: (Score:1)
Once, I switched an entire 28-node MySQL cluster to a single PostgreSQL instance by making clever use of table inheritance and a one-liner PL/Pgsql script written in Python 3000! PG RULEZ!!
Let's call it... (Score:1)
...the Heisendate. I can't remember how many times I was bitten by this kind of MySQL's DWSGSWM (Do What Some Guy SomeWhen Meant).
Ordinary morality is for ordinary people. -- Aleister Crowley
one problem I do not need to worry about (Score:1)
Re: (Score:2)
Re: (Score:1)
'0000-00-00' is a valid "zero value" date in MySQL - see the docs [mysql.com] for the evil details.
Needless to say - not my schema.
Re: (Score:1)
We had some generic SQL that applied to several tables in similar ways.
... and goddamn it - it's just wrong to say a table is null and not null at the same time :-)
Re: (Score:1)
http://sql-info.de/mysql/gotchas.html [sql-info.de] properly at some stage.
At least this feature is documented in the mysql
docs (but who ever reads the docs)
"For DATE and DATETIME columns that are declared as NOT NULL, you can find the special date '0000-00-00' by using a statement like this:
SELECT * FROM tbl_name WHERE date_column IS NULL
This is needed to get some ODBC applications to work because ODBC does not support a '0000-00-00' date value."
But Mysql IS faster... (Score:2)
Thus... what is Mysql good for? Mainly for "change once, read many many times" databases, IMO. Such as underlying CMS systems on websites.
Re: (Score:1)
Problem with "[Mysql is good for] ... CMS systems on websites" argurment is whoever uses MySQL would (try to) push|use|propogate elsewhere for any other db related work.
(A rant.) Even more amazing thing is even when one knows that version 4.x is horrible (compared to 5.1, which is actually available), there would be no motivation to upgrade for applications might break. Version 4.x would keep on laughing & living due to installation of new applications (which would be deined the chance of using a bet
- parv