• unknown's avatar
    Bug#24562 (ALTER TABLE ... ORDER BY ... with complex expression asserts) · d4ee8ceb
    unknown authored
    WL#3681 (ALTER TABLE ORDER BY)
    
    Before this fix, the ALTER TABLE statement implemented an ORDER BY option
    with the following characteristics :
    
    1) The order by clause accepts a list of criteria, with optional ASC or
    DESC keywords
    
    2) Each criteria can be a general expression, involving operators,
    native functions, stored functions, user defined functions, subselects ...
    
    With this fix :
    
    1) has been left unchanged, since it's a de-facto existing feature,
    that was already present in the code base and partially covered in the test
    suite. Code coverage for ASC and DESC was missing and has been improved.
    
    2) has been changed to limit the kind of criteria that are permissible:
    now only a column name is valid.
    
    
    mysql-test/r/alter_table.result:
      Prevent ALTER TABLE ORDER BY clauses to use general expressions.
    mysql-test/t/alter_table.test:
      Prevent ALTER TABLE ORDER BY clauses to use general expressions.
    sql/sql_yacc.yy:
      Prevent ALTER TABLE ORDER BY clauses to use general expressions.
    d4ee8ceb
alter_table.test 14.7 KB