~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.h

  • Committer: Brian Aker
  • Date: 2010-05-21 06:06:10 UTC
  • mfrom: (1537.2.3 status_var_changes)
  • Revision ID: brian@gaz-20100521060610-2n0zkhk6yvfjdta4
Merge Joe, stats.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include <drizzled/sql_error.h>
32
32
#include <drizzled/file_exchange.h>
33
33
#include <drizzled/select_result_interceptor.h>
 
34
#include <drizzled/statistics_variables.h>
34
35
#include <drizzled/xid.h>
35
36
#include "drizzled/query_id.h"
36
37
#include "drizzled/named_savepoint.h"
226
227
namespace drizzled
227
228
{
228
229
 
229
 
/**
230
 
 * Per-session local status counters
231
 
 */
232
 
typedef struct system_status_var
233
 
{
234
 
  uint64_t bytes_received;
235
 
  uint64_t bytes_sent;
236
 
  ulong com_other;
237
 
  ulong created_tmp_disk_tables;
238
 
  ulong created_tmp_tables;
239
 
  ulong ha_commit_count;
240
 
  ulong ha_delete_count;
241
 
  ulong ha_read_first_count;
242
 
  ulong ha_read_last_count;
243
 
  ulong ha_read_key_count;
244
 
  ulong ha_read_next_count;
245
 
  ulong ha_read_prev_count;
246
 
  ulong ha_read_rnd_count;
247
 
  ulong ha_read_rnd_next_count;
248
 
  ulong ha_rollback_count;
249
 
  ulong ha_update_count;
250
 
  ulong ha_write_count;
251
 
  ulong ha_prepare_count;
252
 
  ulong ha_savepoint_count;
253
 
  ulong ha_savepoint_rollback_count;
254
 
 
255
 
  /* KEY_CACHE parts. These are copies of the original */
256
 
  ulong key_blocks_changed;
257
 
  ulong key_blocks_used;
258
 
  ulong key_cache_r_requests;
259
 
  ulong key_cache_read;
260
 
  ulong key_cache_w_requests;
261
 
  ulong key_cache_write;
262
 
  /* END OF KEY_CACHE parts */
263
 
 
264
 
  ulong net_big_packet_count;
265
 
  ulong select_full_join_count;
266
 
  ulong select_full_range_join_count;
267
 
  ulong select_range_count;
268
 
  ulong select_range_check_count;
269
 
  ulong select_scan_count;
270
 
  ulong long_query_count;
271
 
  ulong filesort_merge_passes;
272
 
  ulong filesort_range_count;
273
 
  ulong filesort_rows;
274
 
  ulong filesort_scan_count;
275
 
  /*
276
 
    Number of statements sent from the client
277
 
  */
278
 
  ulong questions;
279
 
 
280
 
  /*
281
 
    IMPORTANT!
282
 
    SEE last_system_status_var DEFINITION BELOW.
283
 
 
284
 
    Below 'last_system_status_var' are all variables which doesn't make any
285
 
    sense to add to the /global/ status variable counter.
286
 
  */
287
 
  double last_query_cost;
288
 
} system_status_var;
289
 
 
290
 
/*
291
 
  This is used for 'SHOW STATUS'. It must be updated to the last ulong
292
 
  variable in system_status_var which is makes sens to add to the global
293
 
  counter
294
 
*/
295
 
 
296
 
#define last_system_status_var questions
297
 
 
298
230
void mark_transaction_to_rollback(Session *session, bool all);
299
231
 
300
232
extern pthread_mutex_t LOCK_xid_cache;
301
233
extern HASH xid_cache;
302
234
 
303
 
 
304
235
/**
305
236
  Storage engine specific thread local data.
306
237
*/