1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fix for bug #3874 (Group by field is not considered)

mysql-test/r/select.result:
  test result fixed
mysql-test/t/select.test:
  test case added
sql/sql_select.cc:
  do the same for nullable
This commit is contained in:
unknown
2005-10-13 19:23:52 +05:00
parent 6c89848de9
commit 2e887f794a
3 changed files with 58 additions and 1 deletions

View File

@@ -3115,7 +3115,7 @@ eq_ref_table(JOIN *join, ORDER *start_order, JOIN_TAB *tab)
tab->cached_eq_ref_table=1;
if (tab->type == JT_CONST) // We can skip const tables
return (tab->eq_ref_table=1); /* purecov: inspected */
if (tab->type != JT_EQ_REF)
if (tab->type != JT_EQ_REF || tab->table->maybe_null)
return (tab->eq_ref_table=0); // We must use this
Item **ref_item=tab->ref.items;
Item **end=ref_item+tab->ref.key_parts;