2018-11-16 18:28:01 +01:00
|
|
|
#
|
|
|
|
# MDEV-14500 Support engines without rnd_pos
|
|
|
|
#
|
|
|
|
source include/have_archive.inc;
|
|
|
|
source include/have_sequence.inc;
|
|
|
|
source include/have_partition.inc;
|
|
|
|
|
2024-05-28 09:08:51 +04:00
|
|
|
create table t1(c1 int not null, c2 double not null, c3 char(255) not null) engine=archive charset=latin1;
|
2018-11-16 18:28:01 +01:00
|
|
|
insert t1 select seq, seq+0.7, concat('row with c1 = ', seq) from seq_1_to_10;
|
|
|
|
explain partitions select c1,c3 from t1 order by c2;
|
|
|
|
set max_length_for_sort_data = 4;
|
|
|
|
explain partitions select c1,c3 from t1 order by c2;
|
|
|
|
flush status;
|
2024-05-23 08:54:14 +07:00
|
|
|
--disable_cursor_protocol
|
2023-05-31 11:57:45 +07:00
|
|
|
--disable_ps2_protocol
|
2018-11-16 18:28:01 +01:00
|
|
|
select c1,c3 from t1 order by c2;
|
2023-05-31 11:57:45 +07:00
|
|
|
--enable_ps2_protocol
|
2024-05-23 08:54:14 +07:00
|
|
|
--enable_cursor_protocol
|
2018-11-16 18:28:01 +01:00
|
|
|
set max_length_for_sort_data = default;
|
2019-03-20 10:26:49 +02:00
|
|
|
--disable_ps_protocol
|
2018-11-16 18:28:01 +01:00
|
|
|
show status where variable_name like '%tmp%' and value != 0;
|
2019-03-20 10:26:49 +02:00
|
|
|
--enable_ps_protocol
|
2018-11-16 18:28:01 +01:00
|
|
|
|
|
|
|
alter table t1 partition by hash (c1) partitions 3;
|
|
|
|
explain partitions select c1,c3 from t1 order by c2;
|
|
|
|
set max_length_for_sort_data = 4;
|
|
|
|
explain partitions select c1,c3 from t1 order by c2;
|
|
|
|
flush status;
|
2024-05-23 08:54:14 +07:00
|
|
|
--disable_cursor_protocol
|
2023-05-31 11:57:45 +07:00
|
|
|
--disable_ps2_protocol
|
2018-11-16 18:28:01 +01:00
|
|
|
select c1,c3 from t1 order by c2;
|
2023-05-31 11:57:45 +07:00
|
|
|
--enable_ps2_protocol
|
2024-05-23 08:54:14 +07:00
|
|
|
--enable_cursor_protocol
|
2018-11-16 18:28:01 +01:00
|
|
|
set max_length_for_sort_data = default;
|
2019-03-20 10:26:49 +02:00
|
|
|
--disable_ps_protocol
|
2018-11-16 18:28:01 +01:00
|
|
|
show status where variable_name like '%tmp%' and value != 0;
|
2019-03-20 10:26:49 +02:00
|
|
|
--enable_ps_protocol
|
2018-11-16 18:28:01 +01:00
|
|
|
|
|
|
|
drop table t1;
|