Skip to content

Commit

Permalink
fix extension_based_table_discovery for partitioned tables
Browse files Browse the repository at this point in the history
typo. the code was not matching the comment
  • Loading branch information
vuvova committed Mar 21, 2016
1 parent 8b9432f commit 7baff9f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions mysql-test/suite/archive/partition_archive.result
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,9 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
#Cleanup.
DROP TABLE t1;
create database mysqltest1;
create table mysqltest1.t1 (a int not null, b int not null) engine=archive
partition by list(a) subpartition by hash(b)
(partition p1 values in (1),
partition p2 values in (2));
drop database mysqltest1;
7 changes: 7 additions & 0 deletions mysql-test/suite/archive/partition_archive.test
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,10 @@ SHOW CREATE TABLE t1;

--echo #Cleanup.
DROP TABLE t1;

create database mysqltest1;
create table mysqltest1.t1 (a int not null, b int not null) engine=archive
partition by list(a) subpartition by hash(b)
(partition p1 values in (1),
partition p2 values in (2));
drop database mysqltest1;
2 changes: 1 addition & 1 deletion sql/discover.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ int extension_based_table_discovery(MY_DIR *dirp, const char *ext_meta,
end= cur + dirp->number_of_files;
while (cur < end)
{
char *octothorp= strrchr(cur->name + 1, '#');
char *octothorp= strchr(cur->name + 1, '#');
char *ext= strchr(octothorp ? octothorp : cur->name, FN_EXTCHAR);

if (ext)
Expand Down

0 comments on commit 7baff9f

Please sign in to comment.