1 message in com.mysql.lists.perl[PATCH] mysql_db_quote + UTF8 flagged...
FromSent OnAttachments
Ruslan U. Zakirov03 May 2004 10:55.patch
Subject:[PATCH] mysql_db_quote + UTF8 flagged strings
From:Ruslan U. Zakirov (cub@acronis.ru)
Date:05/03/2004 10:55:02 AM
List:com.mysql.lists.perl
Attachments:

Hello. Attached patch fix problems for users of perl5.8.x and strings with UTF8 flag enabled.

In general case current code shouldn't give user big problems(it just doesn't copy UTF8 flag on new string), but perl(5.8.{0..4}) has small bug in 'sassign' op code and perl doesn't drop magic from strings in next code:

$utf_str = $dbh->quote( $utf_str );

under some conditions(I can't figure them out) $utf_str can be currupted in future use.

This patch works as workaround for perl bug and also fix logic of mysql quote sub which should copy UTF8 flag if it is set on src str.

Best regards. Ruslan.

PS. PERL_VERSION check should be changed to right values, I don't know when UTF8 flag was introduced.