Commit d0412ab8 authored by unknown's avatar unknown

Merge rurik.mysql.com:/home/igor/mysql-4.1-opt

into  rurik.mysql.com:/home/igor/mysql-5.0-opt


mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/r/ctype_utf8.result:
  SCCS merged
parents 596102c9 d62551af
......@@ -1225,6 +1225,62 @@ a
Käli Käli 2-4
Käli Käli 2-4
DROP TABLE t1;
SET NAMES latin2;
CREATE TABLE t1 (
id int(11) NOT NULL default '0',
tid int(11) NOT NULL default '0',
val text NOT NULL,
INDEX idx(tid, val(10))
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES
(40988,72,'VOLN ADSL'),(41009,72,'VOLN ADSL'),
(41032,72,'VOLN ADSL'),(41038,72,'VOLN ADSL'),
(41063,72,'VOLN ADSL'),(41537,72,'VOLN ADSL Office'),
(42141,72,'VOLN ADSL'),(42565,72,'VOLN ADSL Combi'),
(42749,72,'VOLN ADSL'),(44205,72,'VOLN ADSL');
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLNY ADSL';
id tid val
40988 72 VOLN ADSL
41009 72 VOLN ADSL
41032 72 VOLN ADSL
41038 72 VOLN ADSL
41063 72 VOLN ADSL
42141 72 VOLN ADSL
42749 72 VOLN ADSL
44205 72 VOLN ADSL
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLN ADSL';
id tid val
40988 72 VOLN ADSL
41009 72 VOLN ADSL
41032 72 VOLN ADSL
41038 72 VOLN ADSL
41063 72 VOLN ADSL
42141 72 VOLN ADSL
42749 72 VOLN ADSL
44205 72 VOLN ADSL
SELECT * FROM t1 WHERE tid=72 and val LIKE '%VOLN ADSL';
id tid val
40988 72 VOLN ADSL
41009 72 VOLN ADSL
41032 72 VOLN ADSL
41038 72 VOLN ADSL
41063 72 VOLN ADSL
42141 72 VOLN ADSL
42749 72 VOLN ADSL
44205 72 VOLN ADSL
ALTER TABLE t1 DROP KEY idx;
ALTER TABLE t1 ADD KEY idx (tid,val(11));
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLN ADSL';
id tid val
40988 72 VOLN ADSL
41009 72 VOLN ADSL
41032 72 VOLN ADSL
41038 72 VOLN ADSL
41063 72 VOLN ADSL
42141 72 VOLN ADSL
42749 72 VOLN ADSL
44205 72 VOLN ADSL
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;
......
......@@ -995,6 +995,37 @@ ALTER TABLE t1 ADD KEY (a(10));
SELECT * FROM t1 WHERE a LIKE 'Käli Käli 2%';
DROP TABLE t1;
#
# Bug#18359: LIKE predicate for a 'utf8' text column with a partial index
# (see bug #16674 as well)
#
SET NAMES latin2;
CREATE TABLE t1 (
id int(11) NOT NULL default '0',
tid int(11) NOT NULL default '0',
val text NOT NULL,
INDEX idx(tid, val(10))
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES
(40988,72,'VOLN ADSL'),(41009,72,'VOLN ADSL'),
(41032,72,'VOLN ADSL'),(41038,72,'VOLN ADSL'),
(41063,72,'VOLN ADSL'),(41537,72,'VOLN ADSL Office'),
(42141,72,'VOLN ADSL'),(42565,72,'VOLN ADSL Combi'),
(42749,72,'VOLN ADSL'),(44205,72,'VOLN ADSL');
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLNY ADSL';
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLN ADSL';
SELECT * FROM t1 WHERE tid=72 and val LIKE '%VOLN ADSL';
ALTER TABLE t1 DROP KEY idx;
ALTER TABLE t1 ADD KEY idx (tid,val(11));
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLN ADSL';
DROP TABLE t1;
# End of 4.1 tests
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment