• unknown's avatar
    Bug#25122: Views based on a self-joined table aren't insertable. · 1437a9c5
    unknown authored
    When INSERT is done over a view the table being inserted into is 
    checked to be unique among all views tables. But if the view contains
    self-joined table an error will be thrown even if all tables are used under
    different aliases.
    
    The unique_table() function now also checks tables' aliases when needed.
    
    
    sql/mysql_priv.h:
      Bug#25122:  Views based on a self-joined table aren't insertable.
      Updated prototype of the unique_table() function.
    sql/sql_base.cc:
      Bug#25122:  Views based on a self-joined table aren't insertable.
      Now the unique_table() function checks tables' aliases when needed.
    sql/sql_delete.cc:
      Bug#25122:  Views based on a self-joined table aren't insertable.
      Updated calls to the unique_table() function.
    sql/sql_insert.cc:
      Bug#25122:  Views based on a self-joined table aren't insertable.
      Updated calls to the unique_table() function.
    sql/sql_load.cc:
      Bug#25122:  Views based on a self-joined table aren't insertable.
      Updated calls to the unique_table() function.
    sql/sql_parse.cc:
      Bug#25122:  Views based on a self-joined table aren't insertable.
      Updated calls to the unique_table() function.
    sql/sql_update.cc:
      Bug#25122:  Views based on a self-joined table aren't insertable.
      Updated calls to the unique_table() function.
    1437a9c5
sql_base.cc 170 KB