~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memcached_query_cache/memcached_qc.cc

  • Committer: Lee Bieber
  • Date: 2011-02-21 21:20:44 UTC
  • mfrom: (2187.1.2 build)
  • Revision ID: kalebral@gmail.com-20110221212044-x1j9pmv0230febuz
Merge Brian - getLex() usage and fix for table_name creation during admin commands.
Merge Olaf - Use List::begin() and Use List::iterator instead of List_iterator_fast

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
  {
177
177
    if (strcasecmp(tmp_table->db, "DATA_DICTIONARY") == 0)
178
178
    {
179
 
      session->lex->setCacheable(false);
 
179
      session->getLex()->setCacheable(false);
180
180
      break;
181
181
    }
182
182
  } 
187
187
 */
188
188
bool MemcachedQueryCache::doPrepareResultset(Session *session)
189
189
{               
190
 
  checkTables(session, session->lex->query_tables);
191
 
  if (sysvar_memcached_qc_enable && session->lex->isCacheable())
 
190
  checkTables(session, session->getLex()->query_tables);
 
191
  if (sysvar_memcached_qc_enable && session->getLex()->isCacheable())
192
192
  {
193
193
    /* Prepare and set the key for the session */
194
194
    string query= session->query + *session->schema();
227
227
bool MemcachedQueryCache::doSetResultset(Session *session)
228
228
{               
229
229
  message::Resultset *resultset= session->getResultsetMessage();
230
 
  if (sysvar_memcached_qc_enable && (not session->is_error()) && resultset != NULL && session->lex->isCacheable())
 
230
  if (sysvar_memcached_qc_enable && (not session->is_error()) && resultset != NULL && session->getLex()->isCacheable())
231
231
  {
232
232
    /* Generate the final Header */
233
 
    queryCacheService.setResultsetHeader(*resultset, session, session->lex->query_tables);
 
233
    queryCacheService.setResultsetHeader(*resultset, session, session->getLex()->query_tables);
234
234
    /* serialize the Resultset Message */
235
235
    std::string output;
236
236
    resultset->SerializeToString(&output);