diff options
author | unknown <mikael@dator5.(none)> | 2006-06-22 10:46:02 -0400 |
---|---|---|
committer | unknown <mikael@dator5.(none)> | 2006-06-22 10:46:02 -0400 |
commit | aa475d48a43094d984cb45c52807de0eab979a82 (patch) | |
tree | 21e389219752ea0d03c521e5d2f93bd3730fc29c /sql/ha_partition.cc | |
parent | 767cb0b4a6ed04113da94848f20442b84f73d61c (diff) | |
download | mariadb-git-aa475d48a43094d984cb45c52807de0eab979a82.tar.gz |
BUG#20583: index_last causes crash when performed on single partition
mysql-test/r/partition.result:
New test case
mysql-test/t/partition.test:
New test case
sql/ha_partition.cc:
Ensure index_last always uses ordered index scan
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 93fb6409f9f..293085a2630 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3399,7 +3399,8 @@ int ha_partition::common_first_last(byte *buf) if ((error= partition_scan_set_up(buf, FALSE))) return error; - if (!m_ordered_scan_ongoing) + if (!m_ordered_scan_ongoing && + m_index_scan_type != partition_index_last) return handle_unordered_scan_next_partition(buf); return handle_ordered_index_scan(buf); } |