~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/memcached_query_cache/memcached_qc.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-12-21 16:39:40 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20101221163940-c1pfo1jjvx7909xq
Tags: 2010.12.06-0ubuntu1
* New upstream release.
* Added libaio-dev build depend for InnoDB.
* Removed libpcre patch - applied upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* 
2
 
 * Copyright (c) 2010, Djellel Eddine Difallah
 
2
 * Copyright (C) 2010 Djellel Eddine Difallah
3
3
 * All rights reserved.
4
4
 *
5
5
 * Redistribution and use in source and binary forms, with or without
90
90
  if (sysvar_memcached_qc_enable && isSelect(session->query))
91
91
  {
92
92
    /* ToDo: Check against the cache content */
93
 
    string query= session->query+session->db;
 
93
    string query= session->query + *session->schema();
94
94
    char* key= md5_key(query.c_str());
95
95
    if(queryCacheService.isCached(key))
96
96
    {
191
191
  if (sysvar_memcached_qc_enable && session->lex->isCacheable())
192
192
  {
193
193
    /* Prepare and set the key for the session */
194
 
    string query= session->query+session->db;
 
194
    string query= session->query + *session->schema();
195
195
    char* key= md5_key(query.c_str());
196
196
 
197
197
    /* make sure only one thread will cache the query 
209
209
  
210
210
      /* setting the resultset infos */
211
211
      resultset->set_key(session->query_cache_key);
212
 
      resultset->set_schema(session->db);
 
212
      resultset->set_schema(*session->schema());
213
213
      resultset->set_sql(session->query);
214
214
      pthread_mutex_unlock(&mutex);
215
215