* Aaron Crane <hate...@aaroncrane.co.uk> [2007-03-20 15:15]:
> I'm prepared to believe that this is merely a bug in our
> particular point-release of the server, rather than a
> fundamental design flaw, but that doesn't stop it being
> incredibly hateful: if I'm looking for something equal to an
> exemplar, then, no, something vaguely similar is _not_
> sufficient.

How about where you put a constraint on a column, say it's an
INTEGER and you say it must contain only values from 0 to 99, and
when you try to insert a row which has 200 as the value for that
column, MySQL helpfully truncates the value to 99 and then
proceeds to insert the row?

Now granted, v5 has finally added a strict mode or whatever it's
called, where this kind of constraint violation throws an error
instead of silently mangling your data. But IT TOOK THEM FIVE
VERSIONS to put that in, AND THEN IT'S STILL NOT THE DEFAULT.

Then there's the mindboggling idiocy where NULLs and empty
strings are often considered equivalent. I think they've improved
on that as well, but good grief, this shouldn't be broken to
begin with!

Or here, another case that was recently posted on use.Perl:

    mysql> CREATE TEMPORARY TABLE the_dates (d DATE NOT NULL DEFAULT 
'0000-00-00');
    mysql> INSERT INTO the_dates VALUES ('0000-00-00');
    mysql> SELECT COUNT(*) FROM the_dates WHERE d IS NOT NULL;
    +----------+
    | count(*) |
    +----------+
    |        1 |
    +----------+
    1 row in set (0.00 sec)

Fine so far? OK, here comes the punchline:

    mysql> SELECT COUNT(*) FROM the_dates WHERE d IS NULL;
    +----------+
    | count(*) |
    +----------+
    |        1 |
    +----------+
    1 row in set (0.00 sec)

*boggle* HOW does anyone conceive of THAT sort of braindamage?

I assume your horror story is rooted in the "everything's more or
less the same" kind of attitude; just a different symptom of the
same underlying problem.

You'll find loads of horror stories like that if you dig in even
a little. I used to just hate MySQL for being limited and crappy.
Since digging in I've also lost all faith that I can entrust my
data to its care. I have a few projects running on MySQL because
I didn't have the clout to insist against it, but they're now all
being moved to Pg post haste.

This stuff is... not even wrong. I mean, I'm starting to have
trouble even *hating* MySQL anymore. It's like a retard kid that
you just can't help kinda pitying.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Reply via email to