MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:Jim Winstead Date:July 15 2005 1:10am
Subject:bk commit into 4.1 tree (jimw:1.2350) BUG#10443
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of jimw. When jimw 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
  1.2350 05/07/14 18:10:06 jimw@stripped +1 -0
  Fix handling of floats and doubles when using prepared statements
  API in the embedded server. (Bug #10443)

  sql/sql_prepare.cc
    1.148 05/07/14 18:10:03 jimw@stripped +8 -4
    Within the embedded server, there's no need to use float4get()
    and float8get() for setting parameters, since they are never
    stored.

# 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:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-4.1-build

--- 1.147/sql/sql_prepare.cc	2005-06-27 06:46:36 -07:00
+++ 1.148/sql/sql_prepare.cc	2005-07-14 18:10:03 -07:00
@@ -306,24 +306,28 @@
 
 static void set_param_float(Item_param *param, uchar **pos, ulong len)
 {
+  float data;
 #ifndef EMBEDDED_LIBRARY
   if (len < 4)
     return;
-#endif
-  float data;
   float4get(data,*pos);
+#else
+  data= *(float *)*pos;
+#endif
   param->set_double((double) data);
   *pos+= 4;
 }
 
 static void set_param_double(Item_param *param, uchar **pos, ulong len)
 {
+  double data;
 #ifndef EMBEDDED_LIBRARY
   if (len < 8)
     return;
-#endif
-  double data;
   float8get(data,*pos);
+#else
+  data= *(double *)*pos;
+#endif
   param->set_double((double) data);
   *pos+= 8;
 }
Thread
bk commit into 4.1 tree (jimw:1.2350) BUG#10443Jim Winstead15 Jul