Skip to content
Snippets Groups Projects
Select Git revision
  • bb-10.6-midenok-MDEV-16417
  • bb-10.4-MDEV-23675
  • 10.5
  • bb-10.2-MDEV-18867
  • bb-10.3-sujatha
  • bb-10.2-sujatha
  • bb-10.5-MDEV-23456
  • bb-10.1-sujatha
  • bb-10.4-anel-MDEV-23626-connect
  • bb-10.5-midenok
  • bb-10.2-MDEV-19264-backup-slave-info
  • bb-10.2-MDEV-23456
  • bb-10.4-anel-MDEV-23589
  • 10.5-mdev21829
  • bb-10.6-midenok-MDEV-17554
  • bb-10.5-mdev23662
  • 10.2
  • bb-10.4-thiru
  • 10.1
  • bb-10.2-midenok
  • mariadb-10.5.5
  • mariadb-10.4.14
  • mariadb-10.3.24
  • mariadb-10.2.33
  • mariadb-10.1.46
  • mariadb-10.5.4
  • mariadb-10.5.3
  • mariadb-10.4.13
  • mariadb-10.3.23
  • mariadb-10.2.32
  • mariadb-10.1.45
  • mariadb-5.5.68
  • mariadb-10.5.2
  • mariadb-10.5.1
  • mariadb-10.4.12
  • mariadb-10.3.22
  • mariadb-10.2.31
  • mariadb-10.1.44
  • mariadb-5.5.67
  • mariadb-10.4.11
40 results

sql_handler.cc

Blame
    • Jon Olav Hauglid's avatar
      65163f8c
      Bug#16385711: HANDLER, CREATE TABLE IF NOT EXISTS, · 65163f8c
      Jon Olav Hauglid authored
                    PROBLEM AFTER MYSQL_HA_FIND
      
      This problem occured if a prepared statement tried to create a table
      for which there already existed a view with the same name while a
      SQL handler was opened.
      
      Before DDL statements are executed, mysql_ha_rm_tables() is called
      to remove any matching tables from the internal list of opened SQL
      handler tables. This match was done on TABLE_LIST::db and 
      TABLE_LIST::table_name. This is problematic for views (which use
      TABLE_LIST::view_db and TABLE_LIST::view_name) and anonymous
      derived tables.
      
      This patch fixes the problem by skipping TABLE_LISTs representing
      anonymous derived tables and using get_db_name()/get_table_name()
      which handles views when looking for SQL handler tables to remove.
      65163f8c
      History
      Bug#16385711: HANDLER, CREATE TABLE IF NOT EXISTS,
      Jon Olav Hauglid authored
                    PROBLEM AFTER MYSQL_HA_FIND
      
      This problem occured if a prepared statement tried to create a table
      for which there already existed a view with the same name while a
      SQL handler was opened.
      
      Before DDL statements are executed, mysql_ha_rm_tables() is called
      to remove any matching tables from the internal list of opened SQL
      handler tables. This match was done on TABLE_LIST::db and 
      TABLE_LIST::table_name. This is problematic for views (which use
      TABLE_LIST::view_db and TABLE_LIST::view_name) and anonymous
      derived tables.
      
      This patch fixes the problem by skipping TABLE_LISTs representing
      anonymous derived tables and using get_db_name()/get_table_name()
      which handles views when looking for SQL handler tables to remove.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.