1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug #2821 Table default character set affects LONGBLOB fields

This commit is contained in:
unknown
2004-03-19 11:37:49 +04:00
parent bf4e1d4681
commit 8bbb6d2b42
3 changed files with 31 additions and 2 deletions

View File

@@ -470,9 +470,11 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
sql_field->charset= create_info->default_table_charset;
/*
table_charset is set in ALTER TABLE if we want change character set
for all varchar/char columns
for all varchar/char columns.
But the table charset must not affect the BLOB fields, so don't
allow to change my_charset_bin to somethig else.
*/
if (create_info->table_charset)
if (create_info->table_charset && sql_field->charset != &my_charset_bin)
sql_field->charset= create_info->table_charset;
sql_field->create_length_to_internal_length();