diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2002-09-03 21:31:08 +0300 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2002-09-03 21:31:08 +0300 |
commit | af6a7eebe4f0bcd246662e672827c7ad124f1806 (patch) | |
tree | 5411790687a150e37d38ad8e069d20de34dbe08c /sql/sql_select.cc | |
parent | 2c121b068c49bf33bd8a8f9eec3fa8e13de39d92 (diff) | |
download | mariadb-git-af6a7eebe4f0bcd246662e672827c7ad124f1806.tar.gz |
a small fix for a distinct query
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 11b89722017..6402e29a3ef 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -640,8 +640,8 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds, DBUG_PRINT("info",("Creating tmp table")); thd->proc_info="Creating tmp table"; - join.tmp_table_param.hidden_field_count=(all_fields.elements- - fields.elements); + join.tmp_table_param.hidden_field_count= + (all_fields.elements > fields.elements) ? (all_fields.elements- fields.elements) : 0; if (!(tmp_table = create_tmp_table(thd,&join.tmp_table_param,all_fields, ((!simple_group && !procedure && |