mirror of
https://github.com/MariaDB/server.git
synced 2025-08-02 14:47:37 +03:00
Bug#14171: Wrong internal default value for a BINARY field.
A BINARY field is represented by the Field_string class. The space character is used as the filler for unused characters in such a field. But a BINARY field should use \x00 instead. Field_string:reset() now detects whether the current field is a BINARY one and if so uses the \x00 character as a default value filler.
This commit is contained in:
@ -1034,7 +1034,8 @@ public:
|
||||
bool zero_pack() const { return 0; }
|
||||
int reset(void)
|
||||
{
|
||||
charset()->cset->fill(charset(),ptr,field_length,' ');
|
||||
charset()->cset->fill(charset(),ptr,field_length,
|
||||
(has_charset() ? ' ' : 0));
|
||||
return 0;
|
||||
}
|
||||
int store(const char *to,uint length,CHARSET_INFO *charset);
|
||||
|
Reference in New Issue
Block a user