mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge mysql.com:/home/mydev/mysql-4.1-bug14980
into mysql.com:/home/mydev/mysql-5.0-bug14980 include/my_base.h: Auto merged myisam/mi_delete.c: Auto merged myisam/mi_key.c: Auto merged myisam/mi_rnext_same.c: Auto merged myisam/mi_unique.c: Auto merged myisam/mi_update.c: Auto merged myisam/mi_write.c: Auto merged mysql-test/r/myisam.result: SCCS merged mysql-test/t/myisam.test: SCCS merged
This commit is contained in:
@ -729,6 +729,24 @@ select * from t1 where bob is null and cip=1;
|
||||
cip time score bob
|
||||
1 00:01:00 0 NULL
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
id1 int not null auto_increment,
|
||||
id2 int not null default '0',
|
||||
t text not null,
|
||||
primary key (id1),
|
||||
key x (id2, t(32))
|
||||
) engine=myisam;
|
||||
insert into t1 (id2, t) values
|
||||
(10, 'abc'), (10, 'abc'), (10, 'abc'),
|
||||
(20, 'abc'), (20, 'abc'), (20, 'def'),
|
||||
(10, 'abc'), (10, 'abc');
|
||||
select count(*) from t1 where id2 = 10;
|
||||
count(*)
|
||||
5
|
||||
select count(id1) from t1 where id2 = 10;
|
||||
count(id1)
|
||||
5
|
||||
drop table t1;
|
||||
set storage_engine=MyISAM;
|
||||
drop table if exists t1,t2,t3;
|
||||
--- Testing varchar ---
|
||||
|
@ -678,6 +678,25 @@ select * from t1 where bob is null and cip=1;
|
||||
create index bug on t1 (bob(22), cip, time);
|
||||
select * from t1 where bob is null and cip=1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
|
||||
#
|
||||
create table t1 (
|
||||
id1 int not null auto_increment,
|
||||
id2 int not null default '0',
|
||||
t text not null,
|
||||
primary key (id1),
|
||||
key x (id2, t(32))
|
||||
) engine=myisam;
|
||||
insert into t1 (id2, t) values
|
||||
(10, 'abc'), (10, 'abc'), (10, 'abc'),
|
||||
(20, 'abc'), (20, 'abc'), (20, 'def'),
|
||||
(10, 'abc'), (10, 'abc');
|
||||
select count(*) from t1 where id2 = 10;
|
||||
select count(id1) from t1 where id2 = 10;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user