1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#23924 general_log truncates queries with character set introducers.

Problem: logging of utf8-incompatible binary strings didn't work
Fix: hex-encoding of incompatible sequences.
This commit is contained in:
bar@mysql.com/bar.myoffice.izhnet.ru
2008-02-29 17:56:50 +04:00
parent ef9579619d
commit f83cc8e6db
7 changed files with 100 additions and 0 deletions

View File

@ -7644,6 +7644,17 @@ int Field_blob::store(const char *from,uint length,CHARSET_INFO *cs)
if (value.alloc(new_length))
goto oom_error;
if (f_is_hex_escape(flags))
{
copy_length= my_copy_with_hex_escaping(field_charset,
(char*) value.ptr(), new_length,
from, length);
Field_blob::store_length(copy_length);
tmp= value.ptr();
bmove(ptr + packlength, (uchar*) &tmp, sizeof(char*));
return 0;
}
/*
"length" is OK as "nchars" argument to well_formed_copy_nchars as this
is never used to limit the length of the data. The cut of long data