summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <gluh@eagle.(none)>2007-08-21 17:57:48 +0500
committerunknown <gluh@eagle.(none)>2007-08-21 17:57:48 +0500
commit521529be295e7b4254ec81437480eafe3cc5823a (patch)
treef8126016b2ed4823308d356e83570c142fbf06c7 /mysql-test
parentd48e35b983d1970a1bca2e670553040f3426a5a6 (diff)
parenta9322f2e571071e78d9b7dcaa52a6bcb2a2f8698 (diff)
downloadmariadb-git-521529be295e7b4254ec81437480eafe3cc5823a.tar.gz
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_ascii.result177
-rw-r--r--mysql-test/r/ctype_recoding.result8
-rw-r--r--mysql-test/t/ctype_ascii.test13
-rw-r--r--mysql-test/t/ctype_recoding.test10
4 files changed, 208 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_ascii.result b/mysql-test/r/ctype_ascii.result
new file mode 100644
index 00000000000..06362486073
--- /dev/null
+++ b/mysql-test/r/ctype_ascii.result
@@ -0,0 +1,177 @@
+set names ascii;
+select 'e'='`';
+'e'='`'
+0
+select 'y'='~';
+'y'='~'
+0
+create table t1 (a char(1) character set ascii);
+insert into t1 (a) values (' '), ('a'), ('b'), ('c'), ('d'), ('e'), ('f'), ('g'), ('h'), ('i'), ('j'), ('k'), ('l'), ('m'), ('n'), ('o'), ('p'), ('q'), ('r'), ('s'), ('t'), ('u'), ('v'), ('w'), ('x'), ('y'), ('z'), ('A'), ('B'), ('C'), ('D'), ('E'), ('F'), ('G'), ('H'), ('I'), ('J'), ('K'), ('L'), ('M'), ('N'), ('O'), ('P'), ('Q'), ('R'), ('S'), ('T'), ('U'), ('V'), ('W'), ('X'), ('Y'), ('Z'), ('!'), ('@'), ('#'), ('$'), ('%'), ('^'), ('&'), ('*'), ('('), (')'), ('_'), ('+'), ('`'), ('~'), ('1'), ('2'), ('3'), ('4'), ('5'), ('6'), ('7'), ('8'), ('9'), ('0'), ('['), (']'), ('\\'), ('|'), ('}'), ('{'), ('"'), (':'), (''''), (';'), ('/'), ('.'), (','), ('?'), ('>'), ('<'), ('\n'), ('\t'), ('\a'), ('\f'), ('\v');
+select t1a.a, t1b.a from t1 as t1a, t1 as t1b where t1a.a=t1b.a order by binary t1a.a, binary t1b.a;
+a a
+
+
+
+
+
+! !
+" "
+# #
+$ $
+% %
+& &
+' '
+( (
+) )
+* *
++ +
+, ,
+. .
+/ /
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+: :
+; ;
+< <
+> >
+? ?
+@ @
+A A
+A a
+A a
+B B
+B b
+C C
+C c
+D D
+D d
+E E
+E e
+F F
+F f
+F f
+G G
+G g
+H H
+H h
+I I
+I i
+J J
+J j
+K K
+K k
+L L
+L l
+M M
+M m
+N N
+N n
+O O
+O o
+P P
+P p
+Q Q
+Q q
+R R
+R r
+S S
+S s
+T T
+T t
+U U
+U u
+V V
+V v
+V v
+W W
+W w
+X X
+X x
+Y Y
+Y y
+Z Z
+Z z
+[ [
+\ \
+] ]
+^ ^
+_ _
+` `
+a A
+a A
+a a
+a a
+a a
+a a
+b B
+b b
+c C
+c c
+d D
+d d
+e E
+e e
+f F
+f F
+f f
+f f
+f f
+f f
+g G
+g g
+h H
+h h
+i I
+i i
+j J
+j j
+k K
+k k
+l L
+l l
+m M
+m m
+n N
+n n
+o O
+o o
+p P
+p p
+q Q
+q q
+r R
+r r
+s S
+s s
+t T
+t t
+u U
+u u
+v V
+v V
+v v
+v v
+v v
+v v
+w W
+w w
+x X
+x x
+y Y
+y y
+z Z
+z z
+{ {
+| |
+} }
+~ ~
+drop table t1;
+End of 5.0 tests.
diff --git a/mysql-test/r/ctype_recoding.result b/mysql-test/r/ctype_recoding.result
index 125e0edd1f9..3826792306f 100644
--- a/mysql-test/r/ctype_recoding.result
+++ b/mysql-test/r/ctype_recoding.result
@@ -187,6 +187,14 @@ select * from t1 where a=_latin1'вася';
ERROR HY000: Illegal mix of collations (cp1251_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
drop table t1;
set names latin1;
+set names ascii;
+create table t1 (a char(1) character set latin1);
+insert into t1 values ('a');
+select * from t1 where a='a';
+a
+a
+drop table t1;
+set names latin1;
create table t1 (a char(10) character set utf8 collate utf8_bin);
insert into t1 values (' xxx');
select * from t1 where a=lpad('xxx',10,' ');
diff --git a/mysql-test/t/ctype_ascii.test b/mysql-test/t/ctype_ascii.test
new file mode 100644
index 00000000000..2a5118c7d34
--- /dev/null
+++ b/mysql-test/t/ctype_ascii.test
@@ -0,0 +1,13 @@
+#
+# Bug #27562: ascii.xml invalid?
+#
+set names ascii;
+select 'e'='`';
+select 'y'='~';
+create table t1 (a char(1) character set ascii);
+insert into t1 (a) values (' '), ('a'), ('b'), ('c'), ('d'), ('e'), ('f'), ('g'), ('h'), ('i'), ('j'), ('k'), ('l'), ('m'), ('n'), ('o'), ('p'), ('q'), ('r'), ('s'), ('t'), ('u'), ('v'), ('w'), ('x'), ('y'), ('z'), ('A'), ('B'), ('C'), ('D'), ('E'), ('F'), ('G'), ('H'), ('I'), ('J'), ('K'), ('L'), ('M'), ('N'), ('O'), ('P'), ('Q'), ('R'), ('S'), ('T'), ('U'), ('V'), ('W'), ('X'), ('Y'), ('Z'), ('!'), ('@'), ('#'), ('$'), ('%'), ('^'), ('&'), ('*'), ('('), (')'), ('_'), ('+'), ('`'), ('~'), ('1'), ('2'), ('3'), ('4'), ('5'), ('6'), ('7'), ('8'), ('9'), ('0'), ('['), (']'), ('\\'), ('|'), ('}'), ('{'), ('"'), (':'), (''''), (';'), ('/'), ('.'), (','), ('?'), ('>'), ('<'), ('\n'), ('\t'), ('\a'), ('\f'), ('\v');
+select t1a.a, t1b.a from t1 as t1a, t1 as t1b where t1a.a=t1b.a order by binary t1a.a, binary t1b.a;
+drop table t1;
+
+#
+--echo End of 5.0 tests.
diff --git a/mysql-test/t/ctype_recoding.test b/mysql-test/t/ctype_recoding.test
index c18c46b6b08..1f55aea414a 100644
--- a/mysql-test/t/ctype_recoding.test
+++ b/mysql-test/t/ctype_recoding.test
@@ -153,6 +153,16 @@ drop table t1;
set names latin1;
#
+# Test the same with ascii
+#
+set names ascii;
+create table t1 (a char(1) character set latin1);
+insert into t1 values ('a');
+select * from t1 where a='a';
+drop table t1;
+set names latin1;
+
+#
# Bug#10446 Illegal mix of collations
#
create table t1 (a char(10) character set utf8 collate utf8_bin);