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

QUERY CACHE - Query Cache And Autocommit

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.1.67, 5.2.14, 5.3.12, 5.5.38, 10.0.12
    • 5.5
    • None

    Description

      I was using Maria 10.0.10 today and was banging my head against a wall for a few hours trying to figure out why my queries were missing the query cache.

      http://bugs.mysql.com/bug.php?id=42197

      I am working on a legacy PERL project that spawns many short-lived processes that connect to the database and do a single query before exiting.

      my $dsn = "dbi:mysql:database=test";
      my $dbh = DBI->connect($dsn, undef, undef, {RaiseError => 0, AutoCommit => 0});
       
      # 1. Prepare query
      # 2. Executed query (misses cache)
      # 3. Process result

      When DBI connects to the SQL server, the first thing it does is issue the "SET" command and then the query comes quickly behind it:

      SET AUTOCOMMIT=0;
      SELECT * FROM test;

      When it then executes its query, it misses the query cache every time.

      Attachments

        Activity

          People

            Unassigned Unassigned
            belugabehr BELUGABEHR
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.