MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:May 5 2010 3:00pm
Subject:bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3134) Bug#47338
View as plain text  
#At file:///export/home/didrik/mysqldev-next-mr/next-mr-opt-backporting-br2/ based on revid:oystein.grovlen@stripped

 3134 Tor Didriksen	2010-05-05
      Backport of
      Bug #47338 assertion in handler::ha_external_lock

    modified:
      mysql-test/r/analyse.result
      mysql-test/t/analyse.test
      mysys/my_open.c
      sql/handler.cc
=== modified file 'mysql-test/r/analyse.result'
--- a/mysql-test/r/analyse.result	2010-02-26 13:16:46 +0000
+++ b/mysql-test/r/analyse.result	2010-05-05 15:00:05 +0000
@@ -123,3 +123,17 @@ CREATE TABLE t2 SELECT 1 FROM t1, t1 t3 
 ERROR HY000: Incorrect usage of PROCEDURE and non-SELECT
 DROP TABLE t1;
 End of 5.0 tests
+#
+# Bug #47338 assertion in handler::ha_external_lock
+#
+drop table if exists t1;
+CREATE TEMPORARY TABLE t1 (f2 INT, f1 INT, PRIMARY KEY (f1)) ENGINE = MyISAM;
+INSERT t1 ( f1 ) VALUES ( 5 );
+INSERT t1 ( f1 ) VALUES ( 6 );
+ALTER TABLE t1 ENGINE = MyISAM;
+ANALYZE TABLE t1;
+Table	Op	Msg_type	Msg_text
+test.t1	analyze	status	OK
+SELECT f1,f2 FROM t1 A WHERE f1 BETWEEN 0 AND 1;
+f1	f2
+drop table t1;

=== modified file 'mysql-test/t/analyse.test'
--- a/mysql-test/t/analyse.test	2010-02-26 13:16:46 +0000
+++ b/mysql-test/t/analyse.test	2010-05-05 15:00:05 +0000
@@ -133,3 +133,26 @@ DROP TABLE t1;
 
 
 --echo End of 5.0 tests
+
+--echo #
+--echo # Bug #47338 assertion in handler::ha_external_lock
+--echo #
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+CREATE TEMPORARY TABLE t1 (f2 INT, f1 INT, PRIMARY KEY (f1)) ENGINE = MyISAM;
+
+INSERT t1 ( f1 ) VALUES ( 5 );
+INSERT t1 ( f1 ) VALUES ( 6 );
+
+ALTER TABLE t1 ENGINE = MyISAM;
+ANALYZE TABLE t1;
+
+# Bug #48859 nor reproducible here (was in 6.0)
+# Keeping this test case anyways.
+
+SELECT f1,f2 FROM t1 A WHERE f1 BETWEEN 0 AND 1; 
+
+drop table t1;

=== modified file 'mysys/my_open.c'
--- a/mysys/my_open.c	2009-12-10 03:19:51 +0000
+++ b/mysys/my_open.c	2010-05-05 15:00:05 +0000
@@ -49,8 +49,8 @@ File my_open(const char *FileName, int F
   fd = open((char *) FileName, Flags);
 #endif
 
-  DBUG_RETURN(my_register_filename(fd, FileName, FILE_BY_OPEN,
-				   EE_FILENOTFOUND, MyFlags));
+  fd= my_register_filename(fd, FileName, FILE_BY_OPEN, EE_FILENOTFOUND, MyFlags);
+  DBUG_RETURN(fd);
 } /* my_open */
 
 

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2010-05-05 11:44:16 +0000
+++ b/sql/handler.cc	2010-05-05 15:00:05 +0000
@@ -4412,8 +4412,10 @@ int DsMrr_impl::dsmrr_init(handler *h_ar
   if (mode & HA_MRR_USE_DEFAULT_IMPL || mode & HA_MRR_SORTED)
   {
     use_default_impl= TRUE;
-    DBUG_RETURN(h->handler::multi_range_read_init(seq_funcs, seq_init_param,
-                                                  n_ranges, mode, buf));
+    const int retval=
+      h->handler::multi_range_read_init(seq_funcs, seq_init_param,
+                                        n_ranges, mode, buf);
+    DBUG_RETURN(retval);
   }
   rowids_buf= buf->buffer;
 
@@ -5527,7 +5529,8 @@ int handler::ha_reset()
   free_io_cache(table);
   /* reset the bitmaps to point to defaults */
   table->default_column_bitmaps();
-  DBUG_RETURN(reset());
+  const int retval= reset();
+  DBUG_RETURN(retval);
 }
 
 


Attachment: [text/bzr-bundle] bzr/tor.didriksen@sun.com-20100505150005-qgsxhz5o14bwtfci.bundle
Thread
bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3134) Bug#47338Tor Didriksen5 May