List:Internals« Previous MessageNext Message »
From:pem Date:December 2 2005 5:49pm
Subject:bk commit into 5.1 tree (pem:1.2004)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of pem. When pem 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.2004 05/12/02 18:43:08 pem@stripped +7 -0
  Merge mysql.com:/usr/local/bk/mysql-5.0
  into  mysql.com:/usr/home/pem/mysql-5.1-new

  sql/sql_yacc.yy
    1.424 05/12/02 18:42:58 pem@stripped +0 -0
    Auto merged

  sql/item_sum.cc
    1.170 05/12/02 18:42:58 pem@stripped +0 -0
    Auto merged

  sql/item_func.cc
    1.272 05/12/02 18:42:58 pem@stripped +0 -0
    Auto merged

  sql/item.h
    1.185 05/12/02 18:42:58 pem@stripped +0 -0
    Auto merged

  sql/item.cc
    1.158 05/12/02 18:42:57 pem@stripped +0 -0
    Auto merged

  sql/field.cc
    1.293 05/12/02 18:42:57 pem@stripped +0 -0
    Auto merged

  mysql-test/r/sp.result
    1.171 05/12/02 18:42:57 pem@stripped +0 -0
    Auto merged

# 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:	pem
# Host:	mysql.comhem.se
# Root:	/usr/home/pem/mysql-5.1-new/RESYNC

--- 1.292/sql/field.cc	2005-11-24 10:38:18 +01:00
+++ 1.293/sql/field.cc	2005-12-02 18:42:57 +01:00
@@ -3958,7 +3958,7 @@
   else
 #endif
     memcpy_fixed((byte*) &j,ptr,sizeof(j));
-  return ((longlong) j);
+  return (longlong) rint(j);
 }
 
 
@@ -4246,7 +4246,7 @@
   else
 #endif
     doubleget(j,ptr);
-  return ((longlong) j);
+  return (longlong) rint(j);
 }
 
 

--- 1.157/sql/item.cc	2005-11-30 21:14:07 +01:00
+++ 1.158/sql/item.cc	2005-12-02 18:42:57 +01:00
@@ -2460,7 +2460,7 @@
 { 
   switch (state) {
   case REAL_VALUE:
-    return (longlong) (value.real + (value.real > 0 ? 0.5 : -0.5));
+    return (longlong) rint(value.real);
   case INT_VALUE:
     return value.integer;
   case DECIMAL_VALUE:
@@ -5483,7 +5483,7 @@
 longlong Item_cache_real::val_int()
 {
   DBUG_ASSERT(fixed == 1);
-  return (longlong) (value+(value > 0 ? 0.5 : -0.5));
+  return (longlong) rint(value);
 }
 
 

--- 1.184/sql/item.h	2005-11-28 20:07:10 +01:00
+++ 1.185/sql/item.h	2005-12-02 18:42:58 +01:00
@@ -159,7 +159,7 @@
   { val->real/= ulonglong2double(u); }
 
   virtual longlong val_int(Hybrid_type *val, bool unsigned_flag) const
-  { return (longlong) val->real; }
+  { return (longlong) rint(val->real); }
   virtual double val_real(Hybrid_type *val) const { return val->real; }
   virtual my_decimal *val_decimal(Hybrid_type *val, my_decimal *buf) const;
   virtual String *val_str(Hybrid_type *val, String *buf, uint8 decimals) const;
@@ -1354,7 +1354,7 @@
     {
       return LONGLONG_MAX;
     }
-    return (longlong) (value+(value > 0 ? 0.5 : -0.5));
+    return (longlong) rint(value);
   }
   String *val_str(String*);
   my_decimal *val_decimal(my_decimal *);

--- 1.271/sql/item_func.cc	2005-11-23 21:47:27 +01:00
+++ 1.272/sql/item_func.cc	2005-12-02 18:42:58 +01:00
@@ -737,7 +737,7 @@
   case INT_RESULT:
     return int_op();
   case REAL_RESULT:
-    return (longlong)real_op();
+    return (longlong) rint(real_op());
   case STRING_RESULT:
   {
     int err_not_used;

--- 1.169/sql/item_sum.cc	2005-11-23 21:47:27 +01:00
+++ 1.170/sql/item_sum.cc	2005-12-02 18:42:58 +01:00
@@ -465,7 +465,7 @@
                    &result);
     return result;
   }
-  return (longlong) val_real();
+  return (longlong) rint(val_real());
 }
 
 
@@ -1308,7 +1308,7 @@
     return sum_int;
   }
   default:
-    return (longlong) Item_sum_hybrid::val_real();
+    return (longlong) rint(Item_sum_hybrid::val_real());
   }
 }
 
@@ -2024,7 +2024,7 @@
 
 longlong Item_avg_field::val_int()
 {
-  return (longlong) val_real();
+  return (longlong) rint(val_real());
 }
 
 

--- 1.423/sql/sql_yacc.yy	2005-11-23 13:56:50 +01:00
+++ 1.424/sql/sql_yacc.yy	2005-12-02 18:42:58 +01:00
@@ -1619,7 +1619,12 @@
 
 sp_decl:
           DECLARE_SYM sp_decl_idents type 
-          { Lex->sphead->reset_lex(YYTHD); }
+          {
+            LEX *lex= Lex;
+
+            lex->sphead->reset_lex(YYTHD);
+            lex->spcont->declare_var_boundary($2);
+          }
           sp_opt_default
           {
             LEX *lex= Lex;
@@ -1650,6 +1655,7 @@
               lex->sphead->add_instr(in);
               ctx->set_default(off, it);
             }
+            ctx->declare_var_boundary(0);
             lex->sphead->restore_lex(YYTHD);
             $$.vars= $2;
             $$.conds= $$.hndlrs= $$.curs= 0;

--- 1.170/mysql-test/r/sp.result	2005-12-02 15:04:43 +01:00
+++ 1.171/mysql-test/r/sp.result	2005-12-02 18:42:57 +01:00
@@ -1674,7 +1674,7 @@
 create table t3 (s1 smallint)|
 insert into t3 values (123456789012)|
 Warnings:
-Warning	1264	Out of range value adjusted for column 's1' at row 1
+Warning	1264	Out of range value for column 's1' at row 1
 drop procedure if exists bug2780|
 create procedure bug2780()
 begin
Thread
bk commit into 5.1 tree (pem:1.2004)pem2 Dec