~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/default_collation.result

  • Committer: Monty Taylor
  • Date: 2008-10-09 22:38:27 UTC
  • mto: This revision was merged to the branch mainline in revision 497.
  • Revision ID: monty@inaugust.com-20081009223827-bc9gvpiplsmvpwyq
Moved test() to its own file.
Made a new function to possibly replace int10_to_str.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
create database mysqltest collate = utf8_bin;
2
 
show create database mysqltest;
3
 
Database        Create Database
4
 
mysqltest       CREATE DATABASE `mysqltest` COLLATE = utf8_bin
5
 
alter database mysqltest collate = utf8_general_ci;
6
 
show create database mysqltest;
7
 
Database        Create Database
8
 
mysqltest       CREATE DATABASE `mysqltest` COLLATE = utf8_general_ci
9
 
alter database mysqltest collate = utf8_bin;
10
 
show create database mysqltest;
11
 
Database        Create Database
12
 
mysqltest       CREATE DATABASE `mysqltest` COLLATE = utf8_bin
13
 
use mysqltest;
14
 
create table t1 (a varchar(10));
15
 
create table t2 (a varchar(10)) collate = utf8_general_ci;
16
 
insert into t1 values ('a'),('A'),('aA'),('Aa'),('ab'),('Ab');
17
 
insert into t2 values ('a'),('A'),('aA'),('Aa'),('ab'),('Ab');
18
 
select * from t1 order by a;
19
 
a
20
 
A
21
 
Aa
22
 
Ab
23
 
a
24
 
aA
25
 
ab
26
 
select * from t2 order by a;
27
 
a
28
 
a
29
 
A
30
 
aA
31
 
Aa
32
 
ab
33
 
Ab
34
 
show create table t1;
35
 
Table   Create Table
36
 
t1      CREATE TABLE `t1` (
37
 
  `a` VARCHAR(10) COLLATE utf8_bin DEFAULT NULL
38
 
) ENGINE=DEFAULT COLLATE = utf8_bin
39
 
show create table t2;
40
 
Table   Create Table
41
 
t2      CREATE TABLE `t2` (
42
 
  `a` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL
43
 
) ENGINE=DEFAULT COLLATE = utf8_general_ci
44
 
select count(*) from t1 where a='a';
45
 
count(*)
46
 
1
47
 
select count(*) from t2 where a='a';
48
 
count(*)
49
 
2
50
 
select count(*) from t1 where a like 'a%';
51
 
count(*)
52
 
3
53
 
select count(*) from t2 where a like 'a%';
54
 
count(*)
55
 
6
56
 
drop table if exists t1;
57
 
drop table if exists t2;
58
 
drop database if exists mysqltest;