Update join test results that need --sorted_results

Bug #622005 reported by Lee Bieber on 2010-08-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
Unassigned
Dexter
Fix Released
Medium
Unassigned

Bug Description

For the feature request (https://blueprints.launchpad.net/drizzle/+spec/limit-maximum-sort-size) that is requesting the ability to cap various buffers, we first tried setting the join buffer to 1 to see how that would affect the test results and expose test results that need to sorted (by adding --sorted_result). The following tests need to be updated:

  tests/r/distinct.result
  tests/r/func_group.result
  tests/r/func_in.result
  tests/r/func_time.result
  tests/r/greedy_optimizer.result
  tests/r/group_min_max.result
  tests/r/join.result
  tests/r/join_nested.result
  tests/r/join_outer.result
  tests/r/key_diff.result
  tests/r/range.result
  tests/r/select.result
  tests/r/subselect.result
  tests/r/type_blob.result
  tests/r/type_datetime.result

Changes to run the test and expose the results that needed updating were:
=== modified file 'drizzled/join.cc'
--- drizzled/join.cc 2010-08-03 04:19:05 +0000
+++ drizzled/join.cc 2010-08-12 21:19:06 +0000
@@ -3816,7 +3816,7 @@ static void best_access_path(Join *join,
         /* We read the table as many times as join buffer becomes full. */
         tmp*= (1.0 + floor((double) cache_record_length(join,idx) *
                            record_count /
- (double) session->variables.join_buff_size));
+ (double) 1));
         /*
             We don't make full cartesian product between rows in the scanned
            table and existing records because we skip all rows from the

=== modified file 'drizzled/join_cache.cc'
--- drizzled/join_cache.cc 2010-07-30 20:31:19 +0000
+++ drizzled/join_cache.cc 2010-08-12 21:19:07 +0000
@@ -161,7 +161,7 @@ int join_init_cache(Session *session, Jo
   cache->length= length+blobs*sizeof(char*);
   cache->blobs= blobs;
   *blob_ptr= NULL; /* End sequentel */
- size= max((size_t) session->variables.join_buff_size, (size_t)cache->length);
+ size= max((size_t) 1, (size_t)cache->length);
   if (!(cache->buff= (unsigned char*) malloc(size)))
     return 1;
   cache->end= cache->buff+size;

Related branches

Changed in drizzle:
assignee: nobody → Lee Bieber (kalebral)
milestone: none → 2010-08-30
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers