From c90e5ce779dbf9bd0ee53b68aee9fde2997be123 Mon Sep 17 00:00:00 2001 From: Joseph Palermo Date: Sun, 9 Oct 2011 04:38:36 -0700 Subject: Only use LOWER for mysql case insensitive uniqueness check when column has a case sensitive collation. --- activerecord/test/schema/mysql_specific_schema.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'activerecord/test/schema/mysql_specific_schema.rb') diff --git a/activerecord/test/schema/mysql_specific_schema.rb b/activerecord/test/schema/mysql_specific_schema.rb index 30e1c5a167..a0adfe3752 100644 --- a/activerecord/test/schema/mysql_specific_schema.rb +++ b/activerecord/test/schema/mysql_specific_schema.rb @@ -30,6 +30,17 @@ CREATE PROCEDURE topics() SQL SECURITY INVOKER BEGIN select * from topics limit 1; END +SQL + + ActiveRecord::Base.connection.execute <<-SQL +DROP TABLE IF EXISTS collation_tests; +SQL + + ActiveRecord::Base.connection.execute <<-SQL +CREATE TABLE collation_tests ( + string_cs_column VARCHAR(1) COLLATE utf8_bin, + string_ci_column VARCHAR(1) COLLATE utf8_general_ci +) CHARACTER SET utf8 COLLATE utf8_general_ci SQL end -- cgit v1.2.3