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:
11
sql/field.cc
11
sql/field.cc
@ -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
|
||||
|
Reference in New Issue
Block a user