2
# test for per-db default collation
3
# this should become the default for tables created in that db
5
# https://blueprints.launchpad.net/drizzle/+spec/default-collation-test
8
# assuming system default collation is utf8_general_ci
10
create database mysqltest collate = utf8_bin;
14
create table t1 (a varchar(10));
16
create table t2 (a varchar(10)) collate = utf8_general_ci;
18
insert into t1 values ('a'),('A'),('aA'),('Aa'),('ab'),('Ab');
20
insert into t2 values ('a'),('A'),('aA'),('Aa'),('ab'),('Ab');
22
select * from t1 order by a;
24
select * from t2 order by a;
30
select count(*) from t1 where a='a';
32
select count(*) from t2 where a='a';
34
select count(*) from t1 where a like 'a%';
36
select count(*) from t2 where a like 'a%';
38
drop table if exists t1;
40
drop table if exists t2;
42
drop database if exists mysqltest;