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

Give an error if you use a BLOB(X) where X > 255

Fixes for MIT pthreads
This commit is contained in:
monty@donna.mysql.com
2000-10-22 01:19:05 +03:00
parent 2fd65762b6
commit b5ad31dffe
8 changed files with 64 additions and 59 deletions

View File

@ -416,7 +416,8 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
{
if (f_is_blob(sql_field->pack_flag))
{
if ((length=column->length) > file->max_key_length())
if ((length=column->length) > file->max_key_length() ||
length > file->max_key_part_length())
{
my_error(ER_WRONG_SUB_KEY,MYF(0));
DBUG_RETURN(-1);