Skip to content

Commit 28697ae

Browse files
karthik-kamathdahlerlend
authored andcommitted
Revert "BUG#31360522 : >=5.6.36 SOME RANGE QUERIES STILL CRASH..."
This reverts commit e86c8eaa8012de53d67f4489f6c3774abdc4cdc1. Change-Id: I1e7d58346e92ef2b36ec9dad5d8f4e6128a72c4b
1 parent 4dd8830 commit 28697ae

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

sql/sql_partition.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -783,11 +783,6 @@ static bool handle_list_of_fields(List_iterator<char> it, TABLE *table,
783783
*/
784784
for (i = 0; i < num_key_parts; i++) {
785785
Field *field = table->key_info[primary_key].key_part[i].field;
786-
// BLOB/TEXT columns are not allowed in partitioning keys.
787-
if (field->is_flag_set(BLOB_FLAG)) {
788-
my_error(ER_BLOB_FIELD_IN_PART_FUNC_ERROR, MYF(0));
789-
return true;
790-
}
791786
field->set_flag(GET_FIXED_FIELDS_FLAG);
792787
}
793788
} else {

sql/table.cc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2841,15 +2841,8 @@ bool create_key_part_field_with_prefix_length(TABLE *table, MEM_ROOT *root) {
28412841
key_part < key_part_end; key_part++) {
28422842
Field *field = key_part->field = table->field[key_part->fieldnr - 1];
28432843

2844-
/*
2845-
For spatial indexes, the key parts are assigned the length (4 *
2846-
sizeof(double)) in prepare_key_column() and the field->key_length() is
2847-
set to 0. This makes it appear like a prefixed index. However, prefixed
2848-
indexes are not allowed on Geometric columns. Hence skipping new field
2849-
creation for Geometric columns.
2850-
*/
28512844
if (field->key_length() != key_part->length &&
2852-
field->type() != MYSQL_TYPE_GEOMETRY) {
2845+
!field->is_flag_set(BLOB_FLAG)) {
28532846
/*
28542847
We are using only a prefix of the column as a key:
28552848
Create a new field for the key part that matches the index

0 commit comments

Comments
 (0)