• unknown's avatar
    Bug #21392: multi-table delete with alias table name fails with · 1431966d
    unknown authored
                1003: Incorrect table name
    in multi-table DELETE the set of tables to delete from actually 
    references then tables in the other list, e.g:
    DELETE alias_of_t1 FROM t1 alias_of_t1 WHERE ....
    is a valid statement.
    So we must turn off table name syntactical validity check for alias_of_t1 
    because it's not a table name (even if it looks like one).
    In order to do that we add a special flag (TL_OPTION_ALIAS) to 
    disable the name checking for the aliases in multi-table DELETE.
    
    
    mysql-test/r/delete.result:
      Bug #21392: multi-table delete with alias table name fails with
                  1003: Incorrect table name
       - test case
    mysql-test/t/delete.test:
      Bug #21392: multi-table delete with alias table name fails with
                  1003: Incorrect table name
       - test case
    sql/mysql_priv.h:
      Bug #21392: multi-table delete with alias table name fails with
                  1003: Incorrect table name
       - add a special flag to disable the name checking for the aliases
         in multi-table DELETE
    sql/sql_parse.cc:
      Bug #21392: multi-table delete with alias table name fails with
                  1003: Incorrect table name
       - add a special flag to disable the name checking for the aliases
         in multi-table DELETE
    sql/sql_yacc.yy:
      Bug #21392: multi-table delete with alias table name fails with
                  1003: Incorrect table name
       - add a special flag to disable the name checking for the aliases
         in multi-table DELETE
    1431966d
delete.test 4.38 KB