List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:September 13 2010 11:30pm
Subject:bzr commit into mysql-next-mr-rpl-merge branch (alfranio.correia:3029)
View as plain text  
#At file:///home/acorreia/workspace.sun/repository.mysql.new/bzrwork/wl-2775/mysql-next-mr-rpl-merge.crash-safe.2775/ based on revid:alfranio.correia@stripped

 3029 Alfranio Correia	2010-09-14
      Removed unnecessary variable use_default.

    modified:
      sql/rpl_info_file.cc
      sql/rpl_info_table.cc
      sql/rpl_info_table.h
=== modified file 'sql/rpl_info_file.cc'
--- a/sql/rpl_info_file.cc	2010-08-06 18:09:14 +0000
+++ b/sql/rpl_info_file.cc	2010-09-13 23:30:43 +0000
@@ -109,7 +109,7 @@ int Rpl_info_file::do_prepare_info_for_r
 {
   cursor= 0;
   prv_error= FALSE;
-  return (reinit_io_cache(&info_file, READ_CACHE, 0L,0,0));
+  return (reinit_io_cache(&info_file, READ_CACHE, 0L, 0, 0));
 }
 
 int Rpl_info_file::do_prepare_info_for_write()

=== modified file 'sql/rpl_info_table.cc'
--- a/sql/rpl_info_table.cc	2010-09-13 23:08:23 +0000
+++ b/sql/rpl_info_table.cc	2010-09-13 23:30:43 +0000
@@ -19,7 +19,7 @@
 Rpl_info_table::Rpl_info_table(uint nparam, uint param_field_idx,
                                const char* param_schema,
                                const char *param_table)
-:Rpl_info_handler(nparam), field_idx(param_field_idx), use_default(FALSE)
+:Rpl_info_handler(nparam), field_idx(param_field_idx)
 {
 
   strmov(str_schema, param_schema);
@@ -289,7 +289,6 @@ int Rpl_info_table::do_prepare_info_for_
   if (!field_values)
     return TRUE;
 
-  use_default= do_check_info();
   cursor= 1;
 
   return FALSE;
@@ -389,11 +388,8 @@ bool Rpl_info_table::do_set_info(const i
 bool Rpl_info_table::do_get_info(const int pos, char *value, const size_t size,
                                  const char *default_value)
 {
-  if (use_default)
-    strmov(value, default_value ? default_value : "");
-  else
-    strmov(value, field_values->field[pos].value.str ?
-           field_values->field[pos].value.str : "");
+  strmov(value, field_values->field[pos].value.str ?
+         field_values->field[pos].value.str : "");
   
   return FALSE;
 }
@@ -401,8 +397,7 @@ bool Rpl_info_table::do_get_info(const i
 bool Rpl_info_table::do_get_info(const int pos, ulong *value,
                                  const ulong default_value)
 {
-  *value= (use_default ? default_value :
-           (int) strtoul(field_values->field[pos].value.str, 0, 10));
+  *value= (int) strtoul(field_values->field[pos].value.str, 0, 10);
 
   return FALSE;
 }
@@ -410,8 +405,7 @@ bool Rpl_info_table::do_get_info(const i
 bool Rpl_info_table::do_get_info(const int pos, int *value,
                                  const int default_value)
 {
-  *value= (use_default ? default_value :
-           (int) strtol(field_values->field[pos].value.str, 0, 10));
+  *value=  (int) strtol(field_values->field[pos].value.str, 0, 10);
 
   return FALSE;
 }
@@ -419,9 +413,7 @@ bool Rpl_info_table::do_get_info(const i
 bool Rpl_info_table::do_get_info(const int pos, float *value,
                                  const float default_value)
 {
-  *value= default_value;
-  if (!use_default &&
-      sscanf(field_values->field[pos].value.str, "%f", value) != 1)
+  if (sscanf(field_values->field[pos].value.str, "%f", value) != 1)
     return TRUE;
 
   return FALSE;

=== modified file 'sql/rpl_info_table.h'
--- a/sql/rpl_info_table.h	2010-07-06 22:01:07 +0000
+++ b/sql/rpl_info_table.h	2010-09-13 23:30:43 +0000
@@ -52,11 +52,6 @@ private:
   */
   uint field_idx;
   /*
-    This is a flag that identifies when a table should be filled
-    up with default values.
-  */
-  bool use_default;
-  /*
     This property represents a description of the repository.
     Speciffically, "schema"."table".
   */


Attachment: [text/bzr-bundle] bzr/alfranio.correia@oracle.com-20100913233043-6v770iwbmauznnup.bundle
Thread
bzr commit into mysql-next-mr-rpl-merge branch (alfranio.correia:3029) Alfranio Correia14 Sep