Skip to content

Commit

Permalink
table->keep_row_order no longer need to force DYNAMIC_RECORD
Browse files Browse the repository at this point in the history
for temporary Aria tables. It can use a faster BLOCK_RECORD
  • Loading branch information
vuvova committed Apr 8, 2015
1 parent 5d8dbee commit 7a387c0
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions sql/sql_select.cc
Expand Up @@ -16979,20 +16979,15 @@ bool create_internal_tmp_table(TABLE *table, KEY *keyinfo,
{
enum data_file_type file_type= table->no_rows ? NO_RECORD :
(share->reclength < 64 && !share->blob_fields ? STATIC_RECORD :
table->used_for_duplicate_elimination || table->keep_row_order ?
DYNAMIC_RECORD : BLOCK_RECORD);
uint create_flags= HA_CREATE_TMP_TABLE | HA_CREATE_INTERNAL_TABLE;
table->used_for_duplicate_elimination ? DYNAMIC_RECORD : BLOCK_RECORD);
uint create_flags= HA_CREATE_TMP_TABLE | HA_CREATE_INTERNAL_TABLE |
(table->keep_row_order ? HA_PRESERVE_INSERT_ORDER : 0);

if (file_type != NO_RECORD && encrypt_tmp_disk_tables)
{
/* encryption is only supported for BLOCK_RECORD */
file_type= BLOCK_RECORD;
create_flags|= HA_CREATE_ENCRYPTED;
if (table->keep_row_order)
{
create_flags|= HA_PRESERVE_INSERT_ORDER;
}

if (table->used_for_duplicate_elimination)
{
/*
Expand Down

0 comments on commit 7a387c0

Please sign in to comment.