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

Create CONNECT table fails if no db is selected BUT db is specified in CREATE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.7
    • 10.0.8
    • None
    • None

    Description

      The same CREATE statement works fine if a default db is selected. If a db is not selected, but it is specified in CREATE, the statement returns an error.
      Note that:

      • only happens with CONNECT
      • the same applies to DROP TABLE

      MariaDB [(none)]> CREATE TABLE `test`.`tdir`
          -> (
          -> DRIVE     CHAR(2) NOT NULL,
          -> PATH      VARCHAR(256) NOT NULL,
          -> FNAME     VARCHAR(256) NOT NULL,
          -> FTYPE     CHAR(4) NOT NULL,
          -> SIZE      DOUBLE(12,0) NOT NULL FLAG=5,
          -> MODIFIED  DATETIME NOT NULL
          -> )
          -> ENGINE = CONNECT
          -> TABLE_TYPE = DIR
          -> FILE_NAME = '/tmp'
          -> ;
      ERROR 1046 (3D000): No database selected
      MariaDB [(none)]> USE `test`;
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A
       
      Database changed
      MariaDB [test]> CREATE TABLE `test`.`tdir`
          -> (
          -> DRIVE     CHAR(2) NOT NULL,
          -> PATH      VARCHAR(256) NOT NULL,
          -> FNAME     VARCHAR(256) NOT NULL,
          -> FTYPE     CHAR(4) NOT NULL,
          -> SIZE      DOUBLE(12,0) NOT NULL FLAG=5,
          -> MODIFIED  DATETIME NOT NULL
          -> )
          -> ENGINE = CONNECT
          -> TABLE_TYPE = DIR
          -> FILE_NAME = '/tmp'
          -> ;
      Query OK, 0 rows affected (0.09 sec)

      Attachments

        Activity

          People

            bertrandop Olivier Bertrand
            f_razzoli Federico Razzoli
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.