List:Commits« Previous MessageNext Message »
From:Venkata Sidagam Date:July 27 2012 6:51am
Subject:bzr push into mysql-5.1 branch (venkata.sidagam:3782 to 3783) Bug#12876932
View as plain text  
 3783 Venkata Sidagam	2012-07-27
      Bug #12876932 - INCORRECT SELECT RESULT ON FEDERATED TABLE
      
      Fixed the missing of federated/include folder at the time 
      of preparing package distribution, issue happens only in 5.1

    modified:
      mysql-test/Makefile.am
 3782 Praveenkumar Hulakund	2012-07-26
      BUG#13868860 - LIMIT '5' IS EXECUTED WITHOUT ERROR WHEN '5' 
                     IS PLACE HOLDER AND USE SERVER-SIDE 
      
      Analysis:
      LIMIT always takes nonnegative integer constant values. 
      
      http://dev.mysql.com/doc/refman/5.6/en/select.html
      
      So parsing of value '5' for LIMIT in SELECT fails.
      
      But, within prepared statement, LIMIT parameters can be
      specified using '?' markers. Value for the parameter can
      be supplied while executing the prepared statement.
      
      Passing string values, float or double value for LIMIT
      works well from CLI. Because, while setting the value
      for the parameters from the variable list (added using
      SET), if the value is for parameter LIMIT then its 
      converted to integer value. 
      
      But, when prepared statement is executed from the other
      interfaces as J connectors, or C applications etc.
      The value for the parameters are sent to the server
      with execute command. Each item in log has value and
      the data TYPE. So, While setting parameter value
      from this log, value is set to all the parameters
      with the same data type as passed.
      But here logic to convert value to integer type
      if its for LIMIT parameter is missing.
      Because of this,string '5' is set to LIMIT.
      And the same is logged into the binlog file too. 
      
      Fix:
      When executing prepared statement having parameter for
      CLI it worked fine, as the value set for the parameter
      is converted to integer. And this failed in other 
      interfaces as J connector,C Applications etc as this 
      conversion is missing.
      
      So, as a fix added check while setting value for the
      parameters. If the parameter is for LIMIT value then
      its converted to integer value.

    modified:
      sql/sql_prepare.cc
=== modified file 'mysql-test/Makefile.am'
--- a/mysql-test/Makefile.am	2011-07-03 15:47:37 +0000
+++ b/mysql-test/Makefile.am	2012-07-27 06:35:37 +0000
@@ -81,6 +81,7 @@ TEST_DIRS = t r include std_data std_dat
 	extra/binlog_tests/ extra/rpl_tests \
 	suite/binlog suite/binlog/t suite/binlog/r suite/binlog/std_data \
 	suite/federated \
+	suite/federated/include \
 	suite/funcs_1 suite/funcs_1/bitdata \
 	suite/funcs_1/include suite/funcs_1/lib suite/funcs_1/r \
 	suite/funcs_1/t suite/funcs_1/views suite/funcs_1/cursors \

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1 branch (venkata.sidagam:3782 to 3783) Bug#12876932Venkata Sidagam27 Jul