Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-5491 CREATE OR REPLACE TABLE
  3. MDEV-5588

Strange error on CREATE OR REPLACE table over an existing view

    Details

    • Type: Technical task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.0.8
    • Component/s: None
    • Labels:
      None

      Description

      MariaDB [test]> create or replace view v1 as select 1;
      Query OK, 0 rows affected (0.08 sec)
      
      MariaDB [test]> create or replace table v1 as select 1;
      ERROR 1051 (42S02): Unknown table 'test.v1'
      

      There should probably be some error, but not "Unknown table", because it's confusing.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            monty Michael Widenius added a comment -

            Fixed by creating a new error message:
            "xxxx" is a view

            This will be given both in "drop table this_is_a_view' and 'create or replace this_is_a_view...'

            Show
            monty Michael Widenius added a comment - Fixed by creating a new error message: "xxxx" is a view This will be given both in "drop table this_is_a_view' and 'create or replace this_is_a_view...'
            Hide
            monty Michael Widenius added a comment -

            Fixed in my tree, soon to be pushed

            Show
            monty Michael Widenius added a comment - Fixed in my tree, soon to be pushed

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: