List:Commits« Previous MessageNext Message »
From:Luis Soares Date:September 29 2011 10:02am
Subject:bzr push into mysql-trunk-wl3584 branch (luis.soares:3469 to 3470) WL#3584
View as plain text  
 3470 Luis Soares	2011-09-29
      WL#3584
      
      Fixing a few compiler warnings and linking issues.
      
      (Credits go to Sven Sandberg)

    modified:
      sql/binlog.cc
      sql/zcompact.cc
      sql/zgroup_set.cc
      sql/zgroups.h
 3469 Luis Soares	2011-09-28
      WL#3584
      
      Fixing one more compiler warning.

    modified:
      sql/sys_vars.h
=== modified file 'sql/binlog.cc'
--- a/sql/binlog.cc	2011-09-25 16:40:06 +0000
+++ b/sql/binlog.cc	2011-09-29 10:01:11 +0000
@@ -531,12 +531,11 @@ static int binlog_close_connection(handl
   DBUG_ENTER("binlog_close_connection");
   binlog_cache_mngr *const cache_mngr= thd_get_cache_mngr(thd);
   DBUG_ASSERT(cache_mngr->trx_cache.is_binlog_empty() &&
-              cache_mngr->stmt_cache.is_binlog_empty()
+              cache_mngr->stmt_cache.is_binlog_empty());
 #ifdef HAVE_UGID
-              && cache_mngr->trx_cache.is_group_cache_empty()
-              && cache_mngr->stmt_cache.is_group_cache_empty()
-#endif
-              );
+  DBUG_ASSERT(cache_mngr->trx_cache.is_group_cache_empty() && 
+              cache_mngr->stmt_cache.is_group_cache_empty());
+#endif  
   thd_set_ha_data(thd, binlog_hton, NULL);
   cache_mngr->~binlog_cache_mngr();
   my_free(cache_mngr);

=== modified file 'sql/zcompact.cc'
--- a/sql/zcompact.cc	2011-09-28 14:17:30 +0000
+++ b/sql/zcompact.cc	2011-09-29 10:01:11 +0000
@@ -220,9 +220,11 @@ enum_read_status Compact_coder::read_str
                                             bool null_terminated)
 {
   DBUG_ENTER("Compact_coder::read_string(Reader *, uchar *, size_t *, size_t, bool)");
+  ulonglong length_ulonglong;
   if (null_terminated)
     max_length--;
-  PROPAGATE_READ_STATUS(read_unsigned(reader, length, max_length));
+  PROPAGATE_READ_STATUS(read_unsigned(reader, &length_ulonglong, max_length));
+  *length= (size_t) length_ulonglong;
   PROPAGATE_READ_STATUS_NOEOF(reader->read(buf, *length));
   buf[*length]= 0;
   DBUG_RETURN(READ_OK);

=== modified file 'sql/zgroup_set.cc'
--- a/sql/zgroup_set.cc	2011-09-18 16:55:17 +0000
+++ b/sql/zgroup_set.cc	2011-09-29 10:01:11 +0000
@@ -646,6 +646,8 @@ bool Group_set::contains_group(rpl_sidno
 int Group_set::to_string(char *buf, const Group_set::String_format *sf) const
 {
   DBUG_ENTER("Group_set::to_string");
+  if (sf == NULL)
+    sf= &default_string_format;;
   rpl_sidno map_max_sidno= sid_map->get_max_sidno();
   memcpy(buf, sf->begin, sf->begin_length);
   char *s= buf + sf->begin_length;
@@ -735,6 +737,8 @@ static int get_string_length(rpl_gno gno
 
 int Group_set::get_string_length(const Group_set::String_format *sf) const
 {
+  if (sf == NULL)
+    sf= &default_string_format;
   if (cached_string_length == -1 || cached_string_format != sf)
   {
     int n_sids= 0, n_intervals= 0, n_long_intervals= 0;

=== modified file 'sql/zgroups.h'
--- a/sql/zgroups.h	2011-09-26 13:11:26 +0000
+++ b/sql/zgroups.h	2011-09-29 10:01:11 +0000
@@ -1557,8 +1557,7 @@ public:
     @param string_format String_format object that specifies
     separators in the resulting text.
   */
-  int get_string_length(const String_format *string_format=
-                        &default_string_format) const;
+  int get_string_length(const String_format *string_format= NULL) const;
   /**
     Encodes this Group_set as a string.
 
@@ -1568,8 +1567,7 @@ public:
     separators in the resulting text.
     @return Length of the generated string.
   */
-  int to_string(char *buf, const String_format *string_format=
-                &default_string_format) const;
+  int to_string(char *buf, const String_format *string_format= NULL) const;
   /// The default String_format: the format understood by add(const char *).
   static const String_format default_string_format;
   /**

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl3584 branch (luis.soares:3469 to 3470) WL#3584Luis Soares2 Oct