List:Commits« Previous MessageNext Message »
From:Serge Kozlov Date:April 14 2011 12:03pm
Subject:bzr push into mysql-5.1 branch (Serge.Kozlov:3658 to 3659) WL#5867
View as plain text  
 3659 Serge Kozlov	2011-04-14
      WL#5867, postfix for binlog_bug23533

    modified:
      mysql-test/suite/binlog/r/binlog_bug23533.result
      mysql-test/suite/binlog/t/binlog_bug23533.test
 3658 Sergey Glukhov	2011-04-14
      Bug#11756242  48137: PROCEDURE ANALYSE() LEAKS MEMORY WHEN RETURNING NULL
      There are two problems with ANALYSE():
      
      1. Memory leak 
         it happens because do_select() can overwrite
         JOIN::procedure field(with zero value in our case) and
         JOIN destructor don't free the memory allocated for
         JOIN::procedure. The fix is to save original JOIN::procedure
         before do_select() call and restore it after do_select
         execution.
      
      2. Wrong result
         If ANALYSE() procedure is used for the statement with LIMIT clause
         it could retrun empty result set. It happens because of missing 
         analyse::end_of_records() call. First end_send() function call
         returns NESTED_LOOP_QUERY_LIMIT and second call of end_send() with
         end_of_records flag enabled does not happen. The fix is to return
         NESTED_LOOP_OK from end_send() if procedure is active.
     @ mysql-test/r/analyse.result
        test case
     @ mysql-test/t/analyse.test
        test case
     @ sql/sql_select.cc
        --save original JOIN::procedure before do_select() call and
          restore it after do_select execution.
        --return NESTED_LOOP_OK from end_send() if procedure is active

    modified:
      mysql-test/r/analyse.result
      mysql-test/t/analyse.test
      sql/sql_select.cc
=== modified file 'mysql-test/suite/binlog/r/binlog_bug23533.result'
--- a/mysql-test/suite/binlog/r/binlog_bug23533.result	2011-04-13 20:18:08 +0000
+++ b/mysql-test/suite/binlog/r/binlog_bug23533.result	2011-04-14 11:24:11 +0000
@@ -3,9 +3,6 @@ CREATE TABLE t1 (a INT NOT NULL AUTO_INC
 SELECT COUNT(*) FROM t1;
 COUNT(*)
 1000
-SHOW VARIABLES LIKE 'max_binlog_cache_size';
-Variable_name	Value
-max_binlog_cache_size	4294963200
 SET @saved_max_binlog_cache_size=@@max_binlog_cache_size;
 SET GLOBAL max_binlog_cache_size=4096;
 START TRANSACTION;

=== modified file 'mysql-test/suite/binlog/t/binlog_bug23533.test'
--- a/mysql-test/suite/binlog/t/binlog_bug23533.test	2011-04-13 20:18:08 +0000
+++ b/mysql-test/suite/binlog/t/binlog_bug23533.test	2011-04-14 11:24:11 +0000
@@ -22,7 +22,6 @@ while ($i)
 SELECT COUNT(*) FROM t1;
 
 # Set small value for max_binlog_cache_size
-SHOW VARIABLES LIKE 'max_binlog_cache_size';
 SET @saved_max_binlog_cache_size=@@max_binlog_cache_size;
 SET GLOBAL max_binlog_cache_size=4096;
 


Attachment: [text/bzr-bundle] bzr/serge.kozlov@oracle.com-20110414112411-msh5apazqurhhlwr.bundle
Thread
bzr push into mysql-5.1 branch (Serge.Kozlov:3658 to 3659) WL#5867Serge Kozlov14 Apr