Bug #911 selecting from table where unique field="A" returns more than one row
Submitted: 24 Jul 2003 8:45 Modified: 24 Jul 2003 9:40
Reporter: Alex Rider Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.13nt OS:Windows (windows 2000)
Assigned to: CPU Architecture:Any

[24 Jul 2003 8:45] Alex Rider
Description:
I have created a table like that

CREATE TABLE `tbl` (
  `Pk` bigint(11) NOT NULL auto_increment,
  `Unit_code` char(50) default NULL,
 )TYPE=MyISAM

then i insert two rows with Unit_code filed equals to "A" and "B" (Russian Windows-1251 code page)

when i do SELECT * FROM tbl WHERE Unit_code="A" MySQL returns both rows.
Changing russian letters to equal english solve that problem, but strongly needed to use russian.
What is solution is?

How to repeat:
CREATE TABLE `tbl` (
  `Pk` bigint(11) NOT NULL auto_increment,
  `Unit_code` char(50) default NULL,
 )TYPE=MyISAM

INSERT INTO tbl (Unit_code) VALUES ("A");
INSERT INTO tbl (Unit_code) VALUES ("B");

SELECT * FROM tbl WHERE Unit_code="A";

!!!!!All letters should be russian
[24 Jul 2003 9:40] Sergei Golubchik
Works perfectly for me.

Are you sure you started mysqld with --default-character-set=cp1251 ?