2 messages in com.mysql.lists.bugsBug report (bad indexing of two colum...
FromSent OnAttachments
BÁRTHÁZI András18 May 2002 09:14 
Jani Tolonen19 May 2002 00:52 
Subject:Bug report (bad indexing of two column primary key?)
From:BÁRTHÁZI András (and@barthazi.hu)
Date:05/18/2002 09:14:52 AM
List:com.mysql.lists.bugs

Hi!

I think I've found a bug (of course I am not sure...).

How-To-Repeat:

My table:

--------------------- uname + uright ADMIN + admin.pwd.* GUEST + main.*.* ROOT + *.*.* USER + user.*.*

---------------------

My create table SQL command (it seems it not depends on the type of the column, it can be char, varchar, etc.):

--------------------- create table rights ( uname char(32) binary not null , uright char(64) not null , primary key (uname, uright) ) type=MyISAM

---------------------

My problem:

select * from rights where uname='guest' or uname='GUEST';

The result of it is nothing. I waited for the second line. If I change the order of values at WHERE:

select * from rights where uname='GUEST' or uname='guest';

then the result is OK.

I think the problem is with the primary key, because if I remove it, then everything is OK. I've tested it under WinXP+mySQL 4.0.1 and Debian Linux+mySQL 3.23. The results were the same.

Sincerely, András Bártházi