Bug #35998 Trigger body is shown incorrectly in INFORMATION_SCHEMA if it contains cyrillics
Submitted: 11 Apr 2008 14:30 Modified: 14 Apr 2008 12:53
Reporter: Mikhail Oleynik Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Information schema Severity:S3 (Non-critical)
Version:5.0.51a OS:Microsoft Windows
Assigned to: CPU Architecture:Any
Tags: information_schema, stored routine body, trigger body

[11 Apr 2008 14:30] Mikhail Oleynik
Description:
"SELECT action_statement FROM information_schema.triggers" query shows trigger body truncated after first cyrillic symbol. 

The trigger seems to work fine. And it's body is not trimmed in *.TRG file.

How to repeat:
DELIMITER ||

# you can use any table name, `payments` is just an example

CREATE TRIGGER `tbi_payments` BEFORE INSERT ON `payments` FOR EACH ROW 
BEGIN
  DECLARE some_variable VARCHAR(100); -- привет <- cyrillic comments
  SELECT version() INTO some_variable;
END ||

DELIMITER ;

# this query will return truncated trigger body

SELECT action_statement FROM information_schema.triggers WHERE trigger_name='tbi_payments';
[11 Apr 2008 15:06] Mikhail Oleynik
Just tested: same thing with ROUTINE_DEFINITION column in INFORMTAION_SCHEMA.ROUTINES table.
[11 Apr 2008 19:49] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Duplicate of bug #19443. Please consider to upgrade to version 5.1
[14 Apr 2008 12:53] Mikhail Oleynik
Sorry. I'd searched by 'trigger' and 'information_schema' keyword and did not find it.

Anyway thank you!