mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge dator5.(none):/home/pappa/clean-mysql-5.1
into dator5.(none):/home/pappa/bug20583
This commit is contained in:
@@ -1057,4 +1057,12 @@ alter table t1 add partition (partition p2 values in (3));
|
|||||||
alter table t1 drop partition p2;
|
alter table t1 drop partition p2;
|
||||||
use test;
|
use test;
|
||||||
drop database db99;
|
drop database db99;
|
||||||
|
create table t1 (a int, index(a))
|
||||||
|
partition by hash(a);
|
||||||
|
insert into t1 values (1),(2);
|
||||||
|
select * from t1 ORDER BY a DESC;
|
||||||
|
a
|
||||||
|
2
|
||||||
|
1
|
||||||
|
drop table t1;
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
@@ -1223,4 +1223,13 @@ alter table t1 drop partition p2;
|
|||||||
use test;
|
use test;
|
||||||
drop database db99;
|
drop database db99;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug 20583 Partitions: Crash using index_last
|
||||||
|
#
|
||||||
|
create table t1 (a int, index(a))
|
||||||
|
partition by hash(a);
|
||||||
|
insert into t1 values (1),(2);
|
||||||
|
select * from t1 ORDER BY a DESC;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
@@ -3400,7 +3400,8 @@ int ha_partition::common_first_last(byte *buf)
|
|||||||
|
|
||||||
if ((error= partition_scan_set_up(buf, FALSE)))
|
if ((error= partition_scan_set_up(buf, FALSE)))
|
||||||
return error;
|
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_unordered_scan_next_partition(buf);
|
||||||
return handle_ordered_index_scan(buf);
|
return handle_ordered_index_scan(buf);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user