• unknown's avatar
    Bug #32400: Complex SELECT query returns correct result · 870d4681
    unknown authored
     only on some occasions
    
    Referencing an element from the SELECT list in a WHERE 
    clause is not permitted. The namespace of the WHERE
    clause is the table columns only. This was not enforced
    correctly when resolving outer references in sub-queries.
    
    Fixed by not allowing references to aliases in a 
    sub-query in WHERE.
    
    
    mysql-test/include/ps_query.inc:
      Bug #32400: fixed old test queries
    mysql-test/r/ps_2myisam.result:
      Bug #32400: fixed old test queries
    mysql-test/r/ps_3innodb.result:
      Bug #32400: fixed old test queries
    mysql-test/r/ps_4heap.result:
      Bug #32400: fixed old test queries
    mysql-test/r/ps_5merge.result:
      Bug #32400: fixed old test queries
    mysql-test/r/ps_6bdb.result:
      Bug #32400: fixed old test queries
    mysql-test/r/ps_7ndb.result:
      Bug #32400: fixed old test queries
    mysql-test/r/subselect.result:
      Bug #32400: test case
    mysql-test/t/subselect.test:
      Bug #32400: test case
    sql/item.cc:
      Bug #32400: don't allow references to aliases in WHERE
    tests/mysql_client_test.c:
      Bug #32400: fixed old test queries
    870d4681
ps_7ndb.result 103 KB