Skip to content

Commit 9ae160a

Browse files
author
Aakanksha Verma
committed
1 parent 5cb6382 commit 9ae160a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

sql/ha_partition.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2751,7 +2751,15 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
27512751
name_buffer_ptr= m_name_buffer_ptr;
27522752
m_start_key.length= 0;
27532753
m_rec0= table->record[0];
2754-
m_rec_length= table_share->reclength;
2754+
legacy_db_type db_type = ha_legacy_type(m_part_info->default_engine_type);
2755+
if (db_type == DB_TYPE_HEAP)
2756+
{
2757+
m_rec_length= table_share->rec_buff_length;
2758+
} else {
2759+
m_rec_length= table_share->reclength;
2760+
}
2761+
DBUG_ASSERT(db_type != DB_TYPE_UNKNOWN);
2762+
27552763
if (!m_part_ids_sorted_by_num_of_records)
27562764
{
27572765
if (!(m_part_ids_sorted_by_num_of_records=

0 commit comments

Comments
 (0)