Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Barkov committed Aug 1, 2017
2 parents 9372f6e + 488f46f commit 68bc777
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sql/ha_partition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,12 @@ ha_partition::~ha_partition()
destroy_record_priority_queue();
my_free(m_part_ids_sorted_by_num_of_records);

if (m_added_file)
{
for (handler **ph= m_added_file; *ph; ph++)
delete (*ph);
}
clear_handler_file();

free_root(&m_mem_root, MYF(0));

DBUG_VOID_RETURN;
Expand Down
11 changes: 11 additions & 0 deletions storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,14 @@ t2
DROP TABLE t2;
use test;
DROP DATABASE db3;
#
# MDEV-13153 Assertion `global_status_var.global_memory_used == 0 '
# failed upon server restart with partitioned RocksDB table
#
CREATE TABLE t1 (a INT) ENGINE=RocksDB PARTITION BY HASH(a) PARTITIONS 2;
INSERT INTO t1 (a) VALUES (1),(2);
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
SELECT 1;
1
1
DROP TABLE t1;
11 changes: 11 additions & 0 deletions storage/rocksdb/mysql-test/rocksdb/t/rocksdb_parts.test
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,14 @@ DROP TABLE t2;
use test;
DROP DATABASE db3;

--echo #
--echo # MDEV-13153 Assertion `global_status_var.global_memory_used == 0 '
--echo # failed upon server restart with partitioned RocksDB table
--echo #
CREATE TABLE t1 (a INT) ENGINE=RocksDB PARTITION BY HASH(a) PARTITIONS 2;
INSERT INTO t1 (a) VALUES (1),(2);
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
--source include/restart_mysqld.inc
SELECT 1;
DROP TABLE t1;

0 comments on commit 68bc777

Please sign in to comment.