Skip to content
  • Guilhem Bichot's avatar
    be8a3284
    Bug#21807579 FUNCTIONAL DEPENDENCIES ARE NOT RECOGNIZED IN GENERATED COLUMNS · be8a3284
    Guilhem Bichot authored
    We had forgotten to add support for this.
    
    Fix: re-use the same logic as for items of merged views (they wrap
    expressions too).
    
    Testing: tests for the bug are added. An existing test was wrong, it
    is corrected: in group_by_fd.inc, the line
    --error ER_WRONG_FIELD_WITH_GROUP
    before this query
     SELECT v2.pk, v2.coa
      FROM t1 LEFT JOIN v2 AS v2 ON 0
      GROUP BY v2.pk;
    is removed, because the SELECT is actually valid and must
    not send any error; it is made valid by this code change
    in aggregate_check.cc :
    - (!select->outer_join || item->type() == Item::FIELD_ITEM))
    ).
    be8a3284
    Bug#21807579 FUNCTIONAL DEPENDENCIES ARE NOT RECOGNIZED IN GENERATED COLUMNS
    Guilhem Bichot authored
    We had forgotten to add support for this.
    
    Fix: re-use the same logic as for items of merged views (they wrap
    expressions too).
    
    Testing: tests for the bug are added. An existing test was wrong, it
    is corrected: in group_by_fd.inc, the line
    --error ER_WRONG_FIELD_WITH_GROUP
    before this query
     SELECT v2.pk, v2.coa
      FROM t1 LEFT JOIN v2 AS v2 ON 0
      GROUP BY v2.pk;
    is removed, because the SELECT is actually valid and must
    not send any error; it is made valid by this code change
    in aggregate_check.cc :
    - (!select->outer_join || item->type() == Item::FIELD_ITEM))
    ).
Loading