List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:May 5 2010 11:45am
Subject:bzr push into mysql-next-mr-bugfixing branch (tor.didriksen:3127 to 3130)
View as plain text  
 3130 Tor Didriksen	2010-05-05 [merge]
      Fix assorted compiler warnings.

    modified:
      sql/handler.cc
      sql/sql_base.cc
      sql/sql_update.cc
      sql/sys_vars.cc
 3129 Tor Didriksen	2010-05-05
      backport some more compiler-warning fixes

    modified:
      sql/opt_range.cc
 3128 Tor Didriksen	2010-05-05
      backport of parts of forwardport of bugfix 43414, which fixed some gcc warnings

    modified:
      sql/sql_select.h
 3127 Tor Didriksen	2010-05-05
      Post backport fix.
      Adapt to WL#2360 Performance schema

    modified:
      storage/myisam/mi_rnext.c
=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2010-05-04 09:13:10 +0000
+++ b/sql/handler.cc	2010-05-05 11:44:16 +0000
@@ -58,7 +58,8 @@ static handlerton *installed_htons[128];
 
 #define BITMAP_STACKBUF_SIZE (128/8)
 
-KEY_CREATE_INFO default_key_create_info= { HA_KEY_ALG_UNDEF, 0, {NullS,0} };
+KEY_CREATE_INFO default_key_create_info=
+  { HA_KEY_ALG_UNDEF, 0, {NullS, 0}, {NullS, 0} };
 
 /* number of entries in handlertons[] */
 ulong total_ha= 0;

=== modified file 'sql/opt_range.cc'
--- a/sql/opt_range.cc	2010-04-22 12:03:05 +0000
+++ b/sql/opt_range.cc	2010-05-05 11:22:58 +0000
@@ -1176,7 +1176,7 @@ QUICK_SELECT_I::QUICK_SELECT_I()
 QUICK_RANGE_SELECT::QUICK_RANGE_SELECT(THD *thd, TABLE *table, uint key_nr,
                                        bool no_alloc, MEM_ROOT *parent_alloc,
                                        bool *create_error)
-  :dont_free(0),free_file(0),cur_range(NULL),last_range(0)
+  :free_file(0),cur_range(NULL),last_range(0),dont_free(0)
 {
   my_bitmap_map *bitmap;
   DBUG_ENTER("QUICK_RANGE_SELECT::QUICK_RANGE_SELECT");
@@ -1260,7 +1260,7 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT(
       head->set_keyread(FALSE);
       if (free_file)
       {
-        DBUG_PRINT("info", ("Freeing separate handler 0x%lx (free: %d)", (long) file,
+        DBUG_PRINT("info", ("Freeing separate handler %p (free: %d)", file,
                             free_file));
         file->ha_external_lock(current_thd, F_UNLCK);
         file->close();
@@ -1402,7 +1402,7 @@ int QUICK_RANGE_SELECT::init_ror_merged_
   in_ror_merged_scan= 1;
   if (reuse_handler)
   {
-    DBUG_PRINT("info", ("Reusing handler 0x%lx", (long) file));
+    DBUG_PRINT("info", ("Reusing handler %p", file));
     if (init() || reset())
     {
       DBUG_RETURN(1);
@@ -2321,7 +2321,6 @@ int SQL_SELECT::test_quick_select(THD *t
   keys_to_use.intersect(head->keys_in_use_for_query);
   if (!keys_to_use.is_clear_all())
   {
-    uchar buff[STACK_BUFF_ALLOC];
     MEM_ROOT alloc;
     SEL_TREE *tree= NULL;
     KEY_PART *key_parts;
@@ -8300,6 +8299,7 @@ FT_SELECT *get_ft_select(THD *thd, TABLE
     return fts;
 }
 
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
 static bool
 key_has_nulls(const KEY* key_info, const uchar *key, uint key_len)
 {
@@ -8317,6 +8317,7 @@ key_has_nulls(const KEY* key_info, const
   }
   return FALSE;
 }
+#endif
 
 /*
   Create quick select from ref/ref_or_null scan.
@@ -11734,7 +11735,7 @@ static void print_sel_tree(PARAM *param,
   if (!tmp.length())
     tmp.append(STRING_WITH_LEN("(empty)"));
 
-  DBUG_PRINT("info", ("SEL_TREE: 0x%lx (%s)  scans: %s", (long) tree, msg, tmp.ptr()));
+  DBUG_PRINT("info", ("SEL_TREE: %p (%s)  scans: %s", tree, msg, tmp.ptr()));
 
   DBUG_VOID_RETURN;
 }

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2010-03-25 11:14:23 +0000
+++ b/sql/sql_base.cc	2010-05-05 11:44:16 +0000
@@ -729,6 +729,7 @@ TABLE_SHARE *get_cached_table_share(cons
 }  
 
 
+#ifdef DISABLED_UNTIL_GRL_IS_MADE_PART_OF_MDL
 /**
    @brief Mark table share as having one more user (increase its reference
           count).
@@ -746,6 +747,7 @@ static void reference_table_share(TABLE_
                      (ulong) share, share->ref_count));
   DBUG_VOID_RETURN;
 }
+#endif
 
 
 /*

=== modified file 'sql/sql_select.h'
--- a/sql/sql_select.h	2010-04-22 15:47:22 +0000
+++ b/sql/sql_select.h	2010-05-05 10:54:22 +0000
@@ -334,12 +334,12 @@ typedef struct st_join_table
   bool check_only_first_match()
   {
     return  last_sj_inner_tab == this ||
-           first_inner && first_inner->last_inner == this &&
-           table->reginfo.not_exists_optimize;
+           (first_inner && first_inner->last_inner == this &&
+            table->reginfo.not_exists_optimize);
   }
   bool is_last_inner_table()
   {
-    return first_inner && first_inner->last_inner == this ||
+    return (first_inner && first_inner->last_inner == this) ||
            last_sj_inner_tab == this;
   }
   struct st_join_table *get_first_inner_table()

=== modified file 'sql/sql_update.cc'
--- a/sql/sql_update.cc	2010-03-25 11:14:23 +0000
+++ b/sql/sql_update.cc	2010-05-05 11:44:16 +0000
@@ -206,7 +206,6 @@ int mysql_update(THD *thd,
   ulonglong     id;
   List<Item> all_fields;
   THD::killed_state killed_status= THD::NOT_KILLED;
-  MDL_ticket *start_of_statement_svp= thd->mdl_context.mdl_savepoint();
   DBUG_ENTER("mysql_update");
 
   if (open_tables(thd, &table_list, &table_count, 0))
@@ -956,7 +955,6 @@ int mysql_multi_update_prepare(THD *thd)
   uint  table_count= lex->table_count;
   const bool using_lock_tables= thd->locked_tables_mode != LTM_NONE;
   bool original_multiupdate= (thd->lex->sql_command == SQLCOM_UPDATE_MULTI);
-  MDL_ticket *start_of_statement_svp= thd->mdl_context.mdl_savepoint();
   DBUG_ENTER("mysql_multi_update_prepare");
 
   /* following need for prepared statements, to run next time multi-update */

=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc	2010-04-20 14:21:32 +0000
+++ b/sql/sys_vars.cc	2010-05-05 11:44:16 +0000
@@ -2824,7 +2824,7 @@ static Sys_var_charptr Sys_slave_load_tm
 static bool fix_slave_net_timeout(sys_var *self, THD *thd, enum_var_type type)
 {
   mysql_mutex_lock(&LOCK_active_mi);
-  DBUG_PRINT("info", ("slave_net_timeout=%lu mi->heartbeat_period=%.3f",
+  DBUG_PRINT("info", ("slave_net_timeout=%u mi->heartbeat_period=%.3f",
                      slave_net_timeout,
                      (active_mi? active_mi->heartbeat_period : 0.0)));
   if (active_mi && slave_net_timeout < active_mi->heartbeat_period)


Attachment: [text/bzr-bundle] bzr/tor.didriksen@sun.com-20100505114416-qjr3yjf18wzsc33b.bundle
Thread
bzr push into mysql-next-mr-bugfixing branch (tor.didriksen:3127 to 3130) Tor Didriksen5 May