List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:May 6 2011 8:53am
Subject:bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:4358 to 4359)
View as plain text  
 4359 Magnus Blåudd	2011-05-06
      Merge cherry pick of bug 12433999 from 5.1-mtr

    modified:
      mysql-test/lib/My/SysInfo.pm
      mysql-test/mysql-test-run.pl
 4358 Ole John Aske	2011-05-05
      Refactoring / cleanup of SPJ API after http://lists.mysql.com/commits/136639
      (Which allows pushed scan childs to be 'bushy')
      
      The NdbQueryBuilder used to keep track of whether a pushed operation 
      already had a scan descendant - Mainly in order to be able to throw
      an error of a bushy scan join was constructed.
      
      The only usage of ::hasScanDescendant() besides this was within
      NdbQueryImpl::sendFetchMore(). It used it for calculating
      which ResultStreams to ::reset() as they would receive new rows.
      It turned out that this code was overly complicated, and could be 
      simplified - which removed the need for the 'scan descendant' knowledge.
      
      ::markScanAncestors(), ::hasScanDescendant() has then become 
      obsolete and is therefore removed by this patch.

    modified:
      storage/ndb/src/ndbapi/NdbQueryBuilder.cpp
      storage/ndb/src/ndbapi/NdbQueryBuilderImpl.hpp
      storage/ndb/src/ndbapi/NdbQueryOperation.cpp
=== modified file 'mysql-test/lib/My/SysInfo.pm'
--- a/mysql-test/lib/My/SysInfo.pm	2011-04-08 12:48:50 +0000
+++ b/mysql-test/lib/My/SysInfo.pm	2011-05-06 08:05:58 +0000
@@ -168,6 +168,28 @@ sub num_cpus {
 }
 
 
+# Return the number of cores found
+#  - if there is a "core_id" attribute in the
+#    cpuinfo, use it to filter out only the count of
+#    cores, else return count of cpus 
+sub num_cores {
+  my ($self)= @_;
+  
+  my $cores = 0;
+  my %seen = (); # Hash with the core id's already seen 
+  foreach my $cpu (@{$self->{cpus}}) {
+    my $core_id = $cpu->{core_id};
+    
+    next if (defined $core_id and $seen{$core_id}++);
+ 
+    # Unknown core id or not seen this core before, count it
+    $cores++;
+  }
+  return $cores or
+    confess "INTERNAL ERROR: No cores!";
+}
+
+
 # Return the smallest bogomips value amongst the processors
 sub min_bogomips {
   my ($self)= @_;

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-04-27 06:52:34 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-05-06 08:05:58 +0000
@@ -382,14 +382,11 @@ sub main {
     # Try to find a suitable value for number of workers
     my $sys_info= My::SysInfo->new();
 
-    $opt_parallel= $sys_info->num_cpus();
-    print "num_cpus: $opt_parallel, min_bogomips: " .
-      $sys_info->min_bogomips(). "\n";
+    $opt_parallel= $sys_info->num_cores();
     for my $limit (2000, 1500, 1000, 500){
       $opt_parallel-- if ($sys_info->min_bogomips() < $limit);
     }
     my $max_par= $ENV{MTR_MAX_PARALLEL} || 8;
-    print "max_par: $max_par\n";
     $opt_parallel= $max_par if ($opt_parallel > $max_par);
     $opt_parallel= $num_tests if ($opt_parallel > $num_tests);
     $opt_parallel= 1 if (IS_WINDOWS and $sys_info->isvm());

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:4358 to 4359) Magnus Blåudd9 May