List:Commits« Previous MessageNext Message »
From:ramil Date:May 24 2007 3:21pm
Subject:bk commit into 5.0 tree (ramil:1.2496)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram 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-05-24 20:21:04+05:00, ramil@stripped +3 -0
  Merge mysql.com:/home/ram/work/mysql-5.0-maint
  into  mysql.com:/home/ram/work/b28464.new/b28464.new.5.0
  MERGE: 1.2483.1.1

  sql/item.cc@stripped, 2007-05-24 20:21:02+05:00, ramil@stripped +0 -0
    SCCS merged
    MERGE: 1.265.2.2

  sql/item.h@stripped, 2007-05-24 20:20:20+05:00, ramil@stripped +0 -0
    Auto merged
    MERGE: 1.228.1.2

  sql/sql_yacc.yy@stripped, 2007-05-24 20:20:20+05:00, ramil@stripped +0 -0
    Auto merged
    MERGE: 1.514.2.1

# 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:	ramil
# Host:	ramil.myoffice.izhnet.ru
# Root:	/home/ram/work/b28464.new/b28464.new.5.0/RESYNC

--- 1.270/sql/item.cc	2007-05-24 20:21:09 +05:00
+++ 1.271/sql/item.cc	2007-05-24 20:21:09 +05:00
@@ -2313,6 +2313,7 @@ default_set_param_func(Item_param *param
 
 
 Item_param::Item_param(unsigned pos_in_query_arg) :
+  strict_type(FALSE),
   state(NO_VALUE),
   item_result_type(STRING_RESULT),
   /* Don't pretend to be a literal unless value for this item is set. */
@@ -2507,6 +2508,8 @@ bool Item_param::set_from_user_var(THD *
   if (entry && entry->value)
   {
     item_result_type= entry->type;
+    if (strict_type && required_result_type != item_result_type)
+      DBUG_RETURN(1);
     switch (item_result_type) {
     case REAL_RESULT:
       set_double(*(double*)entry->value);

--- 1.230/sql/item.h	2007-05-24 20:21:09 +05:00
+++ 1.231/sql/item.h	2007-05-24 20:21:09 +05:00
@@ -1359,8 +1359,10 @@ class Item_param :public Item
   char cnvbuf[MAX_FIELD_WIDTH];
   String cnvstr;
   Item *cnvitem;
-public:
+  bool strict_type;
+  enum Item_result required_result_type;
 
+public:
   enum enum_item_param_state
   {
     NO_VALUE, NULL_VALUE, INT_VALUE, REAL_VALUE,
@@ -1488,6 +1490,11 @@ public:
     Otherwise return FALSE.
   */
   bool eq(const Item *item, bool binary_cmp) const;
+  void set_strict_type(enum Item_result result_type_arg)
+  {
+    strict_type= TRUE;
+    required_result_type= result_type_arg;
+  }
 };
 
 

--- 1.519/sql/sql_yacc.yy	2007-05-24 20:21:09 +05:00
+++ 1.520/sql/sql_yacc.yy	2007-05-24 20:21:09 +05:00
@@ -6214,6 +6214,9 @@ limit_options:
 	;
 limit_option:
         param_marker
+        {
+          ((Item_param *) $1)->set_strict_type(INT_RESULT);
+        }
         | ULONGLONG_NUM { $$= new Item_uint($1.str, $1.length); }
         | LONG_NUM     { $$= new Item_uint($1.str, $1.length); }
         | NUM           { $$= new Item_uint($1.str, $1.length); }
Thread
bk commit into 5.0 tree (ramil:1.2496)ramil24 May