Commit de9ef03a authored by Sergei Golubchik's avatar Sergei Golubchik

fix max_rows calculations for internal on-disk temp tables

parent fab84ec9
...@@ -4607,7 +4607,7 @@ SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD *thd) ...@@ -4607,7 +4607,7 @@ SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD *thd)
share->max_rows= (ha_rows) (((share->db_type() == heap_hton) ? share->max_rows= (ha_rows) (((share->db_type() == heap_hton) ?
MY_MIN(thd->variables.tmp_memory_table_size, MY_MIN(thd->variables.tmp_memory_table_size,
thd->variables.max_heap_table_size) : thd->variables.max_heap_table_size) :
thd->variables.tmp_memory_table_size) / thd->variables.tmp_disk_table_size) /
share->reclength); share->reclength);
set_if_bigger(share->max_rows,1); // For dummy start options set_if_bigger(share->max_rows,1); // For dummy start options
......
...@@ -18543,7 +18543,7 @@ bool Create_tmp_table::finalize(THD *thd, ...@@ -18543,7 +18543,7 @@ bool Create_tmp_table::finalize(THD *thd,
share->max_rows= (ha_rows) (((share->db_type() == heap_hton) ? share->max_rows= (ha_rows) (((share->db_type() == heap_hton) ?
MY_MIN(thd->variables.tmp_memory_table_size, MY_MIN(thd->variables.tmp_memory_table_size,
thd->variables.max_heap_table_size) : thd->variables.max_heap_table_size) :
thd->variables.tmp_memory_table_size) / thd->variables.tmp_disk_table_size) /
share->reclength); share->reclength);
set_if_bigger(share->max_rows,1); // For dummy start options set_if_bigger(share->max_rows,1); // For dummy start options
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment