summaryrefslogtreecommitdiff
path: root/mysql-test/t/range.test
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-06-18 04:38:58 +0300
committermonty@mysql.com <>2004-06-18 04:38:58 +0300
commitb11d25883554a7e3da972cc593a9d2a0c6094096 (patch)
tree7b3b07f5c8491e5a81ca71b19d92dc87ec314192 /mysql-test/t/range.test
parentfd0153304dc0e2ada1144fc79f117f02bdcd132b (diff)
parentf56df164f0603b268806108526d59e5d02fef82b (diff)
downloadmariadb-git-b11d25883554a7e3da972cc593a9d2a0c6094096.tar.gz
Merge with 4.0.21
Diffstat (limited to 'mysql-test/t/range.test')
-rw-r--r--mysql-test/t/range.test27
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 4665cd02ed8..471af8e4a5b 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -255,7 +255,34 @@ WHERE
);
DROP TABLE t1;
+#
+# Test of problem with IN on many different keyparts. (Bug #4157)
+#
+
+CREATE TABLE t1 (
+id int( 11 ) unsigned NOT NULL AUTO_INCREMENT ,
+line int( 5 ) unsigned NOT NULL default '0',
+columnid int( 3 ) unsigned NOT NULL default '0',
+owner int( 3 ) unsigned NOT NULL default '0',
+ordinal int( 3 ) unsigned NOT NULL default '0',
+showid smallint( 6 ) unsigned NOT NULL default '1',
+tableid int( 1 ) unsigned NOT NULL default '1',
+content int( 5 ) unsigned NOT NULL default '188',
+PRIMARY KEY ( owner, id ) ,
+KEY menu( owner, showid, columnid ) ,
+KEY `COLUMN` ( owner, columnid, line ) ,
+KEY `LINES` ( owner, tableid, content, id ) ,
+KEY recount( owner, line )
+) ENGINE = MYISAM;
+
+INSERT into t1 (owner,id,columnid,line) values (11,15,15,1),(11,13,13,5);
+
+SELECT id, columnid, tableid, content, showid, line, ordinal FROM t1 WHERE owner=11 AND ((columnid IN ( 15, 13, 14 ) AND line IN ( 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 31 )) OR (columnid IN ( 13, 14 ) AND line IN ( 15 ))) LIMIT 0 , 30;
+drop table t1;
+
+#
# test for a bug with in() and unique key
+#
create table t1 (id int(10) primary key);
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9);