~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memcached_query_cache/memcached_qc.cc

  • Committer: Brian Aker
  • Date: 2010-12-08 18:58:56 UTC
  • mfrom: (1976.5.4 real-trunk)
  • Revision ID: brian@tangent.org-20101208185856-577lkcj42ss9xg7s
MErge in fix for session

Show diffs side-by-side

added added

removed removed

Lines of Context:
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