~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/default_collation.test

  • Committer: Monty Taylor
  • Date: 2009-04-14 19:16:51 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 994.
  • Revision ID: mordred@inaugust.com-20090414191651-ltbww6hpqks8k7qk
Clarified instructions in README.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
2
 
# test for per-db default collation
3
 
# this should become the default for tables created in that db
4
 
#
5
 
# https://blueprints.launchpad.net/drizzle/+spec/default-collation-test
6
 
#
7
 
 
8
 
# assuming system default collation is utf8_general_ci
9
 
 
10
 
create database mysqltest collate = utf8_bin;
11
 
show create database mysqltest;
12
 
alter database mysqltest collate = utf8_general_ci;
13
 
show create database mysqltest;
14
 
alter database mysqltest collate = utf8_bin;
15
 
show create database mysqltest;
16
 
 
17
 
use mysqltest;
18
 
 
19
 
create table t1 (a varchar(10));
20
 
 
21
 
create table t2 (a varchar(10)) collate = utf8_general_ci;
22
 
 
23
 
insert into t1 values ('a'),('A'),('aA'),('Aa'),('ab'),('Ab');
24
 
 
25
 
insert into t2 values ('a'),('A'),('aA'),('Aa'),('ab'),('Ab');
26
 
 
27
 
select * from t1 order by a;
28
 
 
29
 
select * from t2 order by a;
30
 
 
31
 
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
32
 
show create table t1;
33
 
 
34
 
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
35
 
show create table t2;
36
 
 
37
 
select count(*) from t1 where a='a';
38
 
 
39
 
select count(*) from t2 where a='a';
40
 
 
41
 
select count(*) from t1 where a like 'a%';
42
 
 
43
 
select count(*) from t2 where a like 'a%';
44
 
 
45
 
drop table if exists t1;
46
 
 
47
 
drop table if exists t2;
48
 
 
49
 
drop database if exists mysqltest;
50
 
 
51