List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:March 23 2011 10:33am
Subject:bzr push into mysql-trunk branch (bjorn.munch:3311 to 3313)
View as plain text  
 3313 Bjorn Munch	2011-03-23 [merge]
      null upmerge

 3312 Bjorn Munch	2011-03-23 [merge]
      merge from trunk-mtr

    added:
      mysql-test/include/not_crashrep.inc
    modified:
      client/mysqltest.cc
      mysql-test/suite/binlog/t/binlog_index.test
      mysql-test/suite/binlog/t/rpl_crash_safe_master_checksum.test
      mysql-test/suite/innodb/t/innodb_bug53756.test
      mysql-test/suite/rpl/t/rpl_crash_safe_master.test
      mysql-test/suite/rpl/t/rpl_sync.test
      mysql-test/t/myisam_crash_before_flush_keys.test
 3311 Ole John Aske	2011-03-23
      Updated fix (W/ Jorgens review comments) for bug#11764737:
        'Optimizer is overly eager to request ordered access'
      
      The essential part of this fix is:
           
      1) Ensure that JOIN_TAB::sorted is set, and QUICK_RANGE_SELECT::mrr_flags contains 'HA_MRR_SORTED'
         only iff strict ordering is required from the handler - Either as a result of the query itself
         specifying ORDER/GROUP BY, or usage of a QUICK access method which require the sources to 
         be ordered (Typical if its internals use ::ha_index_first, _last, _next, _prev)
            
      2) Change calls to handler::ha_index_init() to take its 'sorted' argument either directly
         from JOIN_TAB::sorted or from mrr_flags containing HA_MRR_SORTED.
      
      In order to implement this QUICK_SELECT_I::need_sorted_output() had to be extended to
      take a 'bool sort' argument: Where 'sort==false' will enable us to turn off
      requirement that a QUICK_SELECT_I access method should deliver rows in sorted
      order. (Similar logic already exists for 'non-quick' access methods.)
      NOTE: QUICK_SELECT_I::need_sorted_output(sort==false) is only regarded as a hint
      and the different QUICK_SELECT_I methods may still request sorted order from the
      handler if required by their internals.
      
      Furthermore the function 'disable_sorted_access(JOIN_TAB* join_tab)' has been 
      introduced which collect all logic for turning off sort requirement.
     @ mysql-test/r/innodb_mysql_lock2.result
        Accept changed result order for this (unordered) result set.
     @ mysql-test/r/partition.result
        Accept changed result order for this (unordered) result set.
     @ mysql-test/r/partition_explicit_prune.result
        Accept changed result order for (unordered) result sets.
        
        There is also a change in 'HANDLER_WRITE' due to a changed order of 
        rows in 'loadtest.txt' when doing LOAD DATA INFILE 'loadtest.txt.
        That particular 'LOAD DATA' is intended to fail due to loading into
        incorrect partition.
        
        As the ofending row now has an other position in 'loadtest.txt', we
        write more rows before encountering this row - and the rollbacks the
        TXN.
     @ sql/opt_range.cc
        Correcly set, and use, HA_MRR_SORTED in order to only request sorted access 
        iff it is required either due to optimizer using ::need_sorted_output(),
        or the internals of the quick access needing ordered access itself.
                
        Also added mrr_flags and its mrr relatives to C'tor initializer list.
        Fixed an issue with missing 'delete quick' + return in case
        get_quick_select() failed.

    modified:
      mysql-test/r/innodb_mysql_lock2.result
      mysql-test/r/partition.result
      mysql-test/r/partition_explicit_prune.result
      sql/opt_range.cc
      sql/opt_range.h
      sql/sql_select.cc
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2011-03-17 09:43:28 +0000
+++ b/client/mysqltest.cc	2011-03-22 15:40:32 +0000
@@ -8343,14 +8343,16 @@ int main(int argc, char **argv)
   }
   var_set_string("MYSQLTEST_FILE", cur_file->file_name);
   init_re();
+
+  /* Cursor protcol implies ps protocol */
+  if (cursor_protocol)
+    ps_protocol= 1;
+
   ps_protocol_enabled= ps_protocol;
   sp_protocol_enabled= sp_protocol;
   view_protocol_enabled= view_protocol;
   explain_protocol_enabled= explain_protocol;
   cursor_protocol_enabled= cursor_protocol;
-  /* Cursor protcol implies ps protocol */
-  if (cursor_protocol_enabled)
-    ps_protocol_enabled= 1;
 
   st_connection *con= connections;
 #ifdef EMBEDDED_LIBRARY

=== added file 'mysql-test/include/not_crashrep.inc'
--- a/mysql-test/include/not_crashrep.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/not_crashrep.inc	2011-03-15 15:06:59 +0000
@@ -0,0 +1,24 @@
+# Check if CrashReporter is enabled and would open a window
+
+perl;
+sub skip_test {
+  # Only relevant on Mac OS X
+  return 0 unless $^O eq 'darwin';
+  my $crep= `defaults read com.apple.CrashReporter DialogType`;
+  return 0 if $?;
+  chomp ($crep);
+  $crep= lc $crep;
+  return ($crep eq 'basic' || $crep eq 'developer');
+}
+my $skip= skip_test();
+open (F, ">" . $ENV{'MYSQL_TMP_DIR'} . "/crashrep.inc");
+print F "let \$crashrep= $skip;\n";
+close F;
+EOF
+
+--source $MYSQL_TMP_DIR/crashrep.inc
+--remove_file $MYSQL_TMP_DIR/crashrep.inc
+
+if ($crashrep) {
+  --skip CrashReporter would popup a window
+}

=== modified file 'mysql-test/suite/binlog/t/binlog_index.test'
--- a/mysql-test/suite/binlog/t/binlog_index.test	2011-01-10 06:17:31 +0000
+++ b/mysql-test/suite/binlog/t/binlog_index.test	2011-03-15 15:17:13 +0000
@@ -6,6 +6,8 @@ source include/not_embedded.inc;
 # Don't test this under valgrind, memory leaks will occur
 --source include/not_valgrind.inc
 source include/have_debug.inc;
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
 call mtr.add_suppression('Attempting backtrace');
 call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
 call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file');

=== modified file 'mysql-test/suite/binlog/t/rpl_crash_safe_master_checksum.test'
--- a/mysql-test/suite/binlog/t/rpl_crash_safe_master_checksum.test	2010-12-22 03:31:50 +0000
+++ b/mysql-test/suite/binlog/t/rpl_crash_safe_master_checksum.test	2011-03-15 15:17:13 +0000
@@ -13,6 +13,7 @@
 -- source include/have_debug.inc
 -- source include/have_innodb.inc
 -- source include/have_binlog_format_row.inc
+-- source include/not_crashrep.inc
 
 call mtr.add_suppression("Attempting backtrace");
 call mtr.add_suppression("allocated tablespace *., old maximum was 0");

=== modified file 'mysql-test/suite/innodb/t/innodb_bug53756.test'
--- a/mysql-test/suite/innodb/t/innodb_bug53756.test	2011-02-10 08:58:23 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug53756.test	2011-03-15 15:11:17 +0000
@@ -17,6 +17,9 @@
 # This test case needs InnoDB.
 -- source include/have_innodb.inc
 
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
+
 #
 # Precautionary clean up.
 #

=== modified file 'mysql-test/suite/rpl/t/rpl_crash_safe_master.test'
--- a/mysql-test/suite/rpl/t/rpl_crash_safe_master.test	2011-02-15 08:25:14 +0000
+++ b/mysql-test/suite/rpl/t/rpl_crash_safe_master.test	2011-03-15 15:17:13 +0000
@@ -31,6 +31,7 @@
 -- source include/have_debug.inc
 -- source include/have_innodb.inc
 -- source include/have_binlog_format_row.inc
+-- source include/not_crashrep.inc
 
 # Reset master
 connection slave;

=== modified file 'mysql-test/suite/rpl/t/rpl_sync.test'
--- a/mysql-test/suite/rpl/t/rpl_sync.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_sync.test	2011-03-15 15:17:13 +0000
@@ -32,6 +32,7 @@
 --source include/have_debug.inc
 --source include/have_innodb.inc
 --source include/not_master_info_table.inc
+--source include/not_crashrep.inc
 
 call mtr.add_suppression('Attempting backtrace');
 call mtr.add_suppression("Recovery from master pos .* and file master-bin.000001");

=== modified file 'mysql-test/t/myisam_crash_before_flush_keys.test'
--- a/mysql-test/t/myisam_crash_before_flush_keys.test	2009-11-25 12:25:01 +0000
+++ b/mysql-test/t/myisam_crash_before_flush_keys.test	2011-03-15 15:11:17 +0000
@@ -10,6 +10,8 @@
 
 call mtr.add_suppression("Got an error from thread_id=.*ha_myisam.cc:");
 call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*root Checking table");
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
 
 let $MYSQLD_DATADIR= `select @@datadir`;
 SET GLOBAL delay_key_write=ALL;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (bjorn.munch:3311 to 3313) Bjorn Munch23 Mar