mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1 sql/sql_select.cc: Auto merged
This commit is contained in:
@@ -5292,7 +5292,14 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
||||
*(reg_field++) =new_field;
|
||||
}
|
||||
if (!--hidden_field_count)
|
||||
{
|
||||
hidden_null_count=null_count;
|
||||
/*
|
||||
We need to update hidden_field_count as we may have stored group
|
||||
functions with constant arguments
|
||||
*/
|
||||
param->hidden_field_count= (uint) (reg_field - table->field);
|
||||
}
|
||||
}
|
||||
DBUG_ASSERT(field_count >= (uint) (reg_field - table->field));
|
||||
field_count= (uint) (reg_field - table->field);
|
||||
@@ -5488,7 +5495,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
||||
}
|
||||
}
|
||||
|
||||
if (distinct)
|
||||
if (distinct && field_count != param->hidden_field_count)
|
||||
{
|
||||
/*
|
||||
Create an unique key or an unique constraint over all columns
|
||||
|
||||
Reference in New Issue
Block a user