summaryrefslogtreecommitdiff
path: root/mysql-test/r/binary.result
diff options
context:
space:
mode:
authorunknown <igor@olga.mysql.com>2007-06-30 20:49:28 -0700
committerunknown <igor@olga.mysql.com>2007-06-30 20:49:28 -0700
commit26a2b00498c5da514abe7056032ea37f7115b1e1 (patch)
treeed6bbc6971d75074b67617c9c71dbae1f71a8996 /mysql-test/r/binary.result
parent2ca2b232e3fd7e82c4502f4ebd21a85e01d547a3 (diff)
parent8dcd5fca6977a8aafb0dd874b348e0078eafda94 (diff)
downloadmariadb-git-26a2b00498c5da514abe7056032ea37f7115b1e1.tar.gz
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/dev-opt/mysql-5.1-opt mysql-test/r/binary.result: Auto merged mysql-test/r/ctype_collate.result: Auto merged mysql-test/r/ctype_utf8.result: Auto merged mysql-test/t/binary.test: Auto merged mysql-test/t/create.test: Auto merged mysql-test/t/ctype_utf8.test: Auto merged sql/field_conv.cc: Auto merged sql/item.cc: Auto merged sql/item_subselect.cc: Auto merged sql/item_sum.cc: Auto merged sql/item_sum.h: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_select.cc: Auto merged sql-common/client.c: Auto merged sql/sql_select.h: Auto merged sql/table.cc: Auto merged storage/myisam/mi_open.c: Auto merged strings/ctype-simple.c: Auto merged mysql-test/r/create.result: Manual merge. mysql-test/r/subselect.result: Manual merge. mysql-test/r/type_enum.result: Manual merge. mysql-test/t/type_enum.test: Manual merge. mysql-test/include/mix1.inc: Manual merge. mysql-test/r/innodb_mysql.result: Manual merge. mysql-test/t/subselect.test: Manual merge. sql/sql_parse.cc: Manual merge. storage/myisam/mi_key.c: Manual merge.
Diffstat (limited to 'mysql-test/r/binary.result')
-rw-r--r--mysql-test/r/binary.result38
1 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/r/binary.result b/mysql-test/r/binary.result
index ccafa43c7ab..be87c25e932 100644
--- a/mysql-test/r/binary.result
+++ b/mysql-test/r/binary.result
@@ -160,3 +160,41 @@ hex(col1)
62000000000000000000
62200000000000000000
drop table t1;
+CREATE TABLE t1 (
+a binary(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
+index idx(a)
+);
+INSERT INTO t1 SET a=unhex('1F9480179366F2BF567E1C4B964C1EF029087575');
+INSERT INTO t1 SET a=unhex('1F9480179366F2BF567E1C4B964C1EF029082020');
+INSERT INTO t1 SET a=unhex('1F9480179366F2BF567E1C4B964C1EF029080707');
+SELECT hex(a) FROM t1 order by a;
+hex(a)
+1F9480179366F2BF567E1C4B964C1EF029080707
+1F9480179366F2BF567E1C4B964C1EF029082020
+1F9480179366F2BF567E1C4B964C1EF029087575
+EXPLAIN SELECT hex(a) FROM t1 order by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL idx 20 NULL 3 Using index
+SELECT hex(a) from t1 WHERE a=unhex('1F9480179366F2BF567E1C4B964C1EF029082020');
+hex(a)
+1F9480179366F2BF567E1C4B964C1EF029082020
+EXPLAIN
+SELECT hex(a) from t1 WHERE a=unhex('1F9480179366F2BF567E1C4B964C1EF029082020');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref idx idx 20 const 1 Using where; Using index
+SELECT hex(a) from t1 WHERE a=unhex('1F9480179366F2BF567E1C4B964C1EF02908');
+hex(a)
+DROP TABLE t1;
+CREATE TABLE t1 (
+id numeric(20) NOT NULL,
+lang varchar(8) NOT NULL,
+msg varchar(32) NOT NULL,
+PRIMARY KEY (id,lang)
+);
+INSERT INTO t1 VALUES (33, 'en', 'zzzzzzz');
+INSERT INTO t1 VALUES (31, 'en', 'xxxxxxx');
+INSERT INTO t1 VALUES (32, 'en', 'yyyyyyy');
+SELECT * FROM t1 WHERE id=32;
+id lang msg
+32 en yyyyyyy
+DROP TABLE t1;