Monday, 19 October 2009

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.

1 comments:
Roland Bouman said...

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).

Post a Comment