MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:February 6 2007 1:07pm
Subject:bk commit into 4.1 tree (msvensson:1.2595) BUG#8983
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-02-06 14:07:40+01:00, msvensson@neptunus.(none) +1 -0
  Bug#8983 one place that isn't strict-aliasing-safe
   - Backport fix from 5.0

  sql/sql_prepare.cc@stripped, 2007-02-06 14:07:37+01:00, msvensson@neptunus.(none) +6 -5
    Avoid problems with -no-strict-aliasing in gcc 4.0+

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-4.1-maint

--- 1.158/sql/sql_prepare.cc	2007-02-06 14:07:47 +01:00
+++ 1.159/sql/sql_prepare.cc	2007-02-06 14:07:47 +01:00
@@ -1783,8 +1783,9 @@ static void reset_stmt_params(Prepared_s
       packet_length  Query string length, including terminator character.
 */
 
-void mysql_stmt_execute(THD *thd, char *packet, uint packet_length)
+void mysql_stmt_execute(THD *thd, char *packet_arg, uint packet_length)
 {
+  uchar* packet= (uchar*)packet_arg; // gcc 4.0 stgrict-aliasing
   ulong stmt_id= uint4korr(packet);
   /*
     Query text for binary log, or empty string if the query is not put into
@@ -1792,7 +1793,7 @@ void mysql_stmt_execute(THD *thd, char *
   */
   String expanded_query;
 #ifndef EMBEDDED_LIBRARY
-  uchar *packet_end= (uchar *) packet + packet_length - 1;
+  uchar *packet_end= packet + packet_length - 1;
 #endif
   Prepared_statement *stmt;
   DBUG_ENTER("mysql_stmt_execute");
@@ -1818,9 +1819,9 @@ void mysql_stmt_execute(THD *thd, char *
 #ifndef EMBEDDED_LIBRARY
   if (stmt->param_count)
   {
-    uchar *null_array= (uchar *) packet;
-    if (setup_conversion_functions(stmt, (uchar **) &packet, packet_end) ||
-        stmt->set_params(stmt, null_array, (uchar *) packet, packet_end,
+    uchar *null_array= packet;
+    if (setup_conversion_functions(stmt, &packet, packet_end) ||
+        stmt->set_params(stmt, null_array, packet, packet_end,
                          &expanded_query))
       goto set_params_data_err;
   }
Thread
bk commit into 4.1 tree (msvensson:1.2595) BUG#8983msvensson6 Feb