• unknown's avatar
    BUG#21635: MYSQL_FIELD struct's member strings seem to misbehave for · 18770d2f
    unknown authored
    expression cols.
    
    The problem was that MYSQL_FIELD::org_name was set for MIN() and MAX()
    functions (COUNT() is also mentioned in the bug report but was already
    fixed).
    
    After this patch for expressions MYSQL_FIELD::name is set to either
    expression itself or its alias, and other data origin fields of
    MYSQL_FILED (db, org_table, table, org_name) are empty strings.
    
    
    sql/item_sum.cc:
      For expressions only col_name should be non-empty string.
    tests/mysql_client_test.c:
      Add test case for bug#21635: MYSQL_FIELD struct's member strings seem
      to misbehave for expression cols.
    18770d2f
item_sum.cc 46.1 KB