Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
5.1.67, 5.2.14, 5.3.12, 5.5.38, 10.0.12
-
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.