summaryrefslogtreecommitdiff
path: root/mysql-test/t/bdb.test
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-10-29 19:26:52 +0300
committermonty@mysql.com <>2004-10-29 19:26:52 +0300
commitafbe601302fc59c498437321b296ed6c8d360564 (patch)
tree23bcc9a71fe7237887a111b158e30f5a6bb665d3 /mysql-test/t/bdb.test
parent67456bb970cc949ceb5779b230592e455843c35c (diff)
parent541883f9d89a8d38affba60bf9506289a6232da1 (diff)
downloadmariadb-git-afbe601302fc59c498437321b296ed6c8d360564.tar.gz
merge with 4.1
Diffstat (limited to 'mysql-test/t/bdb.test')
-rw-r--r--mysql-test/t/bdb.test32
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test
index 7ee7d18439d..069ec758ba2 100644
--- a/mysql-test/t/bdb.test
+++ b/mysql-test/t/bdb.test
@@ -897,3 +897,35 @@ commit;
truncate t1;
select * from t1;
drop table t1;
+
+#
+# Check that BDB works fine with a string which is
+# longer than 255 bytes for multibyte characters.
+#
+SET NAMES utf8;
+create table t1 (a varchar(255) character set utf8) engine=bdb;
+set @a:= convert(repeat(_latin1 0xFF, 255) using utf8);
+insert into t1 values (@a);
+select a, length(a), char_length(a) from t1;
+drop table t1;
+SET NAMES latin1;
+
+#
+# Bug #5832 SELECT doesn't return records in some cases
+#
+CREATE TABLE t1 (
+ id int unsigned NOT NULL auto_increment,
+ list_id smallint unsigned NOT NULL,
+ term TEXT NOT NULL,
+ PRIMARY KEY(id),
+ INDEX(list_id, term(4))
+) ENGINE=BDB CHARSET=utf8;
+INSERT INTO t1 SET list_id = 1, term = "letterc";
+INSERT INTO t1 SET list_id = 1, term = "letterb";
+INSERT INTO t1 SET list_id = 1, term = "lettera";
+INSERT INTO t1 SET list_id = 1, term = "letterd";
+SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterc");
+SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterb");
+SELECT id FROM t1 WHERE (list_id = 1) AND (term = "lettera");
+SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterd");
+DROP TABLE t1;