diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-01-07 20:01:55 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-01-07 20:01:55 +0100 |
commit | 8c2bcdf85ff753bceeb5b235f3605e348e6f9e1d (patch) | |
tree | f0dccbbb013cc7daeb9c54a8244202f1ce700e37 | |
parent | ad2508eac47b9f57dac2c13cfe778fb34174ef2d (diff) | |
download | mariadb-git-8c2bcdf85ff753bceeb5b235f3605e348e6f9e1d.tar.gz |
MDEV-76 5.5 memory overrun on main.select_jcl6.
geometry fields are blobs too.
-rw-r--r-- | mysql-test/r/select_jcl6.result | 4 | ||||
-rw-r--r-- | sql/table.cc | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result index 4a9dc92433f..4a5ef4879d1 100644 --- a/mysql-test/r/select_jcl6.result +++ b/mysql-test/r/select_jcl6.result @@ -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 diff --git a/sql/table.cc b/sql/table.cc index 07fae7329c8..fc0ee45add9 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -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; |