Skip to content

Commit 3d680eb

Browse files
Revert "BUG#31360522 : >=5.6.36 SOME RANGE QUERIES STILL CRASH..."
This reverts commit e86c8eaa8012de53d67f4489f6c3774abdc4cdc1. Change-Id: I1e7d58346e92ef2b36ec9dad5d8f4e6128a72c4b
1 parent 27d8906 commit 3d680eb

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

sql/sql_partition.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -834,12 +834,6 @@ static bool handle_list_of_fields(List_iterator<char> it,
834834
for (i= 0; i < num_key_parts; i++)
835835
{
836836
Field *field= table->key_info[primary_key].key_part[i].field;
837-
// BLOB/TEXT columns are not allowed in partitioning keys.
838-
if (field->flags & BLOB_FLAG)
839-
{
840-
my_error(ER_BLOB_FIELD_IN_PART_FUNC_ERROR, MYF(0));
841-
DBUG_RETURN(TRUE);
842-
}
843837
field->flags|= GET_FIXED_FIELDS_FLAG;
844838
}
845839
}

sql/table.cc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3241,15 +3241,8 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
32413241
{
32423242
Field *field= key_part->field= outparam->field[key_part->fieldnr-1];
32433243

3244-
/*
3245-
For spatial indexes, the key parts are assigned the length (4 *
3246-
sizeof(double)) in mysql_prepare_create_table() and the
3247-
field->key_length() is set to 0. This makes it appear like a prefixed
3248-
index. However, prefixed indexes are not allowed on Geometric columns.
3249-
Hence skipping new field creation for Geometric columns.
3250-
*/
32513244
if (field->key_length() != key_part->length &&
3252-
field->type() != MYSQL_TYPE_GEOMETRY)
3245+
!(field->flags & BLOB_FLAG))
32533246
{
32543247
/*
32553248
We are using only a prefix of the column as a key:

0 commit comments

Comments
 (0)