Home > Uncategorized > MySQL Synonym of the day: LONG is MEDIUMTEXT

MySQL Synonym of the day: LONG is MEDIUMTEXT

October 19th, 2009 Leave a comment Go to comments

To me a LONG would be an integer. MySQL, however, defines it as a synonym for MEDIUMTEXT. So careful porting those projects to or from MySQL!

mysql> CREATE TABLE a (id LONG);mysql> SHOW CREATE TABLE a\G..Create Table: CREATE TABLE `a` (  `id` mediumtext) ENGINE=MyISAM DEFAULT CHARSET=latin1

A bug has been opened for documenting, but it is actually documented here.

Share
Tags:
  1. Roland Bouman
    October 19th, 2009 at 12:40 | #1

    Hi!

    LONG is what was used in Oracle, in the olden days before it had proper blobs/clobs. If i recal correctly, it corresponded to a max. 2GB string (at least in Oracle 7).

  1. No trackbacks yet.