brianmario/mysql2 — pull request #283 by pixeltrix (2012-08-04 06:13:24+00:00)
Title: Backport of fix from rails/rails#5173

Rather than use the MySQL specific TINYTEXT, MEDIUMTEXT and LONGTEXT
datatypes, Active Record migrations use TEXT(n) where n is the limit
specified by the developer. Unfortunately how MySQL interprets n
depends on the column's encoding so any limit above 5592405 will be
interpreted as a LONGTEXT.

This commit fixes this by interpreting the limit within the adapter
and using the specific MySQL datatype as appropriate.