mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 14:15:33 +02:00
Bug#31291 ALTER TABLE CONVERT TO CHARACTER SET does not change some data types
added ability for TINY[MEDIUM] text fields to be converted to greater subtype during alter if necessary(altered charset) mysql-test/r/alter_table.result: test result mysql-test/t/alter_table.test: test case sql/sql_table.cc: added ability for TINY[MEDIUM] text fields to be converted to greater subtype during alter if necessary(altered charset)
This commit is contained in:
parent
d49d4298e9
commit
419e053a41
3 changed files with 32 additions and 1 deletions
|
|
@ -1535,7 +1535,9 @@ static bool prepare_blob_field(THD *thd, create_field *sql_field)
|
|||
|
||||
if ((sql_field->flags & BLOB_FLAG) && sql_field->length)
|
||||
{
|
||||
if (sql_field->sql_type == FIELD_TYPE_BLOB)
|
||||
if (sql_field->sql_type == FIELD_TYPE_BLOB ||
|
||||
sql_field->sql_type == FIELD_TYPE_TINY_BLOB ||
|
||||
sql_field->sql_type == FIELD_TYPE_MEDIUM_BLOB)
|
||||
{
|
||||
/* The user has given a length to the blob column */
|
||||
sql_field->sql_type= get_blob_type_from_length(sql_field->length);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue