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

LP:986739 - sql-bench/test-table-elimination fails with SQL syntax error on OPTIMIZE if executed with --fast

Details

    Description

      Got error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(0x1a19340)' at line 1 when executing 'OPTIMIZE TABLE'

      Offending query as it's written into the general log:

      OPTIMIZE TABLE ARRAY(0x1a19340)

      If sql-bench/test-table-elimination is executed with --fast option (and assuming that bug #986731 is fixed), it calls 'vacuum' subroutine which, in turn, attempts to run OPTIMIZE TABLE. The 'vacuum' subroutine expects that the tables for OPTIMIZE are provided as an array, but test-table-elimination calls it with a reference to an array. The following change seems to fix the problem:

      @@ -199,12 +199,12 @@

      if ($opt_fast && defined($server->

      {vacuum}

      ))

      { - $server->vacuum(0,\$dbh,["elim_facts", "elim_attr1", "elim_attr2"]); + $server->vacuum(0,\$dbh,("elim_facts", "elim_attr1", "elim_attr2")); }

      Reproducible on maria-5.1

      bzr version-info
      revision-id: <email address hidden>
      date: 2012-04-06 13:31:33 +0500
      build-date: 2012-04-22 05:08:00 +0400
      revno: 3146

      Same code in other versions.

      To reproduce,

      • start MariaDB server;
      • run test-table-elimination --socket=<socket> --fast
        (if it fails with a syntax error in LOCK TABLES, fix bug #986731 first).

      Attachments

        Activity

          Launchpad bug id: 986739

          ratzpo Rasmus Johansson (Inactive) added a comment - Launchpad bug id: 986739
          elenst Elena Stepanova created issue -
          ratzpo Rasmus Johansson (Inactive) made changes -
          Field Original Value New Value
          Labels Launchpad
          ratzpo Rasmus Johansson (Inactive) made changes -
          Labels Launchpad MariaDB_5.1
          ratzpo Rasmus Johansson (Inactive) made changes -
          Labels MariaDB_5.1 Launchpad MariaDB_5.1
          ratzpo Rasmus Johansson (Inactive) made changes -
          Fix Version/s Maria 5.1 [ 11600 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Key IMT-7731 MDEV-772
          Project ImportTest [ 10200 ] MariaDB Development [ 10000 ]
          Workflow jira [ 21380 ] defaullt [ 21616 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 5.5.29 [ 11701 ]
          Fix Version/s 5.3.10 [ 11500 ]
          Fix Version/s 5.2.13 [ 10800 ]
          Fix Version/s 5.1.65 [ 10801 ]
          serg Sergei Golubchik made changes -
          Labels Launchpad MariaDB_5.1 Launchpad
          elenst Elena Stepanova made changes -
          Affects Version/s 5.3.9 [ 11000 ]

          Fixed in 5.3

          psergei Sergei Petrunia added a comment - Fixed in 5.3
          psergei Sergei Petrunia made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow defaullt [ 21616 ] MariaDB v2 [ 45703 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 45703 ] MariaDB v3 [ 62867 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 62867 ] MariaDB v4 [ 146119 ]

          People

            psergei Sergei Petrunia
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.