Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-9419

CREATE TABLE succeeds w/ read_only mode enabled.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5(EOL), 10.0(EOL), 10.1(EOL)
    • 10.1.26, 5.5.57, 10.0.32, 10.2.8
    • Red Hat Enterprise Linux Server release 6.5 (Santiago)
      Linux 2.6.32-431.46.2.el6.x86_64 #1 SMP Mon Dec 15 14:20:02 EST 2014 x86_64 x86_64 x86_64 GNU/Linux

    Description

      When the server is running in read_only mode, and when connected as a user that does not have the SUPER privilege, it is possible to create a real table if a temporary table with the same name already exists.

      MariaDB [test]> CREATE TABLE test1 (id INT);
      ERROR 1290 (HY000): The MariaDB server is running with the --read-only option so it cannot execute this statement
       
      MariaDB [test]> CREATE TEMPORARY TABLE test1 (id INT);
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> CREATE TABLE test1 (id INT);
      Query OK, 0 rows affected (0.01 sec)
       
      MariaDB [test]> DROP TEMPORARY TABLE test1;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> DESCRIBE test1;
      +-------+---------+------+-----+---------+-------+
      | Field | Type    | Null | Key | Default | Extra |
      +-------+---------+------+-----+---------+-------+
      | id    | int(11) | YES  |     | NULL    |       |
      +-------+---------+------+-----+---------+-------+
      1 row in set (0.00 sec)

      As you can see, the real table persists.

      Incidentally, this happens both when binary logging is enabled and when it is not.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            meddy Michael Eddy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.