List:Internals« Previous MessageNext Message »
From:jani Date:September 23 2005 3:47pm
Subject:bk commit into 5.0 tree (jani:1.2001)
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
  1.2001 05/09/23 16:47:08 jani@stripped +18 -0
  Several fixes revelaled by Intel compiler.

  sql/sql_parse.cc
    1.494 05/09/23 16:47:01 jani@stripped +1 -2
    Removed unneccessary extra argument.

  sql/sql_base.cc
    1.306 05/09/23 16:47:01 jani@stripped +0 -3
    Removed unused label. The code below label was unused too, because
    there is a return just before.

  sql/mysql_priv.h
    1.355 05/09/23 16:47:01 jani@stripped +1 -1
    Bit overflow.

  server-tools/instance-manager/protocol.cc
    1.11 05/09/23 16:47:01 jani@stripped +7 -7
    Changed enum to int.
    Changed char to uchar.
    Added casts.

  server-tools/instance-manager/instance_options.cc
    1.24 05/09/23 16:47:00 jani@stripped +1 -1
    Fixed a typo.

  mysys/mf_iocache.c
    1.54 05/09/23 16:47:00 jani@stripped +2 -2
    Fixed invalid use of 0 to info->type. According to comment it
    should not have been set, but in earlier code by setting it
    to 0 would have been same as setting it to READ_CACHE. This
    probably was not desired, potential bug.

  myisam/sp_key.c
    1.10 05/09/23 16:47:00 jani@stripped +1 -1
    Added cast.

  myisam/myisampack.c
    1.48 05/09/23 16:47:00 jani@stripped +10 -8
    Added casts.

  myisam/myisamdef.h
    1.79 05/09/23 16:47:00 jani@stripped +2 -2
    Changed function type.

  myisam/myisamchk.c
    1.117 05/09/23 16:47:00 jani@stripped +1 -1
    Added cast.

  myisam/mi_test1.c
    1.27 05/09/23 16:47:00 jani@stripped +3 -2
    Added cast.

  myisam/mi_open.c
    1.94 05/09/23 16:47:00 jani@stripped +4 -3
    Added cast.
    Changed function types.

  myisam/mi_key.c
    1.45 05/09/23 16:47:00 jani@stripped +1 -1
    Added cast.

  myisam/ft_boolean_search.c
    1.93 05/09/23 16:46:59 jani@stripped +2 -1
    Added casts.

  include/my_sys.h
    1.171 05/09/23 16:46:59 jani@stripped +1 -1
    Added a new type, TYPE_NOT_SET.

  include/my_global.h
    1.109 05/09/23 16:46:59 jani@stripped +1 -1
    undef cannot be used on this predefined name.
    Since it is a custom fix for gcc 2.8.0, let's make it only
    effective in that case.

  dbug/my_main.c
    1.8 05/09/23 16:46:59 jani@stripped +1 -0
    Added an include to avoid implicit declaration of
    my_thread_global_init()

  cmd-line-utils/readline/complete.c
    1.13 05/09/23 16:46:59 jani@stripped +3 -1
    Added a cast.

# 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:	a193-229-222-105.elisa-laajakaista.fi
# Root:	/home/my/bk/mysql-5.0-icc

--- 1.7/dbug/my_main.c	2005-08-23 21:25:19 +03:00
+++ 1.8/dbug/my_main.c	2005-09-23 16:46:59 +03:00
@@ -8,6 +8,7 @@
 #endif
 
 #include <my_global.h>	/* This includes dbug.h */
+#include <my_pthread.h>
 
 int main (argc, argv)
 int argc;

--- 1.170/include/my_sys.h	2005-09-22 23:46:48 +03:00
+++ 1.171/include/my_sys.h	2005-09-23 16:46:59 +03:00
@@ -280,7 +280,7 @@
 
 enum cache_type
 {
-  READ_CACHE,WRITE_CACHE,
+  TYPE_NOT_SET, READ_CACHE, WRITE_CACHE,
   SEQ_READ_APPEND		/* sequential read or append */,
   READ_FIFO, READ_NET,WRITE_NET};
 

--- 1.44/myisam/mi_key.c	2005-06-08 13:17:34 +03:00
+++ 1.45/myisam/mi_key.c	2005-09-23 16:47:00 +03:00
@@ -358,7 +358,7 @@
   byte *blob_ptr;
   DBUG_ENTER("_mi_put_key_in_record");
 
-  blob_ptr= info->lastkey2;                     /* Place to put blob parts */
+  blob_ptr= (byte*) info->lastkey2;             /* Place to put blob parts */
   key=(byte*) info->lastkey;                    /* KEy that was read */
   key_end=key+info->lastkey_length;
   for (keyseg=info->s->keyinfo[keynr].seg ; keyseg->type ;keyseg++)

--- 1.93/myisam/mi_open.c	2005-07-19 15:13:37 +03:00
+++ 1.94/myisam/mi_open.c	2005-09-23 16:47:00 +03:00
@@ -199,7 +199,8 @@
       DBUG_PRINT("warning",("saved_base_info_length: %d  base_info_length: %d",
 			    len,MI_BASE_INFO_SIZE))
     }
-    disk_pos=my_n_base_info_read((uchar*) disk_cache + base_pos, &share->base);
+    disk_pos= (char*) 
+      my_n_base_info_read((uchar*) disk_cache + base_pos, &share->base);
     share->state.state_length=base_pos;
 
     if (!(open_flags & HA_OPEN_FOR_REPAIR) &&
@@ -863,7 +864,7 @@
 }
 
 
-char *mi_state_info_read(uchar *ptr, MI_STATE_INFO *state)
+uchar *mi_state_info_read(uchar *ptr, MI_STATE_INFO *state)
 {
   uint i,keys,key_parts,key_blocks;
   memcpy_fixed(&state->header,ptr, sizeof(state->header));
@@ -974,7 +975,7 @@
 }
 
 
-char *my_n_base_info_read(uchar *ptr, MI_BASE_INFO *base)
+uchar *my_n_base_info_read(uchar *ptr, MI_BASE_INFO *base)
 {
   base->keystart = mi_sizekorr(ptr);			ptr +=8;
   base->max_data_file_length = mi_sizekorr(ptr);	ptr +=8;

--- 1.26/myisam/mi_test1.c	2005-06-06 14:50:49 +03:00
+++ 1.27/myisam/mi_test1.c	2005-09-23 16:47:00 +03:00
@@ -237,7 +237,7 @@
       pos=HA_OFFSET_ERROR;
     }
     if (found != row_count)
-      printf("Found %ld of %ld rows\n", found,row_count);
+      printf("Found %ld of %ld rows\n", (ulong) found, (ulong) row_count);
   }
 
   if (!silent)
@@ -303,7 +303,8 @@
     if ((error=mi_rrnd(file,read_record,i == 1 ? 0L : HA_OFFSET_ERROR)) == -1)
     {
       if (found != row_count-deleted)
-	printf("Found only %ld of %ld rows\n",found,row_count-deleted);
+	printf("Found only %ld of %ld rows\n", (ulong) found,
+	       (ulong) (row_count - deleted));
       break;
     }
     if (!error)

--- 1.116/myisam/myisamchk.c	2005-09-21 18:38:03 +03:00
+++ 1.117/myisam/myisamchk.c	2005-09-23 16:47:00 +03:00
@@ -705,7 +705,7 @@
       fprintf(stderr, "Invalid value of stats_method: %s.\n", argument);
       exit(1);
     }
-    check_param.stats_method= method-1;
+    check_param.stats_method= (enum_mi_stats_method) (method-1);
     break;
   }
 #ifdef DEBUG					/* Only useful if debugging */

--- 1.78/myisam/myisamdef.h	2005-09-05 16:14:09 +03:00
+++ 1.79/myisam/myisamdef.h	2005-09-23 16:47:00 +03:00
@@ -679,10 +679,10 @@
 extern uint calc_pack_length(uint version, ulong length);
 
 uint mi_state_info_write(File file, MI_STATE_INFO *state, uint pWrite);
-char *mi_state_info_read(uchar *ptr, MI_STATE_INFO *state);
+uchar *mi_state_info_read(uchar *ptr, MI_STATE_INFO *state);
 uint mi_state_info_read_dsk(File file, MI_STATE_INFO *state, my_bool pRead);
 uint mi_base_info_write(File file, MI_BASE_INFO *base);
-char *my_n_base_info_read(uchar *ptr, MI_BASE_INFO *base);
+uchar *my_n_base_info_read(uchar *ptr, MI_BASE_INFO *base);
 int mi_keyseg_write(File file, const HA_KEYSEG *keyseg);
 char *mi_keyseg_read(char *ptr, HA_KEYSEG *keyseg);
 uint mi_keydef_write(File file, MI_KEYDEF *keydef);

--- 1.47/myisam/myisampack.c	2005-09-05 16:28:50 +03:00
+++ 1.48/myisam/myisampack.c	2005-09-23 16:47:00 +03:00
@@ -2008,7 +2008,7 @@
 static int write_header(PACK_MRG_INFO *mrg,uint head_length,uint trees,
 			my_off_t tot_elements,my_off_t filelength)
 {
-  byte *buff=file_buffer.pos;
+  byte *buff= (byte*) file_buffer.pos;
 
   bzero(buff,HEAD_LENGTH);
   memcpy_fixed(buff,myisam_pack_file_magic,4);
@@ -2024,7 +2024,7 @@
   if (test_only)
     return 0;
   VOID(my_seek(file_buffer.file,0L,MY_SEEK_SET,MYF(0)));
-  return my_write(file_buffer.file,file_buffer.pos,HEAD_LENGTH,
+  return my_write(file_buffer.file,(const byte *) file_buffer.pos,HEAD_LENGTH,
 		  MYF(MY_WME | MY_NABP | MY_WAIT_IF_FULL)) != 0;
 }
 
@@ -2472,7 +2472,7 @@
     {
       if (flush_buffer((ulong) max_calc_length + (ulong) max_pack_length))
 	break;
-      record_pos=file_buffer.pos;
+      record_pos= (byte*) file_buffer.pos;
       file_buffer.pos+=max_pack_length;
       for (start_pos=record, count= huff_counts; count < end_count ; count++)
       {
@@ -2795,7 +2795,8 @@
 static void init_file_buffer(File file, pbool read_buffer)
 {
   file_buffer.file=file;
-  file_buffer.buffer=my_malloc(ALIGN_SIZE(RECORD_CACHE_SIZE),MYF(MY_WME));
+  file_buffer.buffer= (uchar*) my_malloc(ALIGN_SIZE(RECORD_CACHE_SIZE),
+					 MYF(MY_WME));
   file_buffer.end=file_buffer.buffer+ALIGN_SIZE(RECORD_CACHE_SIZE)-8;
   file_buffer.pos_in_file=0;
   error_on_write=0;
@@ -2837,7 +2838,8 @@
   file_buffer.pos_in_file+=length;
   if (test_only)
     return 0;
-  if (error_on_write|| my_write(file_buffer.file,file_buffer.buffer,
+  if (error_on_write|| my_write(file_buffer.file,
+				(const byte*) file_buffer.buffer,
 				length,
 				MYF(MY_WME | MY_NABP | MY_WAIT_IF_FULL)))
   {
@@ -2850,13 +2852,13 @@
   {
     char *tmp;
     neaded_length+=256;				/* some margin */
-    tmp=my_realloc(file_buffer.buffer, neaded_length,MYF(MY_WME));
+    tmp= my_realloc((char*) file_buffer.buffer, neaded_length,MYF(MY_WME));
     if (!tmp)
       return 1;
     file_buffer.pos= ((uchar*) tmp +
                       (ulong) (file_buffer.pos - file_buffer.buffer));
-    file_buffer.buffer=tmp;
-    file_buffer.end=tmp+neaded_length-8;
+    file_buffer.buffer= (uchar*) tmp;
+    file_buffer.end= (uchar*) (tmp+neaded_length-8);
   }
   return 0;
 }

--- 1.53/mysys/mf_iocache.c	2005-06-13 13:41:06 +03:00
+++ 1.54/mysys/mf_iocache.c	2005-09-23 16:47:00 +03:00
@@ -165,7 +165,7 @@
 		      (ulong) info, (int) type, (ulong) seek_offset));
 
   info->file= file;
-  info->type= 0;		/* Don't set it until mutex are created */
+  info->type= TYPE_NOT_SET;	    /* Don't set it until mutex are created */
   info->pos_in_file= seek_offset;
   info->pre_close = info->pre_read = info->post_read = 0;
   info->arg = 0;
@@ -1246,7 +1246,7 @@
   if (info->type == SEQ_READ_APPEND)
   {
     /* Destroy allocated mutex */
-    info->type=0;
+    info->type= TYPE_NOT_SET;
 #ifdef THREAD
     pthread_mutex_destroy(&info->append_buffer_lock);
 #endif

--- 1.12/cmd-line-utils/readline/complete.c	2005-07-19 04:00:15 +03:00
+++ 1.13/cmd-line-utils/readline/complete.c	2005-09-23 16:46:59 +03:00
@@ -25,6 +25,7 @@
 
 #include <sys/types.h>
 #include <fcntl.h>
+
 #if defined (HAVE_SYS_FILE_H)
 #  include <sys/file.h>
 #endif
@@ -1149,7 +1150,8 @@
 	      rl_completion_found_quote &&
 	      rl_filename_quoting_desired)
 	    {
-	      dtext = (*rl_filename_dequoting_function) (text, rl_completion_quote_character);
+	      dtext = (*rl_filename_dequoting_function)
+		((char*) text, rl_completion_quote_character);
 	      text = dtext;
 	    }
 

--- 1.354/sql/mysql_priv.h	2005-09-21 18:42:25 +03:00
+++ 1.355/sql/mysql_priv.h	2005-09-23 16:47:01 +03:00
@@ -284,7 +284,7 @@
 /* Flag set if setup_tables already done */
 #define OPTION_SETUP_TABLES_DONE        (1L << 30) // intern
 /* If not set then the thread will ignore all warnings with level notes. */
-#define OPTION_SQL_NOTES                (1L << 31) // THD, user
+#define OPTION_SQL_NOTES                (1UL << 31) // THD, user
 /* 
   Force the used temporary table to be a MyISAM table (because we will use
   fulltext functions when reading from it.

--- 1.305/sql/sql_base.cc	2005-09-22 23:46:49 +03:00
+++ 1.306/sql/sql_base.cc	2005-09-23 16:47:01 +03:00
@@ -4791,9 +4791,6 @@
   }
   DBUG_RETURN(test(thd->net.report_error));
 
-err:
-  if (arena)
-    thd->restore_active_arena(arena, &backup);
 err_no_arena:
   DBUG_RETURN(1);
 }

--- 1.493/sql/sql_parse.cc	2005-09-21 18:42:28 +03:00
+++ 1.494/sql/sql_parse.cc	2005-09-23 16:47:01 +03:00
@@ -5644,8 +5644,7 @@
        and so on, the display width is ignored.
     */
     char buf[32];
-    my_snprintf(buf, sizeof(buf),
-                "TIMESTAMP(%s)", length, system_charset_info);
+    my_snprintf(buf, sizeof(buf), "TIMESTAMP(%s)", length);
     push_warning_printf(thd,MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_WARN_DEPRECATED_SYNTAX,
                         ER(ER_WARN_DEPRECATED_SYNTAX),

--- 1.9/myisam/sp_key.c	2005-05-20 16:48:12 +03:00
+++ 1.10/myisam/sp_key.c	2005-09-23 16:47:00 +03:00
@@ -142,7 +142,7 @@
   {
     if ((*wkb) > end - 8)
       return -1;
-    get_double(&ord, *wkb);
+    get_double(&ord, (const byte*) *wkb);
     (*wkb)+= 8;
     if (ord < *mbr)
       float8store((char*) mbr, ord);

--- 1.108/include/my_global.h	2005-09-15 20:00:20 +03:00
+++ 1.109/include/my_global.h	2005-09-23 16:46:59 +03:00
@@ -238,7 +238,7 @@
 
 
 /* Fix a bug in gcc 2.8.0 on IRIX 6.2 */
-#if SIZEOF_LONG == 4 && defined(__LONG_MAX__)
+#if SIZEOF_LONG == 4 && defined(__LONG_MAX__) && (__GNUC__ == 2 && __GNUC_MINOR__ == 8)
 #undef __LONG_MAX__             /* Is a longlong value in gcc 2.8.0 ??? */
 #define __LONG_MAX__ 2147483647
 #endif

--- 1.92/myisam/ft_boolean_search.c	2005-08-11 14:02:39 +03:00
+++ 1.93/myisam/ft_boolean_search.c	2005-09-23 16:46:59 +03:00
@@ -473,7 +473,8 @@
     for (;;)
     {
       n_word= (FT_WORD *)phrase_element->data;
-      if (my_strnncoll(cs, h_word.pos, h_word.len, n_word->pos, n_word->len))
+      if (my_strnncoll(cs, (const uchar *) h_word.pos, h_word.len,
+		       (const uchar *) n_word->pos, n_word->len))
         break;
       if (! (phrase_element= phrase_element->next))
         DBUG_RETURN(1);

--- 1.23/server-tools/instance-manager/instance_options.cc	2005-09-13 22:48:43 +03:00
+++ 1.24/server-tools/instance-manager/instance_options.cc	2005-09-23 16:47:00 +03:00
@@ -469,7 +469,7 @@
        case SAVE_WHOLE:
          *(selected_options->value)= tmp;
          return 0;
-       defaut:
+       default:
          break;
        }
    }

--- 1.10/server-tools/instance-manager/protocol.cc	2005-08-16 00:19:53 +03:00
+++ 1.11/server-tools/instance-manager/protocol.cc	2005-09-23 16:47:01 +03:00
@@ -74,7 +74,7 @@
             MYSQL_ERRMSG_SIZE];                 // message
   char *pos= buff;
 
-  enum { ERROR_PACKET_CODE= 255 };
+  int ERROR_PACKET_CODE= 255;
   *pos++= ERROR_PACKET_CODE;
   int2store(pos, sql_errno);
   pos+= 2;
@@ -95,7 +95,7 @@
             MYSQL_ERRMSG_SIZE];                 // message
   char *pos= buff;
 
-  enum { ERROR_PACKET_CODE= 255 };
+  int ERROR_PACKET_CODE= 255;
   *pos++= ERROR_PACKET_CODE;
   int2store(pos, sql_errno);
   pos+= 2;
@@ -148,14 +148,14 @@
 
 int send_eof(struct st_net *net)
 {
-  char buff[1 + /* eof packet code */
-            2 + /* warning count */
-            2]; /* server status */
+  uchar buff[1 + /* eof packet code */
+	     2 + /* warning count */
+	     2]; /* server status */
 
   buff[0]=254;
   int2store(buff+1, 0);
   int2store(buff+3, 0);
-  return my_net_write(net, buff, sizeof buff);
+  return my_net_write(net, (char*) buff, sizeof buff);
 }
 
 int send_fields(struct st_net *net, LIST *fields)
@@ -195,7 +195,7 @@
     int2store(send_buff.buffer + position, 1);          /* charsetnr */
     int4store(send_buff.buffer + position + 2,
               field->length);                           /* field length */
-    send_buff.buffer[position+6]= FIELD_TYPE_STRING;    /* type */
+    send_buff.buffer[position+6]= (uint) FIELD_TYPE_STRING;    /* type */
     int2store(send_buff.buffer + position + 7, 0);      /* flags */
     send_buff.buffer[position + 9]= (char) 0;           /* decimals */
     send_buff.buffer[position + 10]= 0;
Thread
bk commit into 5.0 tree (jani:1.2001)jani23 Sep