Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Yeah, I've already seen the annoying bit about inline FK references being parsed and discarded. Further, I was pretty sure it was silently discarded, so I ran your query:

    CREATE TABLE products (
        id          INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
        vendor_id   INT UNSIGNED REFERENCES vendors (id),
        name        VARCHAR(255),
        UNIQUE      ( name ),
        INDEX       ( vendor_id )
    ) TYPE = InnoDB;
    Query OK, 0 rows affected, 1 warning (0.01 sec)

    mysql> show warnings;
    +---------+------+--------------------------------------------------- -----------------------+
    | Level   | Code | Message                                                                   |
    +---------+------+---------------------------------------------------------- ----------------+
    | Warning | 1287 | 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead  |
    +---------+------+----------------------------------------------------------- ---------------+
    1 row in set (0.00 sec)

    Grr ...

    Drop the table, s/TYPE/ENGINE/, rerun create statement. No warnings.

    MySQL sucks. I need to just get that printed on a damned t-shirt and wear it everywhere.

    • Maybe it can be a can of tuna with a dolphin on it and the label says "MySQL Sucks!".

      I have seen enough just on these blogs that I would have to agree.
    • Does the incorrect syntax generate an error if you run MySQL in strict mode?
      • Our version of MySQL is old enough that strict mode is not available. I guess that makes my post a wee bit unfair :)

        • Quoth Aaron Crane on hates-software:

          Ah, yes, the “version N+1” problem: everything you think you might want out of MySQL is supported (somehow, even if brokenly and hatefully) in the version after the one that’s available on your production servers. (Actually, sometimes MySQL makes it version N+k, to give you some light relief.) I believe the “version N+1” phrasing is due to Smylers (the original poster in this thread), circa 2000. It’s still true. Seven years later. St