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

Bug #2821 Table default character set affects LONGBLOB fields

This commit is contained in:
bar@bar.intranet.mysql.r18.ru
2004-03-19 11:37:49 +04:00
parent fc17aad767
commit f897144c4e
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();