summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorrburnett@bk-internal.mysql.com <>2006-08-16 16:04:10 +0200
committerrburnett@bk-internal.mysql.com <>2006-08-16 16:04:10 +0200
commit8baecf7ed683082949f4f853c7de8e0e84e4f16b (patch)
tree849c2eb88c0ed66f67304be9988c5cd6725cbb06 /mysql-test
parentc965eea789516d72ec024a4ea1d6051eb5aca966 (diff)
parent4ef5116425ed020bfaaab12504a1e6557006a9e0 (diff)
downloadmariadb-git-8baecf7ed683082949f4f853c7de8e0e84e4f16b.tar.gz
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_utf8.result16
-rw-r--r--mysql-test/r/ndb_lock.result15
-rw-r--r--mysql-test/t/ctype_utf8.test14
-rw-r--r--mysql-test/t/ndb_lock.test15
4 files changed, 55 insertions, 5 deletions
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index aa87bfee6a7..f78fe3521fa 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -1293,6 +1293,22 @@ id tid val
42749 72 VOLNÝ ADSL
44205 72 VOLNÝ ADSL
DROP TABLE t1;
+create table t1(a char(200) collate utf8_unicode_ci NOT NULL default '')
+default charset=utf8 collate=utf8_unicode_ci;
+insert into t1 values (unhex('65')), (unhex('C3A9')), (unhex('65'));
+explain select distinct a from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary
+select distinct a from t1;
+a
+e
+explain select a from t1 group by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
+select a from t1 group by a;
+a
+e
+drop table t1;
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
SELECT id FROM t1;
diff --git a/mysql-test/r/ndb_lock.result b/mysql-test/r/ndb_lock.result
index 3b433023843..2c212b9cfef 100644
--- a/mysql-test/r/ndb_lock.result
+++ b/mysql-test/r/ndb_lock.result
@@ -64,17 +64,26 @@ pk u o
insert into t1 values (1,1,1);
drop table t1;
create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb;
-insert into t1 values (1,'one',1), (2,'two',2),(3,"three",3);
+insert into t1 values (1,'one',1);
begin;
select * from t1 where x = 1 for update;
x y z
1 one 1
begin;
-select * from t1 where x = 2 for update;
+select * from t1 where x = 1 for update;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+rollback;
+rollback;
+insert into t1 values (2,'two',2),(3,"three",3);
+begin;
+select * from t1 where x = 1 for update;
x y z
-2 two 2
+1 one 1
select * from t1 where x = 1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+select * from t1 where x = 2 for update;
+x y z
+2 two 2
rollback;
commit;
begin;
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index a3dc781de6a..365d0fab4bf 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -1037,6 +1037,20 @@ ALTER TABLE t1 ADD KEY idx (tid,val(11));
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLNÝ ADSL';
DROP TABLE t1;
+
+#
+# Bug 20709: problem with utf8 fields in temporary tables
+#
+
+create table t1(a char(200) collate utf8_unicode_ci NOT NULL default '')
+ default charset=utf8 collate=utf8_unicode_ci;
+insert into t1 values (unhex('65')), (unhex('C3A9')), (unhex('65'));
+explain select distinct a from t1;
+select distinct a from t1;
+explain select a from t1 group by a;
+select a from t1 group by a;
+drop table t1;
+
# End of 4.1 tests
#
diff --git a/mysql-test/t/ndb_lock.test b/mysql-test/t/ndb_lock.test
index 54214ee72ec..48a8b77dcd7 100644
--- a/mysql-test/t/ndb_lock.test
+++ b/mysql-test/t/ndb_lock.test
@@ -73,7 +73,7 @@ drop table t1;
create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb;
-insert into t1 values (1,'one',1), (2,'two',2),(3,"three",3);
+insert into t1 values (1,'one',1);
# PK access
connection con1;
@@ -82,12 +82,23 @@ select * from t1 where x = 1 for update;
connection con2;
begin;
-select * from t1 where x = 2 for update;
--error 1205
select * from t1 where x = 1 for update;
rollback;
connection con1;
+rollback;
+insert into t1 values (2,'two',2),(3,"three",3);
+begin;
+select * from t1 where x = 1 for update;
+
+connection con2;
+--error 1205
+select * from t1 where x = 1 for update;
+select * from t1 where x = 2 for update;
+rollback;
+
+connection con1;
commit;
# table scan