On Sat, Jun 28, 2008 at 4:48 PM, Alex Durgin
<[EMAIL PROTECTED]> wrote:
> Nick,
>
> I couldn't figure out why my tables were being created with a default
> collation of utf8_bin.  But with some digging I found out that the
> activerecord-jdbc-adapter differs from the default Rails behavior for the
> mysql adapter.
>
> jdbc:
>
> def create_table(name, options = {}) #:nodoc:
>    super(name, {:options => "ENGINE=InnoDB CHARACTER SET utf8 COLLATE
> utf8_bin"}.merge(options))
> end
>
> Rails native:
>
> def create_table(table_name, options = {}) #:nodoc:
>    super(table_name, options.reverse_merge(:options => "ENGINE=InnoDB"))
> end
>
> Would you entertain changing this to match the native Rails behavior?

Sorry to hear that this difference bit you. I'd change it in a second
but if possible I'd like to understand why it was written the way it
is today, if it wasn't just copied from an earlier version of Rails.

In AR-JDBC's history there is this commit:

Author: olabini <[EMAIL PROTECTED]>
Date:   Tue Oct 16 08:02:27 2007 +0000

    Fix for 14601 - make MySQL multibyte handling more correct.

    git-svn-id:
svn+ssh://rubyforge.org/var/svn/jruby-extras/trunk/[EMAIL PROTECTED]
8ba958d5-0c1a-0410-94a6-a65dfc1b28a6

See also 
http://rubyforge.org/tracker/index.php?func=detail&aid=14601&group_id=2014&atid=7857

It looks like we have some multibyte tests that expect some aspect of
this behavior.

Perhaps Ola got a little overzealous with the fix. Ola, do you remember?

Alex, perhaps you could try making the changes you want in trunk and
see if the tests still run?

/Nick

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to