Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.12
    • Fix Version/s: 10.0.14
    • Component/s: None
    • Labels:

      Description

      If I try to create a file-based CONNECT table, an error message tells me that temp CONNECT tables are not supported. But I was able to create a MYSQL table, which returns junk results when queried:

      MariaDB [test]> CREATE TABLE t SELECT 10, 'test', 'prova';
      Query OK, 1 row affected (0.42 sec)
      Records: 1  Duplicates: 0  Warnings: 0
      
      MariaDB [test]> CREATE TEMPORARY TABLE tempmy ENGINE=CONNECT, TABLE_TYPE=MYSQL, CONNECTION='mysql://root:root@127.0.0.1/test/t';
      Query OK, 0 rows affected (0.28 sec)
      
      MariaDB [test]> SELECT * FROM tempmy;
      +----+------+-------+
      | 10 | test | prova |
      +----+------+-------+
      |  0 |      |       |
      +----+------+-------+
      1 row in set (0.00 sec)
      

      Instead, I would expect to see an error after CREATE TABLE.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            bertrandop Olivier Bertrand added a comment -

            Indeed temporary CONNECT tables are not supported. This is indicated to MariaDB by the flag:

            connect_hton->flags= HTON_TEMPORARY_NOT_SUPPORTED;
            

            For instance trying to do:

            CREATE TEMPORARY  TABLE  t1 (
            a int not null
            ) ENGINE=CONNECT table_type=MYSQL  CONNECTION='mysql://root@127.0.0.1/test/t2';
            

            is not accepted and returns the error message:

            Table storage engine 'CONNECT' does not support the option 'TEMPORARY'
            

            This is probably tested by the parser and MariaDB issues this message.

            However in the present case MariaDB fails to test it and leaves the creation to be executed. The junk return is normal because CONNECT is not made to retrieve memory data.

            My feeling is that this is not a CONNECT problem but a problem with MariaDB not stopping the create of a temporary table when it should do it.

            Show
            bertrandop Olivier Bertrand added a comment - Indeed temporary CONNECT tables are not supported. This is indicated to MariaDB by the flag: connect_hton->flags= HTON_TEMPORARY_NOT_SUPPORTED; For instance trying to do: CREATE TEMPORARY TABLE t1 ( a int not null ) ENGINE=CONNECT table_type=MYSQL CONNECTION='mysql: //root@127.0.0.1/test/t2'; is not accepted and returns the error message: Table storage engine 'CONNECT' does not support the option 'TEMPORARY' This is probably tested by the parser and MariaDB issues this message. However in the present case MariaDB fails to test it and leaves the creation to be executed. The junk return is normal because CONNECT is not made to retrieve memory data. My feeling is that this is not a CONNECT problem but a problem with MariaDB not stopping the create of a temporary table when it should do it.
            Hide
            f_razzoli Federico Razzoli added a comment -

            I tried the following:

            MariaDB [test]> CREATE TABLE t SELECT 10 c;
            Query OK, 1 row affected (0.46 sec)
            Records: 1  Duplicates: 0  Warnings: 0
            
            MariaDB [test]> CREATE OR REPLACE TEMPORARY TABLE tempmy ENGINE=CONNECT, TABLE_TYPE=MYSQL, CONNECTION='mysql://root:root@127.0.0.1/test/t';
            Query OK, 0 rows affected (0.16 sec)
            
            MariaDB [test]> CREATE OR REPLACE TEMPORARY TABLE tempmy (c INT) ENGINE=CONNECT, TABLE_TYPE=MYSQL, CONNECTION='mysql://root:root@127.0.0.1/test/t';
            ERROR 1478 (HY000): Table storage engine 'CONNECT' does not support the create option 'TEMPORARY'
            

            Note that the only difference between the 2 statements is that the latter uses table discovery. I hope this helps - if not, please ignore or delete this comment.

            Show
            f_razzoli Federico Razzoli added a comment - I tried the following: MariaDB [test]> CREATE TABLE t SELECT 10 c; Query OK, 1 row affected (0.46 sec) Records: 1 Duplicates: 0 Warnings: 0 MariaDB [test]> CREATE OR REPLACE TEMPORARY TABLE tempmy ENGINE=CONNECT, TABLE_TYPE=MYSQL, CONNECTION='mysql://root:root@127.0.0.1/test/t'; Query OK, 0 rows affected (0.16 sec) MariaDB [test]> CREATE OR REPLACE TEMPORARY TABLE tempmy (c INT) ENGINE=CONNECT, TABLE_TYPE=MYSQL, CONNECTION='mysql://root:root@127.0.0.1/test/t'; ERROR 1478 (HY000): Table storage engine 'CONNECT' does not support the create option 'TEMPORARY' Note that the only difference between the 2 statements is that the latter uses table discovery. I hope this helps - if not, please ignore or delete this comment.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                f_razzoli Federico Razzoli
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m