summaryrefslogtreecommitdiff
path: root/sql/sql_handler.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2012-05-15 12:45:52 +0200
committerMattias Jonsson <mattias.jonsson@oracle.com>2012-05-15 12:45:52 +0200
commitbed97f20ae6e90ca5a1d9f423564fdd95b5bc145 (patch)
treeccf2bc0a4d7a55fb4ed1b01510fc1b18630e1a04 /sql/sql_handler.cc
parent18fec1e9c1eeaf2f598b98aa764c161fee1f91d9 (diff)
downloadmariadb-git-bed97f20ae6e90ca5a1d9f423564fdd95b5bc145.tar.gz
bug#13949735: crash regression from bug#13694811.
There can be cases when the optimizer calls ha_partition::records_in_range when there are no matching partitions. So the DBUG_ASSERT of !tot_used_partitions does assert. Fixed by returning 0 instead when no matching partitions are found. This will avoid the crash. records_in_range will then try to find the biggest used partition, which will not find any partition and records_in_range will then return 0, meaning non rows can be found. Patch contributed by Davi Arnaut at twitter.
Diffstat (limited to 'sql/sql_handler.cc')
0 files changed, 0 insertions, 0 deletions