diff options
author | monty@donna.mysql.fi <> | 2001-03-24 20:15:14 +0200 |
---|---|---|
committer | monty@donna.mysql.fi <> | 2001-03-24 20:15:14 +0200 |
commit | aa115733800a27fb5ba1f9dd9a3f05b1ec8ec445 (patch) | |
tree | e705394f8291c4c2268717e3fb70734414d0f1d9 /sql/sql_select.cc | |
parent | 2531f38803ff6804d6b195cb4f52cc55365435ed (diff) | |
download | mariadb-git-aa115733800a27fb5ba1f9dd9a3f05b1ec8ec445.tar.gz |
Added defines for fast mutex in glibc 2.2 (should be safe)
Fixed crash in SELECT DISTINCT SUM(...)
Fix return value of mysortncmp() for innobase
Fix join_crash bug
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 1aa6d1b8ff3..720226033e6 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -712,7 +712,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds, } if (tmp_table->distinct) - select_distinct=0; /* Each row is uniq */ + select_distinct=0; /* Each row is unique */ join_free(&join); /* Free quick selects */ if (select_distinct && ! group) @@ -3635,7 +3635,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields, in the first 'hidden_null_pack_length' bytes of the row. */ null_pack_length-=hidden_null_pack_length; - keyinfo->key_parts=field_count+ test(null_pack_length); + keyinfo->key_parts= ((field_count-hidden_field_count)+ + test(null_pack_length)); if (allow_distinct_limit) { set_if_smaller(table->max_rows,thd->select_limit); @@ -3673,6 +3674,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields, key_part_info->type= HA_KEYTYPE_BINARY; key_part_info++; } + /* Create a distinct key over the columns we are going to return */ for (i=param->hidden_field_count, reg_field=table->field + i ; i < field_count; i++, reg_field++, key_part_info++) |