• unknown's avatar
    Fixed bug #34763. · 9699767c
    unknown authored
    Queries like:
    
      SELECT ROW(1, 2) IN (SELECT t1.a, 2)
        FROM t1 GROUP BY t1.a
    
    or 
    
      SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2)
        FROM t1 GROUP BY t1.a
    
    lead to assertion failure in the
    Item_in_subselect::row_value_transformer method in debugging
    build, or to unexpected error message in release build:
    
      ERROR 1247 (42S22): Reference '<list ref>' not supported (forward
                          reference in item list)
    
    Unexpected error message and assertion failure have been
    eliminated.
    
    
    mysql-test/r/subselect3.result:
      Added test case for bug #34763.
    mysql-test/t/subselect3.test:
      Added test case for bug #34763.
    sql/item.cc:
      Fixed bug #34763.
      The Item_ref::fix_fields method has been modified to silently
      ignore not fixed outer references: by the definition, those
      references should be fixed later by the call to the
      fix_inner_refs function.
    sql/item_subselect.cc:
      Fixed bug #34763.
      The Item_in_subselect::row_value_transformer method has been
      modified to eliminate assertion failure on not fixed outer
      references: by the definition those references are allowed in
      this context and should be fixed later by the call to the
      fix_inner_refs function.
    9699767c
item_subselect.cc 67.2 KB