-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-11084 Select statement with partition selection against MyISAM t…
…able opens all partitions. Now we don't open partitions if it was explicitly cpecified. ha_partition::m_opened_partition bitmap added to track partitions that were actually opened.
- Loading branch information
Alexey Botchkov
committed
Jan 29, 2018
1 parent
041a32a
commit b4a2baf
Showing
16 changed files
with
252 additions
and
61 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
select * from t1 partition (p1); | ||
x | ||
300 | ||
select * from t1 partition (p0); | ||
ERROR HY000: Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory") | ||
drop table t1; | ||
Warnings: | ||
Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# | ||
# MDEV-11084 Select statement with partition selection against MyISAM table opens all partitions. | ||
# | ||
--source include/have_partition.inc | ||
|
||
let $datadir=`select @@datadir`; | ||
|
||
# Table declared as having 2 partitions | ||
# create table t1 (x int) egine=myisam | ||
# partition by range columns (x) | ||
# ( partition p0 values less than (100), partition p1 values less than (1000)); | ||
# | ||
# But we copy only second partition. So the 'p0' can't be opened. | ||
|
||
copy_file std_data/mdev11084.frm $datadir/test/t1.frm; | ||
copy_file std_data/mdev11084.par $datadir/test/t1.par; | ||
copy_file std_data/mdev11084.part1.MYD $datadir/test/t1#P#p1.MYD; | ||
copy_file std_data/mdev11084.part1.MYI $datadir/test/t1#P#p1.MYI; | ||
select * from t1 partition (p1); | ||
--replace_result $datadir ./ | ||
--error ER_FILE_NOT_FOUND | ||
select * from t1 partition (p0); | ||
--replace_result $datadir ./ | ||
drop table t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.