diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index 3ed2c3f53d0..3b4870ad89c 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -1216,6 +1216,9 @@ select 'In following EXPLAIN the access method should be ref, #rows~=500 (and no Z In following EXPLAIN the access method should be ref, #rows~=500 (and not 2) explain select * from t2 where a=1000 and b<11; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ref a a 5 const 502 Using where +drop table t1, t2; # # Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN # @@ -1224,9 +1227,6 @@ INSERT INTO t1 VALUES (1), (NULL); SELECT * FROM t1 WHERE a <> NULL and (a <> NULL or a <= NULL); a DROP TABLE t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref a a 5 const 502 Using where -drop table t1, t2; # # Bug#47925: regression of range optimizer and date comparison in 5.1.39! # diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index 272df5f272e..5f53fafc5b4 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -1043,6 +1043,8 @@ alter table t2 add index (a,b); select 'In following EXPLAIN the access method should be ref, #rows~=500 (and not 2)' Z; explain select * from t2 where a=1000 and b<11; +drop table t1, t2; + --echo # --echo # Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN --echo # @@ -1052,9 +1054,6 @@ INSERT INTO t1 VALUES (1), (NULL); SELECT * FROM t1 WHERE a <> NULL and (a <> NULL or a <= NULL); DROP TABLE t1; - -drop table t1, t2; - --echo # --echo # Bug#47925: regression of range optimizer and date comparison in 5.1.39! --echo # diff --git a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc index 682004407c7..f01ff4450c8 100644 --- a/storage/innodb_plugin/handler/ha_innodb.cc +++ b/storage/innodb_plugin/handler/ha_innodb.cc @@ -3704,7 +3704,10 @@ ha_innobase::store_key_val_for_row( } else if (mysql_type == MYSQL_TYPE_TINY_BLOB || mysql_type == MYSQL_TYPE_MEDIUM_BLOB || mysql_type == MYSQL_TYPE_BLOB - || mysql_type == MYSQL_TYPE_LONG_BLOB) { + || mysql_type == MYSQL_TYPE_LONG_BLOB + /* MYSQL_TYPE_GEOMETRY data is treated + as BLOB data in innodb. */ + || mysql_type == MYSQL_TYPE_GEOMETRY) { CHARSET_INFO* cs; ulint key_len;