~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

MErge Padraig

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
  Open_tables_state(refresh_version),
179
179
  mem_root(&main_mem_root),
180
180
  lex(&main_lex),
 
181
  query(),
181
182
  client(client_arg),
182
183
  scheduler(NULL),
183
184
  scheduler_arg(NULL),
228
229
  thread_id= 0;
229
230
  file_id = 0;
230
231
  query_id= 0;
231
 
  query= NULL;
232
 
  query_length= 0;
233
232
  warn_query_id= 0;
234
233
  memset(ha_data, 0, sizeof(ha_data));
235
234
  mysys_var= 0;
755
754
    in_packet_length--;
756
755
  }
757
756
 
758
 
  /* We must allocate some extra memory for the cached query string */
759
 
  query_length= 0; /* Extra safety: Avoid races */
760
 
  query= (char*) memdup_w_gap((unsigned char*) in_packet, in_packet_length, db.length() + 1);
761
 
  if (! query)
762
 
    return false;
763
 
 
764
 
  query[in_packet_length]=0;
765
 
  query_length= in_packet_length;
 
757
  query.assign(in_packet, in_packet + in_packet_length);
766
758
 
767
759
  return true;
768
760
}
1683
1675
  return(session->charset());
1684
1676
}
1685
1677
 
1686
 
char **session_query(Session *session)
1687
 
{
1688
 
  return(&session->query);
1689
 
}
1690
 
 
1691
1678
int session_non_transactional_update(const Session *session)
1692
1679
{
1693
1680
  return(session->transaction.all.hasModifiedNonTransData());