diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2018-01-29 11:01:14 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2018-01-29 11:01:14 +0400 |
commit | b4a2baffa82e5c07b96a1c752228560dcac1359b (patch) | |
tree | 5520b02f5c3bd21bf36f1fdf00a85dc9143c7fe5 /sql/sql_partition_admin.cc | |
parent | 041a32abcdd9791761a15d93e77ff2ea7dbc9d7c (diff) | |
download | mariadb-git-b4a2baffa82e5c07b96a1c752228560dcac1359b.tar.gz |
MDEV-11084 Select statement with partition selection against MyISAM table 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.
Diffstat (limited to 'sql/sql_partition_admin.cc')
-rw-r--r-- | sql/sql_partition_admin.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index 8168397da85..4fb1891baab 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -802,8 +802,8 @@ bool Sql_cmd_alter_table_truncate_partition::execute(THD *thd) DBUG_RETURN(true); partition_names_list.push_back(str_partition_name, thd->mem_root); } - first_table->partition_names= &partition_names_list; - if (first_table->table->part_info->set_partition_bitmaps(first_table)) + if (first_table->table-> + part_info->set_partition_bitmaps(&partition_names_list)) DBUG_RETURN(true); if (lock_tables(thd, first_table, table_counter, 0)) |