1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

mysql_prepare_create_table() inconsistency

sql_field->key_length was 0 for blob fields when a field was
being added, but Field_blob::character_octet_length() on
subsequent ALTER TABLE's (when the Field object in the old table
already existed). This means mysql_prepare_create_table() couldn't
reliably detect if the keyseg was a prefix.
This commit is contained in:
Sergei Golubchik
2019-02-22 11:56:13 +01:00
parent d00f19e832
commit f6000782fb
2 changed files with 8 additions and 2 deletions

View File

@ -3228,6 +3228,7 @@ public:
{
return false;
}
virtual uint max_octet_length() const { return 0; }
/**
Prepared statement long data:
Check whether this parameter data type is compatible with long data.
@ -5864,6 +5865,7 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
uint max_octet_length() const { return UINT_MAX8; }
};
@ -5879,6 +5881,7 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
uint max_octet_length() const { return UINT_MAX24; }
};
@ -5896,6 +5899,7 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
uint max_octet_length() const { return UINT_MAX32; }
};
@ -5911,6 +5915,7 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
uint max_octet_length() const { return UINT_MAX16; }
};