List:Commits« Previous MessageNext Message »
From:jani Date:February 28 2007 2:22pm
Subject:bk commit into 5.0 tree (jani:1.2423)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jani. When jani does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-02-28 16:21:57+02:00, jani@stripped +11 -0
  Fixed compiler warnings.

  client/mysqltest.c@stripped, 2007-02-28 16:21:54+02:00, jani@stripped +1 -1
    Changed type to avoid warning.

  cmd-line-utils/readline/xmalloc.c@stripped, 2007-02-28 16:21:54+02:00, jani@stripped +3 -4
    Fix to avoid warning.

  include/my_dbug.h@stripped, 2007-02-28 16:21:54+02:00, jani@stripped +2 -0
    To disable parts from code in non-debug more.

  sql/field.cc@stripped, 2007-02-28 16:21:54+02:00, jani@stripped +3 -3
    Fixed warning.

  sql/ha_archive.cc@stripped, 2007-02-28 16:21:54+02:00, jani@stripped +1 -1
    Fixed warning.

  sql/ha_berkeley.cc@stripped, 2007-02-28 16:21:54+02:00, jani@stripped +3 -3
    Added casts to avoid warnings.

  sql/ha_ndbcluster.cc@stripped, 2007-02-28 16:21:54+02:00, jani@stripped +22 -7
    Fixed warnings.

  sql/log.cc@stripped, 2007-02-28 16:21:54+02:00, jani@stripped +2 -2
    Added casts to avoid warnings.

  sql/slave.cc@stripped, 2007-02-28 16:21:54+02:00, jani@stripped +2 -0
    Avoid warning.

  sql/sql_repl.cc@stripped, 2007-02-28 16:21:55+02:00, jani@stripped +2 -0
    Avoid warning.

  support-files/compiler_warnings.supp@stripped, 2007-02-28 16:21:55+02:00, jani@stripped +53 -3
    Added disabled warnings to compiler_warnings.supp file.
    These are backported mainly from 5.1 suppress file, but there
    are some additional new ones.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jani
# Host:	ua141d10.elisa.omakaista.fi
# Root:	/home/my/bk/mysql-5.0-marvel

--- 1.21/include/my_dbug.h	2007-02-28 16:22:04 +02:00
+++ 1.22/include/my_dbug.h	2007-02-28 16:22:04 +02:00
@@ -74,6 +74,7 @@
 #define DBUG_ASSERT(A) assert(A)
 #define DBUG_EXECUTE_IF(keyword,a1) \
         {if (_db_on_) {if (_db_strict_keyword_ (keyword)) { a1 }}}
+#define IF_DBUG(A) A
 #else						/* No debugger */
 
 #define DBUG_ENTER(a1)
@@ -98,6 +99,7 @@
 #define DBUG_OUTPUT(A)
 #define DBUG_ASSERT(A) {}
 #define DBUG_LEAVE
+#define IF_DBUG(A)
 #endif
 #ifdef	__cplusplus
 }

--- 1.8/cmd-line-utils/readline/xmalloc.c	2007-02-28 16:22:04 +02:00
+++ 1.9/cmd-line-utils/readline/xmalloc.c	2007-02-28 16:22:04 +02:00
@@ -39,8 +39,7 @@
 /* **************************************************************** */
 
 static void
-memory_error_and_abort (fname)
-     char *fname;
+memory_error_and_abort(const char *fname)
 {
   fprintf (stderr, "%s: out of virtual memory\n", fname);
   exit (2);
@@ -57,7 +56,7 @@
 
   temp = malloc (bytes);
   if (temp == 0)
-    memory_error_and_abort ((char*) "xmalloc");
+    memory_error_and_abort("xmalloc");
   return (temp);
 }
 
@@ -71,7 +70,7 @@
   temp = pointer ? realloc (pointer, bytes) : malloc (bytes);
 
   if (temp == 0)
-    memory_error_and_abort ((char*) "xrealloc");
+    memory_error_and_abort("xrealloc");
   return (temp);
 }
 

--- 1.339/sql/field.cc	2007-02-28 16:22:04 +02:00
+++ 1.340/sql/field.cc	2007-02-28 16:22:04 +02:00
@@ -6144,9 +6144,9 @@
 
 void Field_string::sort_string(char *to,uint length)
 {
-  uint tmp=my_strnxfrm(field_charset,
-		       (unsigned char *) to, length,
-		       (unsigned char *) ptr, field_length);
+  IF_DBUG(uint tmp=) my_strnxfrm(field_charset,
+                                 (unsigned char *) to, length,
+                                 (unsigned char *) ptr, field_length);
   DBUG_ASSERT(tmp == length);
 }
 

--- 1.166/sql/ha_berkeley.cc	2007-02-28 16:22:04 +02:00
+++ 1.167/sql/ha_berkeley.cc	2007-02-28 16:22:04 +02:00
@@ -807,7 +807,7 @@
     ptr+=BDB_HIDDEN_PRIMARY_KEY_LENGTH;
   }
   row->data=rec_buff;
-  row->size= (size_t) (ptr - rec_buff);
+  row->size= (u_int32_t) (ptr - rec_buff);
   return 0;
 }
 
@@ -902,7 +902,7 @@
 				   key_part->length);
     key_length-=key_part->length;
   }
-  key->size= (buff  - (char*) key->data);
+  key->size= (u_int32_t) (buff  - (char*) key->data);
   DBUG_DUMP("key",(char*) key->data, key->size);
   DBUG_RETURN(key);
 }
@@ -946,7 +946,7 @@
     key_ptr+=key_part->store_length;
     key_length-=key_part->store_length;
   }
-  key->size= (buff  - (char*) key->data);
+  key->size= (u_int32_t) (buff  - (char*) key->data);
   DBUG_DUMP("key",(char*) key->data, key->size);
   DBUG_RETURN(key);
 }

--- 1.202/sql/log.cc	2007-02-28 16:22:04 +02:00
+++ 1.203/sql/log.cc	2007-02-28 16:22:04 +02:00
@@ -304,7 +304,7 @@
 
   /* Register EventMessageFile */
   dwError = RegSetValueEx(hRegKey, "EventMessageFile", 0, REG_EXPAND_SZ,
-                          (PBYTE) szPath, strlen(szPath)+1);
+                          (PBYTE) szPath, (DWORD) (strlen(szPath) + 1));
 
   /* Register supported event types */
   dwTypes= (EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE |
@@ -1784,7 +1784,7 @@
 #ifdef HAVE_REPLICATION
     if (expire_logs_days)
     {
-      long purge_time= time(0) - expire_logs_days*24*60*60;
+      long purge_time= (long) (time(0) - expire_logs_days*24*60*60);
       if (purge_time >= 0)
         purge_logs_before_date(purge_time);
     }

--- 1.291/sql/slave.cc	2007-02-28 16:22:04 +02:00
+++ 1.292/sql/slave.cc	2007-02-28 16:22:04 +02:00
@@ -52,7 +52,9 @@
 
 int disconnect_slave_event_count = 0, abort_slave_event_count = 0;
 int events_till_abort = -1;
+#ifndef DBUG_OFF
 static int events_till_disconnect = -1;
+#endif
 
 typedef enum { SLAVE_THD_IO, SLAVE_THD_SQL} SLAVE_THD_TYPE;
 

--- 1.81/sql/ha_archive.cc	2007-02-28 16:22:04 +02:00
+++ 1.82/sql/ha_archive.cc	2007-02-28 16:22:04 +02:00
@@ -750,7 +750,7 @@
     if ((*field)->real_type() == MYSQL_TYPE_VARCHAR) 
     {
       uint actual_length= (*field)->data_length((char*) buf + (*field)->offset());
-      uint offset= (*field)->offset() + actual_length + 
+      IF_DBUG(uint offset=) (*field)->offset() + actual_length + 
         (actual_length > 255 ? 2 : 1);
       DBUG_PRINT("archive",("Offset is %d -> %d\n", actual_length, offset));
       /*

--- 1.5/support-files/compiler_warnings.supp	2007-02-28 16:22:04 +02:00
+++ 1.6/support-files/compiler_warnings.supp	2007-02-28 16:22:04 +02:00
@@ -1,26 +1,76 @@
+integer.cpp: .*control reaches end of non-void function.*: 1288-1427
 DictTabInfo.cpp : .*invalid access to non-static.*
 DictTabInfo.cpp : .*macro was used incorrectly.*
-DbdihMain.cpp : .*unused variable.* : 6666-6705
-DbtupExecQuery.cpp : .*unused variable.* : 1448-1449
+DbdihMain.cpp : .*unused variable.* : 6666-7013
+DbtupExecQuery.cpp : .*unused variable.* : 1448-1449 
+kernel_types.h : .*only defines private constructors and has no friends.* : 51
+Dbtup.hpp:   .*only defines private constructors and has no friends.*
+diskpage.hpp:   .*only defines private constructors and has no friends.*
+tuppage.hpp:   .*only defines private constructors and has no friends.*
+NdbScanOperation.cpp: .*unused variable '__align'.* : 1190-1200
+sql_yacc.cc : .*label 'yyerrlab1' defined but not used.*
+kernel_types.h : .*'struct Local_key' only defines private constructors and has no friends.*
+lgman.hpp : .*'struct Lgman::Buffer_idx' only defines private constructors and has no friends.*
+SchemaFile.hpp : .*'struct SchemaFile::TableEntry' only defines private constructors and has no friends.*
 sql_yacc.cc : .*switch statement contains 'default' but no 'case' labels.*
 
 #
+# Things that can be ignored in InnoDB
+#
+pars0grm.tab.c: .*'yyerrorlab' : unreferenced label.*
+_flex_tmp.c: .*not enough actual parameters for macro 'yywrap'.*
+pars0lex.l: .*conversion from 'ulint' to 'int', possible loss of data.*
+
+#
 # bdb is not critical to keep up to date
 #
 .*/bdb/.* : .*discards qualifiers from pointer target type.*
 .*/bdb/.* : .*unused parameter.*
 .*/bdb/.* : .*may be used uninitialized.*
 .*/bdb/.* : .*empty body in an if-statement.*
+.*/bdb/.* : .*conversion from 'u?lint' to 'int', possible loss of data.*
 db_vrfy.c : .*comparison is always false due to limited range of data type.*
 
 #
 # Ignore all conversion warnings on windows 64
 # (Is safe as we are not yet supporting strings >= 2G)
 #
-.* : conversion from 'size_t' to .*int'.*
 .* : conversion from '__int64' to .*int'.*
+.* : conversion from '__int64' to 'uint8'.*
+.* : conversion from '__int64' to 'uint32'.*
+.* : conversion from '__int64' to 'u.*long'.*
+.* : conversion from '__int64' to 'long'.*
+.* : conversion from '__int64' to 'off_t'.*
+.* : conversion from '.*size_t' to .*int'.*
+.* : conversion from '.*size_t' to 'TaoCrypt::word32'.*
+.* : conversion from '.*size_t' to 'u.*long'.*
+.* : conversion from '.*size_t' to 'uint32'.*
+.* : conversion from '.*size_t' to 'off_t'.*
+.* : conversion from '.*size_t' to 'size_s'.*
+ha_berkeley.cc : .*conversion from 'ulonglong' to 'char'.*
 
 #
 # The following should be fixed by the ndb team
 #
 .*/ndb/.* : .*used uninitialized in this function.*
+.*/ndb/.* : .*unused variable.*
+.*/ndb/.* : .*defined but not used.*
+
+#
+# Unexplanable (?) stuff
+#
+listener.cc : .*conversion from 'SOCKET' to 'int'.*
+net_serv.cc : .*conversion from 'SOCKET' to 'int'.*
+mi_packrec.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 567
+
+#
+# Wrong compiler warnings
+#
+.* : .*no matching operator delete found; memory will not be freed if initialization throws an exception.*
+
+#
+# Viossl warnings - fixed in 5.1, disabled in 5.0. Too large to be changed
+# in 5.0. Please do not merge upwards.
+#
+socket_wrapper.cpp : .*truncation of constant value.*
+viossl.c : .*conversion from 'SOCKET' to 'socket_t'.*

--- 1.299/sql/ha_ndbcluster.cc	2007-02-28 16:22:04 +02:00
+++ 1.300/sql/ha_ndbcluster.cc	2007-02-28 16:22:04 +02:00
@@ -2331,10 +2331,12 @@
   {
     Ndb *ndb= get_ndb();
     Uint64 next_val= (Uint64) table->next_number_field->val_int() + 1;
+#ifndef DBUG_OFF
     char buff[22];
     DBUG_PRINT("info", 
                ("Trying to set next auto increment value to %s",
                 llstr(next_val, buff)));
+#endif
     if (ndb->setAutoIncrementValue((const NDBTAB *) m_table, next_val, TRUE)
         == -1)
       ERR_RETURN(ndb->getNdbError());
@@ -3490,7 +3492,7 @@
       }
       else
       {
-        int res= trans->restart();
+        IF_DBUG(int res=) trans->restart();
         DBUG_ASSERT(res == 0);
       }
     }
@@ -4257,7 +4259,9 @@
   // Set autoincrement
   if (field->flags & AUTO_INCREMENT_FLAG) 
   {
+#ifndef DBUG_OFF
     char buff[22];
+#endif
     col.setAutoIncrement(TRUE);
     ulonglong value= info->auto_increment_value ?
       info->auto_increment_value : (ulonglong) 1;
@@ -5680,7 +5684,9 @@
     if (share->commit_count != 0)
     {
       *commit_count= share->commit_count;
+#ifndef DBUG_OFF
       char buff[22];
+#endif
       DBUG_PRINT("info", ("Getting commit_count: %s from share",
                           llstr(share->commit_count, buff)));
       pthread_mutex_unlock(&share->mutex);
@@ -5706,7 +5712,9 @@
   pthread_mutex_lock(&share->mutex);
   if (share->commit_count_lock == lock)
   {
+#ifndef DBUG_OFF
     char buff[22];
+#endif
     DBUG_PRINT("info", ("Setting commit_count to %s",
                         llstr(stat.commit_count, buff)));
     share->commit_count= stat.commit_count;
@@ -5762,7 +5770,9 @@
   bool is_autocommit= !(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN));
   char *dbname= full_name;
   char *tabname= dbname+strlen(dbname)+1;
+#ifndef DBUG_OFF
   char buff[22], buff2[22];
+#endif
   DBUG_ENTER("ndbcluster_cache_retrieval_allowed");
   DBUG_PRINT("enter", ("dbname: %s, tabname: %s, is_autocommit: %d",
                        dbname, tabname, is_autocommit));
@@ -5829,7 +5839,9 @@
                                           ulonglong *engine_data)
 {
   Uint64 commit_count;
+#ifndef DBUG_OFF
   char buff[22];
+#endif
   bool is_autocommit= !(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN));
   DBUG_ENTER("ha_ndbcluster::register_query_cache_table");
   DBUG_PRINT("enter",("dbname: %s, tabname: %s, is_autocommit: %d",
@@ -6036,7 +6048,9 @@
   int retries= 10;
   int reterr= 0;
   int retry_sleep= 30 * 1000; /* 30 milliseconds */
+#ifndef DBUG_OFF
   char buff[22], buff2[22], buff3[22], buff4[22];
+#endif
   DBUG_ENTER("ndb_get_table_statistics");
   DBUG_PRINT("enter", ("table: %s", table));
 
@@ -6725,7 +6739,9 @@
 
       if (ndb_get_table_statistics(NULL, false, ndb, tabname, &stat) == 0)
       {
+#ifndef DBUG_OFF
         char buff[22], buff2[22];
+#endif
         DBUG_PRINT("ndb_util_thread",
                    ("Table: %s  commit_count: %s  rows: %s",
                     share->table_name,
@@ -7565,8 +7581,8 @@
           DBUG_PRINT("info", ("INT_ITEM"));
           if (context->expecting(Item::INT_ITEM)) 
           {
-            Item_int *int_item= (Item_int *) item;      
-            DBUG_PRINT("info", ("value %ld", (long) int_item->value));
+            DBUG_PRINT("info", ("value %ld",
+                                (long) ((Item_int*) item)->value));
             NDB_ITEM_QUALIFICATION q;
             q.value_type= Item::INT_ITEM;
             curr_cond->ndb_item= new Ndb_item(NDB_VALUE, q, item);
@@ -7592,8 +7608,7 @@
           DBUG_PRINT("info", ("REAL_ITEM"));
           if (context->expecting(Item::REAL_ITEM)) 
           {
-            Item_float *float_item= (Item_float *) item;      
-            DBUG_PRINT("info", ("value %f", float_item->value));
+            DBUG_PRINT("info", ("value %f", ((Item_float *) item)->value));
             NDB_ITEM_QUALIFICATION q;
             q.value_type= Item::REAL_ITEM;
             curr_cond->ndb_item= new Ndb_item(NDB_VALUE, q, item);
@@ -7640,8 +7655,8 @@
           DBUG_PRINT("info", ("DECIMAL_ITEM"));
           if (context->expecting(Item::DECIMAL_ITEM)) 
           {
-            Item_decimal *decimal_item= (Item_decimal *) item;      
-            DBUG_PRINT("info", ("value %f", decimal_item->val_real()));
+            DBUG_PRINT("info", ("value %f",
+                                ((Item_decimal*) item)->val_real()));
             NDB_ITEM_QUALIFICATION q;
             q.value_type= Item::DECIMAL_ITEM;
             curr_cond->ndb_item= new Ndb_item(NDB_VALUE, q, item);

--- 1.277/client/mysqltest.c	2007-02-28 16:22:04 +02:00
+++ 1.278/client/mysqltest.c	2007-02-28 16:22:04 +02:00
@@ -6726,7 +6726,7 @@
 
         if (back_ref_num >= 0 && back_ref_num <= (int)r.re_nsub)
         {
-          int start_off,end_off;
+          regoff_t start_off, end_off;
           if ((start_off=subs[back_ref_num].rm_so) > -1 &&
               (end_off=subs[back_ref_num].rm_eo) > -1)
           {

--- 1.156/sql/sql_repl.cc	2007-02-28 16:22:04 +02:00
+++ 1.157/sql/sql_repl.cc	2007-02-28 16:22:04 +02:00
@@ -22,7 +22,9 @@
 
 int max_binlog_dump_events = 0; // unlimited
 my_bool opt_sporadic_binlog_dump_fail = 0;
+#ifndef DBUG_OFF
 static int binlog_dump_count = 0;
+#endif
 
 /*
     fake_rotate_event() builds a fake (=which does not exist physically in any
Thread
bk commit into 5.0 tree (jani:1.2423)jani28 Feb