~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/archive/concurrency_test.cc

  • 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:
37
37
#ifndef __WIN__
38
38
#include <sys/wait.h>
39
39
#endif
40
 
#include <memory>
41
40
 
42
41
#ifdef __WIN__
43
42
#define srandom  srand
45
44
#define snprintf _snprintf
46
45
#endif
47
46
 
48
 
#include <boost/scoped_ptr.hpp>
49
 
 
50
47
#include "azio.h"
51
48
 
52
49
#define DEFAULT_INITIAL_LOAD 10000
139
136
{
140
137
  unsigned int x;
141
138
  uint64_t total;
142
 
  boost::scoped_ptr<azio_stream> writer_handle_ap(new azio_stream);
143
 
  azio_stream &writer_handle= *writer_handle_ap.get();
 
139
  azio_stream writer_handle;
144
140
  thread_context_st *context;
145
141
  pthread_t mainthread;            /* Thread descriptor */
146
142
  pthread_attr_t attr;          /* Thread attributes */
267
263
  uint64_t count;
268
264
  int ret;
269
265
  int error;
270
 
  boost::scoped_ptr<azio_stream> reader_handle_ap(new azio_stream);
271
 
  azio_stream &reader_handle= *reader_handle_ap.get();
 
266
  azio_stream reader_handle;
272
267
 
273
268
  if (!(ret= azopen(&reader_handle, TEST_FILENAME, O_RDONLY,
274
269
                    context->use_aio)))