Bug #5810 Views:CREATE VIEW hangs if the argument for a function has multi-byte character
Submitted: 29 Sep 2004 19:14 Modified: 21 Oct 2004 9:45
Reporter: Shuichi Tamagawa Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.2-alpha OS:Linux (SuSE Linux 9.0)
Assigned to: Assigned Account CPU Architecture:Any

[29 Sep 2004 19:14] Shuichi Tamagawa
Description:
CREATE VIEW hangs if the argument for a function in the statement has multi-byte character (Japanese). It works well if the argument is single-byte character.

e.g.

CREATE VIEW AS SELECT HEX(`XXX`) FROM t1;
CREATE VIEW AS SELECT LENGTH(`XXX`) FROM t1;
CREATE VIEW AS SELECT CHAR_LENGTH(`XXX`) FROM t1;

# XXX is multi-byte column name

How to repeat:
Please use the attached test case file.
I've also attached master.log file and master.trace file for your reference.
[29 Sep 2004 19:16] Shuichi Tamagawa
Test case file (encoded in ujis)

Attachment: view.test (application/octet-stream, text), 516 bytes.

[29 Sep 2004 19:18] Shuichi Tamagawa
master.log

Attachment: master.log (application/octet-stream, text), 638 bytes.

[29 Sep 2004 19:19] Shuichi Tamagawa
master.trace

Attachment: master.trace.gz (application/x-tar, text), 26.53 KiB.

[6 Oct 2004 2:32] MySQL Verification Team
Verified against latest BK source.
[21 Oct 2004 9:45] Oleksandr Byelkin
Thank you for bugreport! 
This is fixed in 4.1 by following cset: 
ChangeSet 1.2042.32.10 2004/10/20 01:28:42 monty@mishka.local 
  Review of all code pushed since last review 
  Simple optimzations and cleanups 
  Removed compiler warnings and fixed portability issues 
  Added client functions 'mysql_embedded()' to allow client to check if we are using 
embedded server 
  Fixes for purify 
 
And this fix will be present in 5.0 as soon as merge of fixes of 4.1 to 5.0 will be done