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

Connect SE: Connection dies using table_type=pivor

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.0.3
    • Fix Version/s: 10.0.4
    • Component/s: None
    • Labels:
    • Environment:
      Linux/Ubuntu/Precise/LXContainer

      Description

      Creating a pivot table (Connect SE) and selecting from the table works.
      Doing a second select the connection dies.

       MariaDB [test]> select * from pivottet;
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      
      MariaDB [test]> create table pivottet engine=connect table_type=pivot tabname=salary;
      Query OK, 0 rows affected (0.02 sec)
      MariaDB [test]> select * from pivottet;
      +--------+------+-----+------+-----+
      | sellet | 1    | 2   | 3    | 4   |
      +--------+------+-----+------+-----+
      |      1 |  100 | 300 | 1000 |   0 |
      |      2 | 1000 | 100 |    0 |   0 |
      |      3 |    0 |   0 |    0 | 500 |
      +--------+------+-----+------+-----+
      3 rows in set (0.00 sec)
      MariaDB [test]> select * from pivottet;
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      

      That is written into the error log:

      Jul  9 10:17:56 localhost mysqld: 130709 10:17:56 [Warning] Aborted connection 264 to db: 'test' user: 'root' host: 'localhost' (Unknown error)
      

      Regards
      Erkan

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            bertrandop Olivier Bertrand added a comment -

            Sorry erkan, I wrongly thought it was working on ubuntu but it turned
            out that it did not and disconnected on the second,
            and further, tries to select the table. So this is not closed but not
            going to be solved soon because I get no information
            on the possible error. For instance, under GDB nothing is told, and
            looking at the traces I have done, mysqld disconnects
            even before creating the CONNECT thread supposed to handle the query!

            Because of this, and also on some valgring warnings, the next version of
            CONNECT will not support the PIVOT type, hoping
            that will be temporarily...
            Regards,
            Olivier

            Show
            bertrandop Olivier Bertrand added a comment - Sorry erkan, I wrongly thought it was working on ubuntu but it turned out that it did not and disconnected on the second, and further, tries to select the table. So this is not closed but not going to be solved soon because I get no information on the possible error. For instance, under GDB nothing is told, and looking at the traces I have done, mysqld disconnects even before creating the CONNECT thread supposed to handle the query! Because of this, and also on some valgring warnings, the next version of CONNECT will not support the PIVOT type, hoping that will be temporarily... Regards, Olivier
            Hide
            bertrandop Olivier Bertrand added a comment -

            Is indeed failing on Linux

            Show
            bertrandop Olivier Bertrand added a comment - Is indeed failing on Linux
            Hide
            bertrandop Olivier Bertrand added a comment -

            Further investigation shows that this bug is related to the use of the query cache. Before this is fixed (by preventing queries on PIVOT tables to be cached, as for queries on partitioned tables) a bypass is to specify the query_cache_size variable to 0. This makes the query cache not used.

            Show
            bertrandop Olivier Bertrand added a comment - Further investigation shows that this bug is related to the use of the query cache. Before this is fixed (by preventing queries on PIVOT tables to be cached, as for queries on partitioned tables) a bypass is to specify the query_cache_size variable to 0. This makes the query cache not used.
            Hide
            erkules erkan yanar added a comment -

            Ahoi Olivier,
            yes setting query_cache_size=0 worked.

            Thx!

            Show
            erkules erkan yanar added a comment - Ahoi Olivier, yes setting query_cache_size=0 worked. Thx!
            Hide
            bertrandop Olivier Bertrand added a comment -

            Because CONNECT works on external data that can be modified any time out of MariaDB, it must not use the query cache. Therefore, query cache has been permanently disabled for CONNECT tables.

            Show
            bertrandop Olivier Bertrand added a comment - Because CONNECT works on external data that can be modified any time out of MariaDB, it must not use the query cache. Therefore, query cache has been permanently disabled for CONNECT tables.

              People

              • Assignee:
                bertrandop Olivier Bertrand
                Reporter:
                erkules erkan yanar
              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 - 7 hours
                  7h