Commit 8c2bcdf8 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-76 5.5 memory overrun on main.select_jcl6.

geometry fields are blobs too.
parent ad2508ea
......@@ -4411,7 +4411,7 @@ INSERT INTO t1 VALUES
EXPLAIN SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
1 SIMPLE t2 hash_ALL a #hash#$hj 12 test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
1 SIMPLE t2 hash_ALL a #hash#$hj 14 test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
1
1
......@@ -4421,7 +4421,7 @@ SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
EXPLAIN SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2 FORCE INDEX(a);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
1 SIMPLE t2 hash_ALL a #hash#$hj 12 test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
1 SIMPLE t2 hash_ALL a #hash#$hj 14 test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2 FORCE INDEX(a);
1
1
......
......@@ -5621,6 +5621,7 @@ void TABLE::create_key_part_by_field(KEY *keyinfo,
keyinfo->key_length+= HA_KEY_NULL_LENGTH;
}
if (field->type() == MYSQL_TYPE_BLOB ||
field->type() == MYSQL_TYPE_GEOMETRY ||
field->real_type() == MYSQL_TYPE_VARCHAR)
{
key_part_info->store_length+= HA_KEY_BLOB_LENGTH;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment