From: Lars-Erik Bjørk Date: October 23 2008 8:27am Subject: Re: Non-indexed selections List-Archive: http://lists.mysql.com/falcon/94 Message-Id: <994E6D59-83A6-47F2-BFE9-65A4A7B6AE23@Sun.COM> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary_(ID_0AIKtIK+5Lz9DPjMtDg5tw)" --Boundary_(ID_0AIKtIK+5Lz9DPjMtDg5tw) Content-type: text/plain; delsp=yes; format=flowed; charset=UTF-8 Content-transfer-encoding: QUOTED-PRINTABLE Hi Ann! According to the bug report, it is the search key that ends with a = =20 byte that is 0x20, not the values of the fields, so the problem is = =20 probably some other place. Thanks :) What I can do is: mysql>select * from t1 where s1 < '=C4=A0';; +------+ | s1 | +------+ | =C4=81 | +------+ 1 row in set (0.00 sec) mysql> create index i on t1 (s1); Query OK, 0 rows affected (0.04 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> select * from t1 where s1 < '=C4=A0'; +------+ | s1 | +------+ | =C4=81 | +------+ 1 row in set (0.00 sec) In the bug report, however, what is returned is +------+ | s1 | +------+ | =C4=80 | +------+ and only if the field is indexed /Lars-Erik On Oct 22, 2008, at 9:55 PM, Ann W. Harrison wrote: > Lars-Erik, >> Thanks for the explanation, I was wondering because I am able to = =20 >> reproduce bug#34479, that we discussed on the Friday conf. call = =20 >> even without adding indexes to the field. > > I've got a guess on that. UCS2 is not one of the character sets > Jim uses a lot - he's distinctly a UTF-8 kind of guy, and I think > that encode data may be handling trailing 0x20 bytes incorrectly > for UCS2. > > What I would do is follow a UCS2 string that ends in a 0x20 through > encodeRecord and encodeOpaque and see if it loses its trailing byte= . > If so, when decoded, you're likely to get whatever happens to be in > the buffer as the second half of the last character. > > Which reminds me that in general, using UCS2, the code that > truncates blanks needs to look for pairs of 0x20 0x00, not > 0x20 bytes. And the other fixed size, multi-byte character > sets need special handling as well. > > Best regards, > > > Ann > > --=20 > Falcon Storage Engine Mailing List > For list archives: http://lists.mysql.com/falcon > To unsubscribe: http://lists.mysql.com/falcon?unsub=3Dlars-erik.= bjork@stripped > --Boundary_(ID_0AIKtIK+5Lz9DPjMtDg5tw)--