Commit 021f8d21 authored by konstantin@mysql.com's avatar konstantin@mysql.com

Cleanup

parent 37905eea
...@@ -64,7 +64,7 @@ select count(distinct n) from t1; ...@@ -64,7 +64,7 @@ select count(distinct n) from t1;
show status like 'Created_tmp_disk_tables'; show status like 'Created_tmp_disk_tables';
drop table t1; drop table t1;
#test conversion from heap to MyISAM # Test use of MyISAM tmp tables
create table t1 (s text); create table t1 (s text);
let $1=5000; let $1=5000;
disable_query_log; disable_query_log;
......
...@@ -2228,14 +2228,14 @@ bool Item_sum_count_distinct::setup(THD *thd) ...@@ -2228,14 +2228,14 @@ bool Item_sum_count_distinct::setup(THD *thd)
return FALSE; return FALSE;
if (!(tmp_table_param= new TMP_TABLE_PARAM)) if (!(tmp_table_param= new TMP_TABLE_PARAM))
return 1; return TRUE;
/* Create a table with an unique key over all parameters */ /* Create a table with an unique key over all parameters */
for (uint i=0; i < arg_count ; i++) for (uint i=0; i < arg_count ; i++)
{ {
Item *item=args[i]; Item *item=args[i];
if (list.push_back(item)) if (list.push_back(item))
return 1; // End of memory return TRUE; // End of memory
if (item->const_item()) if (item->const_item())
{ {
(void) item->val_int(); (void) item->val_int();
...@@ -2244,14 +2244,14 @@ bool Item_sum_count_distinct::setup(THD *thd) ...@@ -2244,14 +2244,14 @@ bool Item_sum_count_distinct::setup(THD *thd)
} }
} }
if (always_null) if (always_null)
return 0; return FALSE;
count_field_types(tmp_table_param,list,0); count_field_types(tmp_table_param,list,0);
DBUG_ASSERT(table == 0); DBUG_ASSERT(table == 0);
if (!(table= create_tmp_table(thd, tmp_table_param, list, (ORDER*) 0, 1, if (!(table= create_tmp_table(thd, tmp_table_param, list, (ORDER*) 0, 1,
0, 0,
select_lex->options | thd->options, select_lex->options | thd->options,
HA_POS_ERROR, (char*)""))) HA_POS_ERROR, (char*)"")))
return 1; return TRUE;
table->file->extra(HA_EXTRA_NO_ROWS); // Don't update rows table->file->extra(HA_EXTRA_NO_ROWS); // Don't update rows
table->no_rows=1; table->no_rows=1;
......
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