Bug #10323 The characer 0x1f is treated as a trailing space in insert

Submitted: 2 May 2005 20:46 Modified: 2 May 2005 21:40
Reporter: Allen Jensen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S1 (Critical)
Version:4.1.7 OS:FreeBSD (FreeBSD)
Assigned to: CPU Architecture:Any

[2 May 2005 20:46] Allen Jensen
Description:
When inserting into a VARBINARY, the character represented by hex code 0x1f is treated like a trailing space and dropped.  This results in a duplicate key if the column is the primary key.  This happens when the character set for both the client and the server are set to utf-8 using:

[server]
character-set-server=utf8

[client]
default-character-set=utf8

All variables like 'character_set_%' are utf8.

How to repeat:
The following SQL reproduces the problem when all character sets are set to utf8.  Uses MyISAM default engine.  Same behaviour if you replace the 1f with a 20 (space):

CREATE TABLE test (
  c1 varbinary(255) NOT NULL default '',
  c2 int(11) default '0',
  c3 int(11) default '0',
  PRIMARY KEY  (c1)
);
insert into test values (0x74,2,12);
insert into test values (0x741f,0,1);
[2 May 2005 21:40] Hartmut Holzgraefe
this has been fixed in the current 4.1.11 release

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.