From 7cf2e8ffad359df8f907cb7dfd585690094e5dc4 Mon Sep 17 00:00:00 2001 From: vasil Date: Wed, 15 Apr 2009 07:55:18 +0000 Subject: [PATCH] branches/5.1: Merge a change from MySQL (looks like this is against 5.0 but they later merged it to 5.1): ------------------------------------------------------------ revno: 1810.3846.1 committer: Alexey Botchkov branch nick: 31435 timestamp: Tue 2008-11-11 14:42:32 +0400 message: Bug#31435 ha_innodb.cc:3983: ulint convert_search_mode_to_innobase(ha_rkey_function): Asse I think we don't need to issue an error statement in the convert_search_mode_to_innobase(). Returning the PAGE_CUR_UNSUPP value is enough as allows to handle this case depending on the requirements. per-file comments: sql/ha_innodb.cc Bug#31435 ha_innodb.cc:3983: ulint convert_search_mode_to_innobase(ha_rkey_function): Asse no error issued in convert_search_mode_to_innobase. ha_innobase::records_in_range() returns HA_POS_ERROR if search mode isn't supported. modified: sql/ha_innodb.cc --- handler/ha_innodb.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index ef7969b174b..8e94b48cd74 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -4266,7 +4266,6 @@ convert_search_mode_to_innobase( case HA_READ_MBR_WITHIN: case HA_READ_MBR_DISJOINT: case HA_READ_MBR_EQUAL: - my_error(ER_TABLE_CANT_HANDLE_SPKEYS, MYF(0)); return(PAGE_CUR_UNSUPP); /* do not use "default:" in order to produce a gcc warning: enumeration value '...' not handled in switch @@ -5817,7 +5816,7 @@ ha_innobase::records_in_range( mode2); } else { - n_rows = 0; + n_rows = HA_POS_ERROR; } dtuple_free_for_mysql(heap1);