Bug #35998 Trigger body is shown incorrectly in INFORMATION_SCHEMA if it contains cyrillics
Submitted: 11 Apr 2008 16:30 Modified: 14 Apr 2008 14:53
Reporter: Mikhail Oleynik
Status: Duplicate
Category:Server: I_S Severity:S3 (Non-critical)
Version:5.0.51a OS:Microsoft Windows
Assigned to: Target Version:
Tags: stored routine body, trigger body, information_schema

[11 Apr 2008 16: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 17:06] Mikhail Oleynik
Just tested: same thing with ROUTINE_DEFINITION column in INFORMTAION_SCHEMA.ROUTINES
table.
[11 Apr 2008 21: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 14:53] Mikhail Oleynik
Sorry. I'd searched by 'trigger' and 'information_schema' keyword and did not find it.

Anyway thank you!