MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:May 31 2010 11:00am
Subject:bzr commit into mysql-trunk-bugfixing branch (tor.didriksen:3078) Bug#49829
View as plain text  
#At file:///export/home/didrik/repo/trunk-bugfixing-cflags/ based on revid:sergey.glukhov@stripped

 3078 Tor Didriksen	2010-05-31
      Bug #49829 Many "hides virtual function" warnings with SunStudio
      
      Backport from mysql-pe (of those parts which have not been upmerged from 5.1)
     @ sql/field.cc
        Local scope variable or method argument same as class attribute.
     @ sql/item.cc
        Rename auto variable to avoid name clash.
     @ sql/item.h
        Item_ref::basic_const_item had wrong signature (missing const)
        and was thus never called.
     @ sql/partition_info.cc
        Rename, to avoid name clashes.
     @ sql/sql_load.cc
        Rename, to avoid name clashes.

    modified:
      sql/field.cc
      sql/item.cc
      sql/item.h
      sql/partition_info.cc
      sql/sql_load.cc
=== modified file 'sql/field.cc'
--- a/sql/field.cc	2010-04-29 20:33:06 +0000
+++ b/sql/field.cc	2010-05-31 10:59:58 +0000
@@ -9125,7 +9125,7 @@ void Create_field::create_length_to_inte
 void Create_field::init_for_tmp_table(enum_field_types sql_type_arg,
                                       uint32 length_arg, uint32 decimals_arg,
                                       bool maybe_null, bool is_unsigned,
-                                      uint pack_length)
+                                      uint pack_length_arg)
 {
   DBUG_ENTER("Create_field::init_for_tmp_table");
 
@@ -9138,7 +9138,7 @@ void Create_field::init_for_tmp_table(en
   geom_type= Field::GEOM_GEOMETRY;
 
   DBUG_PRINT("enter", ("sql_type: %d, length: %u, pack_length: %u",
-                       sql_type_arg, length_arg, pack_length));
+                       sql_type_arg, length_arg, pack_length_arg));
 
   /*
     These pack flags are crafted to get it correctly through the
@@ -9202,8 +9202,8 @@ void Create_field::init_for_tmp_table(en
   case MYSQL_TYPE_GEOMETRY:
     // If you are going to use the above types, you have to pass a
     // pack_length as parameter. Assert that is really done.
-    DBUG_ASSERT(pack_length != ~0U);
-    pack_flag|= pack_length_to_packflag(pack_length);
+    DBUG_ASSERT(pack_length_arg != ~0U);
+    pack_flag|= pack_length_to_packflag(pack_length_arg);
     break;
   default:
     /* Nothing */

=== modified file 'sql/item.cc'
--- a/sql/item.cc	2010-05-28 15:30:39 +0000
+++ b/sql/item.cc	2010-05-31 10:59:58 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
+/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -3434,9 +3434,9 @@ Item_param::set_param_type_and_swap_valu
 bool
 Item_param::set_value(THD *thd, sp_rcontext *ctx, Item **it)
 {
-  Item *value= *it;
+  Item *arg= *it;
 
-  if (value->is_null())
+  if (arg->is_null())
   {
     set_null();
     return FALSE;
@@ -3444,12 +3444,12 @@ Item_param::set_value(THD *thd, sp_rcont
 
   null_value= FALSE;
 
-  switch (value->result_type()) {
+  switch (arg->result_type()) {
   case STRING_RESULT:
   {
     char str_buffer[STRING_BUFFER_USUAL_SIZE];
     String sv_buffer(str_buffer, sizeof(str_buffer), &my_charset_bin);
-    String *sv= value->val_str(&sv_buffer);
+    String *sv= arg->val_str(&sv_buffer);
 
     if (!sv)
       return TRUE;
@@ -3466,19 +3466,19 @@ Item_param::set_value(THD *thd, sp_rcont
   }
 
   case REAL_RESULT:
-    set_double(value->val_real());
+    set_double(arg->val_real());
       param_type= MYSQL_TYPE_DOUBLE;
     break;
 
   case INT_RESULT:
-    set_int(value->val_int(), value->max_length);
+    set_int(arg->val_int(), arg->max_length);
     param_type= MYSQL_TYPE_LONG;
     break;
 
   case DECIMAL_RESULT:
   {
     my_decimal dv_buf;
-    my_decimal *dv= value->val_decimal(&dv_buf);
+    my_decimal *dv= arg->val_decimal(&dv_buf);
 
     if (!dv)
       return TRUE;
@@ -3498,8 +3498,8 @@ Item_param::set_value(THD *thd, sp_rcont
     return FALSE;
   }
 
-  item_result_type= value->result_type();
-  item_type= value->type();
+  item_result_type= arg->result_type();
+  item_type= arg->type();
   return FALSE;
 }
 

=== modified file 'sql/item.h'
--- a/sql/item.h	2010-05-28 15:30:39 +0000
+++ b/sql/item.h	2010-05-31 10:59:58 +0000
@@ -2506,7 +2506,7 @@ public:
     DBUG_ASSERT(fixed);
     return (*ref)->get_time(ltime);
   }
-  bool basic_const_item() { return (*ref)->basic_const_item(); }
+  virtual bool basic_const_item() const { return (*ref)->basic_const_item(); }
 
 };
 
@@ -3367,6 +3367,7 @@ public:
     cmp_context= STRING_RESULT;
   }
 
+  virtual void store(Item *item) { Item_cache::store(item); }
   void store(Item *item, longlong val_arg);
   double val_real();
   longlong val_int();

=== modified file 'sql/partition_info.cc'
--- a/sql/partition_info.cc	2010-05-28 05:47:58 +0000
+++ b/sql/partition_info.cc	2010-05-31 10:59:58 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2008 MySQL AB, Sun Microsystems Inc. 2008-2009
+/* Copyright (c) 2006, 2010 Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -603,12 +603,12 @@ bool partition_info::check_engine_mix(ha
 {
   handlerton *old_engine_type= engine_type;
   bool first= TRUE;
-  uint num_parts= partitions.elements;
+  uint n_parts= partitions.elements;
   DBUG_ENTER("partition_info::check_engine_mix");
   DBUG_PRINT("info", ("in: engine_type = %s, table_engine_set = %u",
                        ha_resolve_storage_engine_name(engine_type),
                        table_engine_set));
-  if (num_parts)
+  if (n_parts)
   {
     List_iterator<partition_element> part_it(partitions);
     uint i= 0;
@@ -621,7 +621,7 @@ bool partition_info::check_engine_mix(ha
       if (is_sub_partitioned() &&
           part_elem->subpartitions.elements)
       {
-        uint num_subparts= part_elem->subpartitions.elements;
+        uint n_subparts= part_elem->subpartitions.elements;
         uint j= 0;
         List_iterator<partition_element> sub_it(part_elem->subpartitions);
         do
@@ -633,7 +633,7 @@ bool partition_info::check_engine_mix(ha
           if (check_engine_condition(sub_elem, table_engine_set,
                                      &engine_type, &first))
             goto error;
-        } while (++j < num_subparts);
+        } while (++j < n_subparts);
         /* ensure that the partition also has correct engine */
         if (check_engine_condition(part_elem, table_engine_set,
                                    &engine_type, &first))
@@ -642,7 +642,7 @@ bool partition_info::check_engine_mix(ha
       else if (check_engine_condition(part_elem, table_engine_set,
                                       &engine_type, &first))
         goto error;
-    } while (++i < num_parts);
+    } while (++i < n_parts);
   }
   DBUG_PRINT("info", ("engine_type = %s",
                        ha_resolve_storage_engine_name(engine_type)));
@@ -1315,15 +1315,15 @@ end:
   RETURN VALUES
 */
 
-void partition_info::print_no_partition_found(TABLE *table)
+void partition_info::print_no_partition_found(TABLE *table_arg)
 {
   char buf[100];
   char *buf_ptr= (char*)&buf;
   TABLE_LIST table_list;
 
   bzero(&table_list, sizeof(table_list));
-  table_list.db= table->s->db.str;
-  table_list.table_name= table->s->table_name.str;
+  table_list.db= table_arg->s->db.str;
+  table_list.table_name= table_arg->s->table_name.str;
 
   if (check_single_table_access(current_thd,
                                 SELECT_ACL, &table_list, TRUE))
@@ -1337,13 +1337,13 @@ void partition_info::print_no_partition_
       buf_ptr= (char*)"from column_list";
     else
     {
-      my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
+      my_bitmap_map *old_map= dbug_tmp_use_all_columns(table_arg, table_arg->read_set);
       if (part_expr->null_value)
         buf_ptr= (char*)"NULL";
       else
         longlong2str(err_value, buf,
                      part_expr->unsigned_flag ? 10 : -10);
-      dbug_tmp_restore_column_map(table->read_set, old_map);
+      dbug_tmp_restore_column_map(table_arg->read_set, old_map);
     }
     my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), buf_ptr);
   }
@@ -2003,7 +2003,7 @@ bool partition_info::fix_column_value_fu
                                                 part_elem_value *val,
                                                 uint part_id)
 {
-  uint num_columns= part_field_list.elements;
+  uint n_columns= part_field_list.elements;
   bool result= FALSE;
   uint i;
   part_column_list_val *col_val= val->col_val_array;
@@ -2013,7 +2013,7 @@ bool partition_info::fix_column_value_fu
   {
     DBUG_RETURN(FALSE);
   }
-  for (i= 0; i < num_columns; col_val++, i++)
+  for (i= 0; i < n_columns; col_val++, i++)
   {
     Item *column_item= col_val->item_expression;
     Field *field= part_field_array[i];

=== modified file 'sql/sql_load.cc'
--- a/sql/sql_load.cc	2010-05-28 05:47:58 +0000
+++ b/sql/sql_load.cc	2010-05-31 10:59:58 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2006 MySQL AB, 2008-2009 Sun Microsystems, Inc
+/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1708,7 +1708,7 @@ bool READ_INFO::find_start_of_fields()
 /*
   Clear taglist from tags with a specified level
 */
-int READ_INFO::clear_level(int level)
+int READ_INFO::clear_level(int level_arg)
 {
   DBUG_ENTER("READ_INFO::read_xml clear_level");
   List_iterator<XML_TAG> xmlit(taglist);
@@ -1717,7 +1717,7 @@ int READ_INFO::clear_level(int level)
   
   while ((tag= xmlit++))
   {
-     if(tag->level >= level)
+     if(tag->level >= level_arg)
      {
        xmlit.remove();
        delete tag;


Attachment: [text/bzr-bundle] bzr/tor.didriksen@sun.com-20100531105958-s869pbqeopgme3z5.bundle
Thread
bzr commit into mysql-trunk-bugfixing branch (tor.didriksen:3078) Bug#49829Tor Didriksen31 May