Skip to content
  • Libing Song's avatar
    53fdfe1c
    WL#5576 Prohibit CREATE TABLE ... SELECT to modify other tables · 53fdfe1c
    Libing Song authored
    BUG#11749792 and BUG#11763193 are fixed by this worklog.
          
    In 'CREATE TABLE ... SELECT' statement, SELECT clause could call store functions
    to modify other tables. It made CTS's behavior towards complex and not
    understandable. It also caused some binlogging problem. So the behavior modifying
    other tables is prohibited in this worklog.
          
    In this patch, code is added to check if there is any other table owning WRITE
    lock just after all tables have been locked. CREATE TABLE ... SELECT will fail
    and print an error immediately if any other table has WRITE lock.
    As SELECT ... FOR UPDATE uses WRITE lock too. FOR UPDATE clause is also
    prohibited in CREATE TABLE ... SELECT statement.
    53fdfe1c
    WL#5576 Prohibit CREATE TABLE ... SELECT to modify other tables
    Libing Song authored
    BUG#11749792 and BUG#11763193 are fixed by this worklog.
          
    In 'CREATE TABLE ... SELECT' statement, SELECT clause could call store functions
    to modify other tables. It made CTS's behavior towards complex and not
    understandable. It also caused some binlogging problem. So the behavior modifying
    other tables is prohibited in this worklog.
          
    In this patch, code is added to check if there is any other table owning WRITE
    lock just after all tables have been locked. CREATE TABLE ... SELECT will fail
    and print an error immediately if any other table has WRITE lock.
    As SELECT ... FOR UPDATE uses WRITE lock too. FOR UPDATE clause is also
    prohibited in CREATE TABLE ... SELECT statement.
Loading