~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statistics_variables.h

  • Committer: Prafulla Tekawade
  • Date: 2010-08-06 11:21:12 UTC
  • mto: (1711.1.21 build) (1725.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1714.
  • Revision ID: prafulla_t@users.sourceforge.net-20100806112112-7w5u0s3nx9u67nzt
Fix for Bug 586051

1. test_if_ref method which checks whether predicate is already evaluated
   due to ref/eq_ref access or not was incorrectly removing a predicate 
   that was not implicitly evaluated due to ref access (due to presence of filesort ?)
   It was field=NULL predicate.
   Such predicate should be kept and execution engine will filter out rows
   correctly. Removal of such predicate led to returning of rows which had
   NULL for join/predicate columns.
2. field COMP_OP NULL will always false for all fields except when COMP_OP
   is NULL-safe equality operator. Modified range optimizer to return zero
   row count in such cases.
   Query now does not even run. It returns zero result. As such Fix(1) is not
   required but we might hit that case in some other query (I have not tried it
   yet)
3. Fixed Field::val_str to print "NULL" for literal NULL instead of "0". It
   added lot of confusion while debugging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
typedef struct global_counters
34
34
{
35
35
  uint64_t max_used_connections;
36
 
  uint64_t connections;
37
36
  uint64_t locks_immediate;
38
37
  uint64_t locks_waited;
39
38
} global_counters;
69
68
  uint64_t ha_savepoint_count;
70
69
  uint64_t ha_savepoint_rollback_count;
71
70
 
 
71
  /* KEY_CACHE parts. These are copies of the original */
 
72
  uint64_t key_blocks_changed;
 
73
  uint64_t key_blocks_used;
 
74
  uint64_t key_cache_r_requests;
 
75
  uint64_t key_cache_read;
 
76
  uint64_t key_cache_w_requests;
 
77
  uint64_t key_cache_write;
 
78
  /* END OF KEY_CACHE parts */
 
79
 
72
80
  uint64_t select_full_join_count;
73
81
  uint64_t select_full_range_join_count;
74
82
  uint64_t select_range_count;