[MDEV-5486] Create CONNECT table fails if no db is selected BUT db is specified in CREATE Created: 2013-12-23  Updated: 2013-12-31  Resolved: 2013-12-31

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.7
Fix Version/s: 10.0.8

Type: Bug Priority: Major
Reporter: Federico Razzoli Assignee: Olivier Bertrand
Resolution: Fixed Votes: 0
Labels: 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)



 Comments   
Comment by Olivier Bertrand [ 2013-12-31 ]

as rev-3939

Generated at Thu Feb 08 07:04:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.