[Commits] fccd03c: pre-review

Oleksandr Byelkin sanja at mariadb.com
Sat Oct 8 00:50:20 EEST 2016


revision-id: fccd03c8f07ebf5a8be11da574e2b52ad862305c (mariadb-10.2.2-16-gfccd03c)
parent(s): e2531a761f88af814031e9242e92bb9ad7668222
committer: Oleksandr Byelkin
timestamp: 2016-10-07 23:50:19 +0200
message:

pre-review

---
 include/mysql_com.h |  1 -
 sql/item.cc         | 14 ++++----------
 sql/item.h          | 10 ++--------
 3 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/include/mysql_com.h b/include/mysql_com.h
index 5e79ba9..28d2d75 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -125,7 +125,6 @@ enum enum_server_command
 
 /*
   Bulk PS protocol indicator value:
-  TODO: discuss maybe it should be a flag
 */
 enum enum_indicator_type
 {
diff --git a/sql/item.cc b/sql/item.cc
index b59d35c..41a7aaf 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -820,14 +820,10 @@ bool Item_ident::collect_outer_ref_processor(void *param)
 
 void Item_ident::set_default_value_target(Item *item)
 {
-  DBUG_ENTER("Item_ident::set_default_value_target");
-  DBUG_PRINT("XXX", ("Itent: 0x%lx  Item  0x%lx", (ulong) this,
-                     (ulong) item));
   if ((default_value_target= item) && fixed &&
       type() == FIELD_ITEM)
     default_value_target->set_default_value_source(((Item_field *)this)->
                                                    field);
-  DBUG_VOID_RETURN;
 }
 
 /**
@@ -3955,15 +3951,13 @@ Item_param::set_param_type_and_swap_value(Item_param *src)
 
 bool Item_param::set_default(bool can_be_missed)
 {
-  DBUG_ENTER("Item_param::set_default");
-  DBUG_PRINT("XXX", ("Item_param: 0x%lx", (ulong) this));
   if (!default_value_ref)
   {
     if (can_be_missed)
-      DBUG_RETURN(FALSE);
+      return FALSE;
     my_message(ER_INVALID_DEFAULT_PARAM,
                ER_THD(current_thd, ER_INVALID_DEFAULT_PARAM), MYF(0));
-    DBUG_RETURN(TRUE);
+    return TRUE;
   }
   THD *thd= default_value_ref->table->in_use;
   if (!default_value_source)
@@ -3972,11 +3966,11 @@ bool Item_param::set_default(bool can_be_missed)
       Item_default_value(thd, &thd->lex->select_lex.context, default_value_ref);
     if (!default_value_source ||
         default_value_source->fix_fields(thd, (Item **)&default_value_source))
-      DBUG_RETURN(TRUE);
+      return TRUE;
     bitmap_set_bit(default_value_ref->table->read_set,
                    default_value_ref->field_index);
   }
-  DBUG_RETURN(set_value(thd, NULL, (Item**)&default_value_source));
+  return set_value(thd, NULL, (Item**)&default_value_source);
 }
 
 /**
diff --git a/sql/item.h b/sql/item.h
index c37d0ef..7126f02 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -2803,13 +2803,7 @@ class Item_param :public Item_basic_value,
   int  save_in_field(Field *field, bool no_conversions);
 
   virtual void set_default_value_source(Field *fld)
-  {
-    DBUG_ENTER("Item_param::set_default_value_source");
-    DBUG_PRINT("XXX", ("Item_param: 0x%lx  Field: 0x%lx",
-                       (ulong) this, (ulong) fld));
-    default_value_ref= fld;
-    DBUG_VOID_RETURN;
-  }
+  { default_value_ref= fld; }
 
   bool set_default(bool can_be_missed);
   void set_null();
@@ -2855,8 +2849,8 @@ class Item_param :public Item_basic_value,
     constant, assert otherwise. This method is called only if
     basic_const_item returned TRUE.
   */
-  Item *clone_item(THD *thd);
   Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs);
+  Item *clone_item(THD *thd);
   /*
     Implement by-value equality evaluation if parameter value
     is set and is a basic constant (integer, real or string).


More information about the commits mailing list