From 7baff9f68763d737c5eb612e455861a1cd05349f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 17 Mar 2016 13:08:06 +0100 Subject: [PATCH] fix extension_based_table_discovery for partitioned tables typo. the code was not matching the comment --- mysql-test/suite/archive/partition_archive.result | 6 ++++++ mysql-test/suite/archive/partition_archive.test | 7 +++++++ sql/discover.cc | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/archive/partition_archive.result b/mysql-test/suite/archive/partition_archive.result index eb1fca46522..c4cccc03a04 100644 --- a/mysql-test/suite/archive/partition_archive.result +++ b/mysql-test/suite/archive/partition_archive.result @@ -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; diff --git a/mysql-test/suite/archive/partition_archive.test b/mysql-test/suite/archive/partition_archive.test index 899f266c09c..aa2adb7e44d 100644 --- a/mysql-test/suite/archive/partition_archive.test +++ b/mysql-test/suite/archive/partition_archive.test @@ -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; diff --git a/sql/discover.cc b/sql/discover.cc index 36e3ef72c44..d8ed718fc58 100644 --- a/sql/discover.cc +++ b/sql/discover.cc @@ -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)