rails/rails — pull request #7960 by pwnall (2012-10-16 10:07:15+00:00)
Title: Use the MySQL varbinary type when appropriate in migrations

Currently, the mysql adapters use blob types for all `binary` columns. Blobs require extra care when used as keys in indexes, and have some performance caveats [1].

This change uses `varbinary` for `binary` columns that specify a `limit` <= 255 bytes. The test changes indirectly verify the code, as the `add_index` statement fails if the `tiny_blob` column uses a blob type. I can add a direct test if that is desirable.

Thank you for considering this pull request!

[1] http://dev.mysql.com/doc/refman/5.5/en/blob.html