Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.1.12
    • 3.1.18
    • General
    • None
    • AlmaLinux 8.7
      MariaDB connector ODBC 3.1.12
      MariaDB 10.3.35

    Description

      When using the ODBC connector to run an OPTIMIZE TABLE query no resultset is returned, subsequent queries to the database then result in an "Unknown MySQL error".

      When using isql with MariaDB connector ODBC 3.1.12

      SQL> SELECT object_id FROM bc_bcde_index.object LIMIT 1;
      +-----------+
      | object_id |
      +-----------+
      | 1         |
      +-----------+
      SQLRowCount returns 1
      1 rows fetched
      SQL> OPTIMIZE TABLE bc_bcde_index.object;
      SQLRowCount returns 0
      SQL> SELECT object_id FROM bc_bcde_index.object LIMIT 1;
      [S1000][ma-3.1.12][10.3.35-MariaDB]Unknown MySQL error
      [ISQL]ERROR: Could not SQLPrepare
      

      When using isql with MySQL Connector/ODBC 8.0.31

      SQL> SELECT object_id FROM bc_bcde_index.object LIMIT 1;
      +------------+
      | object_id  |
      +------------+
      | 1          |
      +------------+
      SQLRowCount returns 1
      1 rows fetched
      SQL> OPTIMIZE TABLE bc_bcde_index.object;
      +---------------------------------------------------------------------------------------------------------------------------------+-----------+-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Table                                                                                                                           | Op        | Msg_type  | Msg_text                                                                                                                                                                                                                                                                                                    |
      +---------------------------------------------------------------------------------------------------------------------------------+-----------+-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | bc_bcde_index.object                                                                                                            | optimize  | note      | Table does not support optimize, doing recreate + analyze instead                                                                                                                                                                                                                                           |
      | bc_bcde_index.object                                                                                                            | optimize  | status    | OK                                                                                                                                                                                                                                                                                                          |
      +---------------------------------------------------------------------------------------------------------------------------------+-----------+-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      SQLRowCount returns 2
      2 rows fetched
      SQL> SELECT object_id FROM bc_bcde_index.object LIMIT 1;
      +------------+
      | object_id  |
      +------------+
      | 1          |
      +------------+
      SQLRowCount returns 1
      1 rows fetched
      

      ANALZYE TABLE does not result in the same issue.

      Attachments

        Activity

          callum.walker Callum Walker created issue -
          callum.walker Callum Walker made changes -
          Field Original Value New Value
          Environment AlmaLinux 8.7
          MariaDB connector ODBC 3.1.12
          AlmaLinux 8.7
          MariaDB connector ODBC 3.1.12
          MariaDB 10.3.35
          Lawrin Lawrin Novitsky made changes -
          Fix Version/s 3.1.18 [ 28432 ]
          Lawrin Lawrin Novitsky made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]

          Thank you for the report! The fix has been pushed to the master branch

          Lawrin Lawrin Novitsky added a comment - Thank you for the report! The fix has been pushed to the master branch
          Lawrin Lawrin Novitsky made changes -
          Resolution Fixed [ 1 ]
          Status Confirmed [ 10101 ] Closed [ 6 ]

          People

            Lawrin Lawrin Novitsky
            callum.walker Callum Walker
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.