List:Internals« Previous MessageNext Message »
From:monty Date:July 18 2005 3:42pm
Subject:bk commit into 5.0 tree (monty:1.1943)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of monty. When monty 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.1943 05/07/18 18:42:19 monty@stripped +18 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.0
  into  mishka.local:/home/my/mysql-5.0

  mysys/default.c
    1.75 05/07/18 18:42:13 monty@stripped +0 -0
    SCCS merged

  sql/sql_select.cc
    1.339 05/07/18 18:36:16 monty@stripped +0 -0
    Auto merged

  tests/mysql_client_test.c
    1.141 05/07/18 18:36:17 monty@stripped +0 -0
    Auto merged

  sql/sql_yacc.yy
    1.408 05/07/18 18:36:17 monty@stripped +0 -0
    Auto merged

  sql/sql_show.cc
    1.254 05/07/18 18:36:17 monty@stripped +0 -0
    Auto merged

  sql/sql_prepare.cc
    1.139 05/07/18 18:36:16 monty@stripped +0 -0
    Auto merged

  sql/sql_parse.cc
    1.447 05/07/18 18:36:16 monty@stripped +0 -0
    Auto merged

  sql/sql_cache.cc
    1.80 05/07/18 18:36:15 monty@stripped +0 -0
    Auto merged

  sql/opt_range.cc
    1.183 05/07/18 18:36:11 monty@stripped +0 -0
    Auto merged

  sql/mysqld.cc
    1.481 05/07/18 18:36:11 monty@stripped +0 -0
    Auto merged

  sql/log.cc
    1.165 05/07/18 18:36:11 monty@stripped +0 -0
    Auto merged

  sql/item_strfunc.cc
    1.243 05/07/18 18:36:11 monty@stripped +0 -0
    Auto merged

  sql/item_cmpfunc.cc
    1.164 05/07/18 18:36:10 monty@stripped +0 -0
    Auto merged

  sql/ha_ndbcluster.cc
    1.192 05/07/18 18:36:10 monty@stripped +0 -0
    Auto merged

  sql/ha_innodb.cc
    1.226 05/07/18 18:36:10 monty@stripped +0 -0
    Auto merged

  mysys/Makefile.am
    1.64 05/07/18 18:36:10 monty@stripped +0 -0
    Auto merged

  include/my_sys.h
    1.161 05/07/18 18:36:10 monty@stripped +0 -0
    Auto merged

  client/mysqldump.c
    1.189 05/07/18 18:36:10 monty@stripped +0 -0
    Auto merged

# 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:	monty
# Host:	mishka.local
# Root:	/home/my/mysql-5.0/RESYNC

--- 1.188/client/mysqldump.c	2005-07-12 04:23:42 +03:00
+++ 1.189/client/mysqldump.c	2005-07-18 18:36:10 +03:00
@@ -1212,7 +1212,7 @@
   opt_quoted_table= quote_name(table, table_buff2, 0);
 
   if (opt_order_by_primary)
-    order_by = primary_key_fields(opt_quoted_table);
+    order_by = primary_key_fields(result_table);
 
   if (!opt_xml && !mysql_query_with_error_report(sock, 0, query_buff))
   {
@@ -1272,7 +1272,7 @@
 
         /* Create temp table by selecting from the view */
         my_snprintf(query_buff, sizeof(query_buff),
-                    "CREATE  TEMPORARY TABLE %s SELECT * FROM %s WHERE 0",
+                    "CREATE TEMPORARY TABLE %s SELECT * FROM %s WHERE 0",
                     result_table, result_table);
         if (mysql_query_with_error_report(sock, 0, query_buff))
         {
@@ -1391,7 +1391,7 @@
 	fprintf(sql_file, "\n--\n-- Table structure for table %s\n--\n\n",
 		result_table);
       if (opt_drop)
-        fprintf(sql_file, "DROP TABLE IF EXISTS %s;\n",result_table);
+        fprintf(sql_file, "DROP TABLE IF EXISTS %s;\n", result_table);
       if (!opt_xml)
 	fprintf(sql_file, "CREATE TABLE %s (\n", result_table);
       else
@@ -2782,6 +2782,7 @@
     or if there is some failure.  It is better to continue to dump
     the table unsorted, rather than exit without dumping the data.
 */
+
 static char *primary_key_fields(const char *table_name)
 {
   MYSQL_RES  *res = NULL;
@@ -2818,11 +2819,13 @@
   }
 
   /* Build the ORDER BY clause result */
-  if (result_length) {
+  if (result_length)
+  {
     char *end;
     /* result (terminating \0 is already in result_length) */
     result = my_malloc(result_length + 10, MYF(MY_WME));
-    if (!result) {
+    if (!result)
+    {
       fprintf(stderr, "Error: Not enough memory to store ORDER BY clause\n");
       goto cleanup;
     }

--- 1.160/include/my_sys.h	2005-07-05 19:46:01 +03:00
+++ 1.161/include/my_sys.h	2005-07-18 18:36:10 +03:00
@@ -263,7 +263,7 @@
 extern char	wild_many,wild_one,wild_prefix;
 extern const char *charsets_dir;
 extern char *defaults_extra_file;
-extern  const char *defaults_instance;
+extern const char *defaults_group_suffix;
 
 extern my_bool timed_mutexes;
 
@@ -785,8 +785,9 @@
 extern char *strdup_root(MEM_ROOT *root,const char *str);
 extern char *strmake_root(MEM_ROOT *root,const char *str,uint len);
 extern char *memdup_root(MEM_ROOT *root,const char *str,uint len);
-extern void get_defaults_files(int argc, char **argv,
-                               char **defaults, char **extra_defaults);
+extern int get_defaults_options(int argc, char **argv,
+                                char **defaults, char **extra_defaults,
+                                char **group_suffix);
 extern int load_defaults(const char *conf_file, const char **groups,
 			 int *argc, char ***argv);
 extern int modify_defaults_file(const char *file_location, const char *option,

--- 1.63/mysys/Makefile.am	2005-07-06 01:02:29 +03:00
+++ 1.64/mysys/Makefile.am	2005-07-18 18:36:10 +03:00
@@ -45,7 +45,7 @@
 			ptr_cmp.c mf_radix.c queues.c \
 			tree.c list.c hash.c array.c string.c typelib.c \
 			my_copy.c my_append.c my_lib.c \
-			my_delete.c my_rename.c my_redel.c my_tempnam.c \
+			my_delete.c my_rename.c my_redel.c \
 			my_chsize.c my_lread.c my_lwrite.c my_clock.c \
 			my_quick.c my_lockmem.c my_static.c \
 			my_sync.c my_getopt.c my_mkdir.c \
@@ -69,6 +69,7 @@
 			-DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \
 			-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
 			-DDEFAULT_HOME_ENV=MYSQL_HOME \
+			-DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX \
                         @DEFS@
 
 libmysys_a_DEPENDENCIES= @THREAD_LOBJECTS@

--- 1.74/mysys/default.c	2005-07-06 20:48:36 +03:00
+++ 1.75/mysys/default.c	2005-07-18 18:42:13 +03:00
@@ -30,8 +30,8 @@
  --no-defaults	; no options are read.
  --defaults-file=full-path-to-default-file	; Only this file will be read.
  --defaults-extra-file=full-path-to-default-file ; Read this file before ~/
- --print-defaults	; Print the modified command line and exit
- --instance ; also read groups with concat(group, instance)
+ --defaults-group-suffix  ; Also read groups with concat(group, suffix)
+ --print-defaults	  ; Print the modified command line and exit
 ****************************************************************************/
 
 #include "mysys_priv.h"
@@ -42,8 +42,7 @@
 #include <winbase.h>
 #endif
 
-const char *defaults_instance=0;
-static const char instance_option[] = "--instance=";
+const char *defaults_group_suffix=0;
 char *defaults_extra_file=0;
 
 /* Which directories are searched for options (and in which order) */
@@ -61,6 +60,9 @@
 #define NEWLINE "\n"
 #endif
 
+static int handle_default_option(void *in_ctx, const char *group_name,
+                                 const char *option);
+
 /*
    This structure defines the context that we pass to callback
    function 'handle_default_option' used in search_default_file
@@ -101,35 +103,81 @@
   func_ctx                    It's context. Usually it is the structure to
                               store additional options.
   DESCRIPTION
+    Process the default options from argc & argv
+    Read through each found config file looks and calls 'func' to process
+    each option.
+
+  NOTES
+    --defaults-group-suffix is only processed if we are called from
+    load_defaults().
 
-  This function looks for config files in default directories. Then it
-  travesrses each of the files and calls func to process each option.
 
   RETURN
     0  ok
     1  given cinf_file doesn't exist
+
+    The global variable 'defaults_group_suffix' is updated with value for
+    --defaults_group_suffix
 */
 
 int my_search_option_files(const char *conf_file, int *argc, char ***argv,
-                        uint *args_used, Process_option_func func,
-                        void *func_ctx)
+                           uint *args_used, Process_option_func func,
+                           void *func_ctx)
 {
   const char **dirs, *forced_default_file, *forced_extra_defaults;
   int error= 0;
   DBUG_ENTER("my_search_option_files");
 
   /* Check if we want to force the use a specific default file */
-  get_defaults_files(*argc - *args_used, *argv + *args_used,
-                      (char **)&forced_default_file,
-                      (char **)&forced_extra_defaults);
-  if (forced_default_file)
-    forced_default_file= strchr(forced_default_file,'=')+1;
-  if (forced_extra_defaults)
-    defaults_extra_file= strchr(forced_extra_defaults,'=')+1;
+  *args_used+= get_defaults_options(*argc - *args_used, *argv + *args_used,
+                                    (char **) &forced_default_file,
+                                    (char **) &forced_extra_defaults,
+                                    (char **) &defaults_group_suffix);
 
-  (*args_used)+= (forced_default_file ? 1 : 0) +
-                 (forced_extra_defaults ? 1 : 0);
+  if (! defaults_group_suffix)
+    defaults_group_suffix= getenv(STRINGIFY_ARG(DEFAULT_GROUP_SUFFIX_ENV));
+  
+  /*
+    We can only handle 'defaults-group-suffix' if we are called from
+    load_defaults() as otherwise we can't know the type of 'func_ctx'
+  */
 
+  if (defaults_group_suffix && func == handle_default_option)
+  {
+    /* Handle --defaults-group-suffix= */
+    uint i;
+    const char **extra_groups;
+    const uint instance_len= strlen(defaults_group_suffix); 
+    struct handle_option_ctx *ctx= (struct handle_option_ctx*) func_ctx;
+    char *ptr;
+    TYPELIB *group= ctx->group;
+    
+    if (!(extra_groups= 
+	  (const char**)alloc_root(ctx->alloc,
+                                   (2*group->count+1)*sizeof(char*))))
+      goto err;
+    
+    for (i= 0; i < group->count; i++)
+    {
+      uint len;
+      extra_groups[i]= group->type_names[i]; /** copy group */
+      
+      len= strlen(extra_groups[i]);
+      if (!(ptr= alloc_root(ctx->alloc, len+instance_len+1)))
+	goto err;
+      
+      extra_groups[i+group->count]= ptr;
+      
+      /** Construct new group */
+      memcpy(ptr, extra_groups[i], len);
+      memcpy(ptr+len, defaults_group_suffix, instance_len+1);
+    }
+    
+    group->count*= 2;
+    group->type_names= extra_groups;
+    group->type_names[group->count]= 0;
+  }
+  
   if (forced_default_file)
   {
     if ((error= search_default_file_with_ext(func, func_ctx, "", "",
@@ -222,32 +270,54 @@
 
 
 /*
-  Gets --defaults-file and --defaults-extra-file options from command line.
+  Gets options from the command line
 
   SYNOPSIS
-    get_defaults_files()
+    get_defaults_options()
     argc			Pointer to argc of original program
     argv			Pointer to argv of original program
     defaults                    --defaults-file option
     extra_defaults              --defaults-extra-file option
 
   RETURN
-    defaults and extra_defaults will be set to appropriate items
-    of argv array, or to NULL if there are no such options
+    # Number of arguments used from *argv
+      defaults and extra_defaults will be set to option of the appropriate
+      items of argv array, or to NULL if there are no such options
 */
 
-void get_defaults_files(int argc, char **argv,
-                        char **defaults, char **extra_defaults)
+int get_defaults_options(int argc, char **argv,
+                         char **defaults,
+                         char **extra_defaults,
+                         char **group_suffix)
 {
-  *defaults=0;
-  *extra_defaults=0;
-  if (argc >= 2)
-  {
-    if (is_prefix(argv[1],"--defaults-file="))
-      *defaults= argv[1];
-    else if (is_prefix(argv[1],"--defaults-extra-file="))
-      *extra_defaults= argv[1];
+  int org_argc= argc, prev_argc= 0;
+  *defaults= *extra_defaults= *group_suffix= 0;
+
+  while (argc >= 2 && argc != prev_argc)
+  {
+    /* Skip program name or previously handled argument */
+    argv++;
+    prev_argc= argc;                            /* To check if we found */
+    if (!*defaults && is_prefix(*argv,"--defaults-file="))
+    {
+      *defaults= *argv + sizeof("--defaults-file=")-1;
+       argc--;
+       continue;
+    }
+    if (!*extra_defaults && is_prefix(*argv,"--defaults-extra-file="))
+    {
+      *extra_defaults= *argv + sizeof("--defaults-extra-file=")-1;
+      argc--;
+      continue;
+    }
+    if (!*group_suffix && is_prefix(*argv, "--defaults-group-suffix="))
+    {
+      *group_suffix= *argv + sizeof("--defaults-group-suffix=")-1;
+      argc--;
+      continue;
+    }
   }
+  return org_argc - argc;
 }
 
 
@@ -297,6 +367,10 @@
 
   init_default_directories();
   init_alloc_root(&alloc,512,0);
+  /*
+    Check if the user doesn't want any default option processing
+    --no-defaults is always the first option
+  */
   if (*argc >= 2 && !strcmp(argv[0][1],"--no-defaults"))
   {
     /* remove the --no-defaults argument and return only the other arguments */
@@ -329,51 +403,8 @@
   ctx.args= &args;
   ctx.group= &group;
 
-  if (*argc >= 2 && 
-      is_prefix(argv[0][1], instance_option))
-  {
-    args_used++;
-    defaults_instance= argv[0][args_used]+sizeof(instance_option)-1;
-  }
-  else 
-  {
-    defaults_instance= getenv("MYSQL_INSTANCE");
-  }
-  
-  if (defaults_instance)
-  {
-    /** Handle --instance= */
-    uint i, len;
-    const char **extra_groups;
-    const uint instance_len= strlen(defaults_instance);
-    
-    if (!(extra_groups= 
-	  (const char**)alloc_root(&alloc, (2*group.count+1)*sizeof(char*))))
-      goto err;
-    
-    for (i= 0; i<group.count; i++)
-    {
-      extra_groups[i]= group.type_names[i]; /** copy group */
-      
-      len= strlen(extra_groups[i]);
-      if (!(ptr= alloc_root(&alloc, len+instance_len+1)))
-	goto err;
-      
-      extra_groups[i+group.count]= ptr;
-      
-      /** Construct new group */
-      memcpy(ptr, extra_groups[i], len);
-      ptr+= len;
-      memcpy(ptr, defaults_instance, instance_len+1);
-    }
-    
-    group.count*= 2;
-    group.type_names= extra_groups;
-    group.type_names[group.count]= 0;
-  }
-  
   error= my_search_option_files(conf_file, argc, argv, &args_used,
-                      handle_default_option, (void *) &ctx);
+                                handle_default_option, (void *) &ctx);
   /*
     Here error contains <> 0 only if we have a fully specified conf_file
     or a forced default file
@@ -386,11 +417,14 @@
   /* copy name + found arguments + command line arguments to new array */
   res[0]= argv[0][0];  /* Name MUST be set, even by embedded library */
   memcpy((gptr) (res+1), args.buffer, args.elements*sizeof(char*));
-  /* Skip --defaults-file and --defaults-extra-file */
+  /* Skip --defaults-xxx options */
   (*argc)-= args_used;
   (*argv)+= args_used;
 
-  /* Check if we wan't to see the new argument list */
+  /*
+    Check if we wan't to see the new argument list
+    This options must always be the last of the default options
+  */
   if (*argc >= 2 && !strcmp(argv[0][1],"--print-defaults"))
   {
     found_print_defaults=1;
@@ -851,14 +885,14 @@
     fputs(*groups,stdout);
   }
 
-  if (defaults_instance)
+  if (defaults_group_suffix)
   {
     groups= groups_save;
     for ( ; *groups ; groups++)
     {
       fputc(' ',stdout);
       fputs(*groups,stdout);
-      fputs(defaults_instance,stdout);
+      fputs(defaults_group_suffix,stdout);
     }
   }
   puts("\nThe following options may be given as the first argument:\n\

--- 1.163/sql/item_cmpfunc.cc	2005-07-16 00:17:01 +03:00
+++ 1.164/sql/item_cmpfunc.cc	2005-07-18 18:36:10 +03:00
@@ -2184,7 +2184,13 @@
     return;
 
   for (arg=args+1, arg_end=args+arg_count; arg != arg_end ; arg++)
-    const_itm&= arg[0]->const_item();
+  {
+    if (!arg[0]->const_item())
+    {
+      const_itm= 0;
+      break;
+    }
+  }
 
   /*
     Row item with NULLs inside can return NULL or FALSE => 

--- 1.242/sql/item_strfunc.cc	2005-07-16 00:06:12 +03:00
+++ 1.243/sql/item_strfunc.cc	2005-07-18 18:36:11 +03:00
@@ -2118,7 +2118,7 @@
 			func_name(), current_thd->variables.max_allowed_packet);
     goto err;
   }
-  if(args[2]->null_value || !pad_char_length)
+  if (args[2]->null_value || !pad_char_length)
     goto err;
   res_byte_length= res->length();	/* Must be done before alloc_buffer */
   if (!(res= alloc_buffer(res,str,&tmp_value,byte_count)))

--- 1.164/sql/log.cc	2005-07-13 03:12:57 +03:00
+++ 1.165/sql/log.cc	2005-07-18 18:36:11 +03:00
@@ -2650,7 +2650,7 @@
   {                                          // somebody's syncing. let's wait
     p->waiters++;
     /*
-      note - it must be while(), not do ... while() here
+      note - it must be while (), not do ... while () here
       as p->state may be not DIRTY when we come here
     */
     while (p->state == DIRTY && syncing)

--- 1.480/sql/mysqld.cc	2005-07-16 15:10:36 +03:00
+++ 1.481/sql/mysqld.cc	2005-07-18 18:36:11 +03:00
@@ -882,7 +882,7 @@
     unireg_end();
 
 #ifdef __NETWARE__
-  if(!event_flag)
+  if (!event_flag)
     pthread_join(select_thread, NULL);		// wait for main thread
 #endif /* __NETWARE__ */
 

--- 1.182/sql/opt_range.cc	2005-07-16 18:15:20 +03:00
+++ 1.183/sql/opt_range.cc	2005-07-18 18:36:11 +03:00
@@ -630,7 +630,7 @@
 {
   SEL_IMERGE *imerge;
   List_iterator<SEL_IMERGE> it(*im1);
-  while((imerge= it++))
+  while ((imerge= it++))
   {
     if (imerge->or_sel_tree_with_checks(param, tree))
       it.remove();
@@ -990,7 +990,7 @@
       DBUG_RETURN(1);
     quick->file->extra(HA_EXTRA_KEYREAD_PRESERVE_FIELDS);
   }
-  while((quick= quick_it++))
+  while ((quick= quick_it++))
   {
     if (quick->init_ror_merged_scan(FALSE))
       DBUG_RETURN(1);
@@ -6943,7 +6943,7 @@
   List_iterator<Item> select_items_it(join->fields_list);
 
   /* Check (SA1,SA4) and store the only MIN/MAX argument - the C attribute.*/
-  if(join->make_sum_func_list(join->all_fields, join->fields_list, 1))
+  if (join->make_sum_func_list(join->all_fields, join->fields_list, 1))
     DBUG_RETURN(NULL);
   if (join->sum_funcs[0])
   {
@@ -7269,7 +7269,7 @@
     Item *and_or_arg;
     while ((and_or_arg= li++))
     {
-      if(!check_group_min_max_predicates(and_or_arg, min_max_arg_item,
+      if (!check_group_min_max_predicates(and_or_arg, min_max_arg_item,
                                          image_type))
         DBUG_RETURN(FALSE);
     }
@@ -7351,7 +7351,7 @@
     }
     else if (cur_arg->type() == Item::FUNC_ITEM)
     {
-      if(!check_group_min_max_predicates(cur_arg, min_max_arg_item,
+      if (!check_group_min_max_predicates(cur_arg, min_max_arg_item,
                                          image_type))
         DBUG_RETURN(FALSE);
     }
@@ -7882,19 +7882,19 @@
 
   if (min_max_arg_part)
   {
-    if(my_init_dynamic_array(&min_max_ranges, sizeof(QUICK_RANGE*), 16, 16))
+    if (my_init_dynamic_array(&min_max_ranges, sizeof(QUICK_RANGE*), 16, 16))
       return 1;
 
     if (have_min)
     {
-      if(!(min_functions= new List<Item_sum>))
+      if (!(min_functions= new List<Item_sum>))
         return 1;
     }
     else
       min_functions= NULL;
     if (have_max)
     {
-      if(!(max_functions= new List<Item_sum>))
+      if (!(max_functions= new List<Item_sum>))
         return 1;
     }
     else
@@ -7968,7 +7968,7 @@
   uint range_flag= sel_range->min_flag | sel_range->max_flag;
 
   /* Skip (-inf,+inf) ranges, e.g. (x < 5 or x > 4). */
-  if((range_flag & NO_MIN_RANGE) && (range_flag & NO_MAX_RANGE))
+  if ((range_flag & NO_MIN_RANGE) && (range_flag & NO_MAX_RANGE))
     return FALSE;
 
   if (!(sel_range->min_flag & NO_MIN_RANGE) &&

--- 1.79/sql/sql_cache.cc	2005-07-05 12:23:09 +03:00
+++ 1.80/sql/sql_cache.cc	2005-07-18 18:36:15 +03:00
@@ -2051,7 +2051,7 @@
     */
     data_len= len - new_block->length;
     prev_block= new_block;
-  } while(1);
+  } while (1);
 
   DBUG_RETURN(TRUE);
 }

--- 1.446/sql/sql_parse.cc	2005-07-14 13:42:31 +03:00
+++ 1.447/sql/sql_parse.cc	2005-07-18 18:36:16 +03:00
@@ -2151,7 +2151,7 @@
       TABLE_LIST **query_tables_last= lex->query_tables_last;
       sel= new SELECT_LEX();
       sel->init_query();
-      if(!sel->add_table_to_list(thd, table_ident, 0, 0, TL_READ, 
+      if (!sel->add_table_to_list(thd, table_ident, 0, 0, TL_READ, 
                                  (List<String> *) 0, (List<String> *) 0))
         DBUG_RETURN(1);
       lex->query_tables_last= query_tables_last;

--- 1.338/sql/sql_select.cc	2005-07-18 18:37:41 +03:00
+++ 1.339/sql/sql_select.cc	2005-07-18 18:36:16 +03:00
@@ -6720,7 +6720,7 @@
        of the condition expression.
     */
     li.rewind();
-    while((item= li++))
+    while ((item= li++))
     { 
       Item *new_item;
       if ((new_item = build_equal_items_for_cond(item, inherited))!= item)
@@ -7529,7 +7529,7 @@
     
   /* Flatten nested joins that can be flattened. */
   li.rewind();
-  while((table= li++))
+  while ((table= li++))
   {
     nested_join= table->nested_join;
     if (nested_join && !table->on_expr)
@@ -12125,7 +12125,6 @@
   List_iterator<Item> li(fields);
   Item *item;
   ORDER *order,*group,**prev;
-  uint index= 0;
 
   *all_order_by_fields_used= 1;
   while ((item=li++))
@@ -12162,12 +12161,12 @@
         simple indexing of ref_pointer_array (order in the array and in the
         list are same)
       */
-      ord->item= ref_pointer_array + index;
+      ord->item= ref_pointer_array;
       ord->asc=1;
       *prev=ord;
       prev= &ord->next;
     }
-    index++;
+    ref_pointer_array++;
   }
   *prev=0;
   return group;
@@ -12996,7 +12995,7 @@
           if (item->eq(*group_tmp->item,0))
           {
             Item *new_item;
-            if(!(new_item= new Item_ref(context, group_tmp->item, 0,
+            if (!(new_item= new Item_ref(context, group_tmp->item, 0,
                                         item->name)))
               return 1;                                 // fatal_error is set
             thd->change_item_tree(arg, new_item);

--- 1.253/sql/sql_show.cc	2005-07-07 16:48:40 +03:00
+++ 1.254/sql/sql_show.cc	2005-07-18 18:36:17 +03:00
@@ -1718,7 +1718,7 @@
   ident_table.length= strlen(table);
   table_ident= new Table_ident(thd, ident_db, ident_table, 1);
   sel->init_query();
-  if(!sel->add_table_to_list(thd, table_ident, 0, 0, TL_READ,
+  if (!sel->add_table_to_list(thd, table_ident, 0, 0, TL_READ,
                              (List<String> *) 0, (List<String> *) 0))
     return 1;
   return 0;

--- 1.407/sql/sql_yacc.yy	2005-07-17 03:58:15 +03:00
+++ 1.408/sql/sql_yacc.yy	2005-07-18 18:36:17 +03:00
@@ -45,7 +45,7 @@
 
 const LEX_STRING null_lex_str={0,0};
 
-#define yyoverflow(A,B,C,D,E,F) {ulong val= *(F); if(my_yyoverflow((B), (D), &val)) { yyerror((char*) (A)); return 2; } else { *(F)= (YYSIZE_T)val; }}
+#define yyoverflow(A,B,C,D,E,F) {ulong val= *(F); if (my_yyoverflow((B), (D), &val)) { yyerror((char*) (A)); return 2; } else { *(F)= (YYSIZE_T)val; }}
 
 #define WARN_DEPRECATED(A,B)                                        \
   push_warning_printf(((THD *)yythd), MYSQL_ERROR::WARN_LEVEL_WARN, \

--- 1.191/sql/ha_ndbcluster.cc	2005-07-06 12:39:44 +03:00
+++ 1.192/sql/ha_ndbcluster.cc	2005-07-18 18:36:10 +03:00
@@ -5445,7 +5445,7 @@
     Uint64 sum_commits= 0;
     Uint64 sum_row_size= 0;
     Uint64 sum_mem= 0;
-    while((check= pOp->nextResult(TRUE, TRUE)) == 0)
+    while ((check= pOp->nextResult(TRUE, TRUE)) == 0)
     {
       sum_rows+= rows;
       sum_commits+= commits;
@@ -5473,7 +5473,7 @@
                         sum_mem, count));
 
     DBUG_RETURN(0);
-  } while(0);
+  } while (0);
 
   if (pTrans)
     ndb->closeTransaction(pTrans);

--- 1.225/sql/ha_innodb.cc	2005-07-06 09:38:21 +03:00
+++ 1.226/sql/ha_innodb.cc	2005-07-18 18:36:10 +03:00
@@ -5484,7 +5484,7 @@
 	external_lock(). To be safe, update the thd of the current table
 	handle. */
 
-	if(length > 64000 - 3) {
+	if (length > 64000 - 3) {
 		return((char*)comment); /* string too long */
 	}
 
@@ -5522,7 +5522,7 @@
 
 		if (str) {
 			char* pos	= str + length;
-			if(length) {
+			if (length) {
 				memcpy(str, comment, length);
 				*pos++ = ';';
 				*pos++ = ' ';
@@ -5580,7 +5580,7 @@
 		flen = ftell(file);
 		if (flen < 0) {
 			flen = 0;
-		} else if(flen > 64000 - 1) {
+		} else if (flen > 64000 - 1) {
 			flen = 64000 - 1;
 		}
 

--- 1.138/sql/sql_prepare.cc	2005-07-15 16:53:37 +03:00
+++ 1.139/sql/sql_prepare.cc	2005-07-18 18:36:16 +03:00
@@ -1757,6 +1757,10 @@
     DBUG_RETURN(TRUE);
   }
 
+  /*
+    alloc_query() uses thd->memroot && thd->query, so we have to call
+    both of backup_statement() and backup_item_area() here.
+  */
   thd->set_n_backup_statement(stmt, &stmt_backup);
   thd->set_n_backup_item_arena(stmt, &stmt_backup);
 
@@ -2244,7 +2248,7 @@
     cleanup_stmt_and_thd_after_use(stmt, thd);
     reset_stmt_params(stmt);
     /*
-      Must be the last, as some momory is still needed for
+      Must be the last, as some memory is still needed for
       the previous calls.
     */
     free_root(cursor->mem_root, MYF(0));

--- 1.140/tests/mysql_client_test.c	2005-07-18 12:25:06 +03:00
+++ 1.141/tests/mysql_client_test.c	2005-07-18 18:36:17 +03:00
@@ -1968,7 +1968,7 @@
   myquery(rc);
 
   /* fetch */
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   for (i= 0; i < (int) array_elements(bind); i++)
   {
     bind[i].buffer_type= MYSQL_TYPE_LONG;
@@ -3409,7 +3409,7 @@
 
   /* fetch */
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_LONG;
   bind[0].buffer= (void *) &nData;      /* integer data */
   bind[0].is_null= &is_null[0];
@@ -3502,7 +3502,7 @@
   rc= mysql_commit(mysql);
   myquery(rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   for (i= 0; i < (int) array_elements(bind); i++)
   {
     bind[i].length=  &length[i];
@@ -3621,7 +3621,7 @@
   rc= mysql_commit(mysql);
   myquery(rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_STRING;
   bind[0].buffer= (void *) t_data;
   bind[0].buffer_length= sizeof(t_data);
@@ -3914,7 +3914,7 @@
   rc= mysql_commit(mysql);
   myquery(rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   for (i= 0; i < array_elements(bind); i++)
   {
     bind[i].is_null= &is_null[i];
@@ -5631,7 +5631,7 @@
   myquery(rc);
 
   /* fetch */
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_LONG;
   bind[0].buffer= (void *) &nData;       /* integer data */
   bind[0].length= &length;
@@ -6345,7 +6345,7 @@
 
   bzero(buffer, sizeof(buffer));              /* Avoid overruns in printf() */
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].length= &length;
   bind[0].is_null= &is_null;
   bind[0].buffer_length= 1;
@@ -6534,7 +6534,7 @@
     fprintf(stdout, "\n total rows        : %d", rc);
   DIE_UNLESS(rc == 1);
 
-  bzero(bind, sizeof(MYSQL_BIND));
+  bzero((char*) bind, sizeof(MYSQL_BIND));
   bind[0].buffer_type= MYSQL_TYPE_STRING;
   bind[0].buffer= (void *)str[0];
   bind[0].buffer_length= sizeof(str[0]);
@@ -6604,7 +6604,7 @@
   rc= mysql_stmt_execute(stmt);
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_SHORT;
   bind[0].buffer= (void *)&short_value;
   bind[0].is_unsigned= TRUE;
@@ -6692,7 +6692,7 @@
   rc= mysql_stmt_execute(stmt);
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_SHORT;
   bind[0].buffer= (void *)&short_value;
   bind[0].length= &s_length;
@@ -6779,7 +6779,7 @@
   rc= mysql_stmt_execute(stmt);
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_SHORT;
   bind[0].buffer= (void *)&short_value;
   bind[0].length= &s_length;
@@ -6887,7 +6887,7 @@
   rc= mysql_stmt_execute(stmt);
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_STRING;
   bind[0].buffer= table_type;
   bind[0].length= &type_length;
@@ -7198,7 +7198,7 @@
   rc= mysql_stmt_execute(stmt);
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_STRING;
   bind[0].buffer= data_dir;
   bind[0].buffer_length= FN_REFLEN;
@@ -7936,7 +7936,7 @@
   stmt= mysql_simple_prepare(mysql, "select * from t1");
   check_stmt(stmt);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_LONG;
   bind[0].buffer= (void *)&c1;
 
@@ -8032,7 +8032,7 @@
   stmt= mysql_simple_prepare(mysql, "select * from t1");
   check_stmt(stmt);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_STRING;
   bind[0].buffer= (void *)data;
   bind[0].buffer_length= 11;
@@ -8119,7 +8119,7 @@
   stmt= mysql_simple_prepare(mysql, "select * from t1 order by c2 desc");
   check_stmt(stmt);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_LONG;
   bind[0].buffer= (void *)&bc1;
   bind[0].buffer_length= 0;
@@ -8367,7 +8367,7 @@
   stmt= mysql_simple_prepare(mysql, "select * from test_free_result");
   check_stmt(stmt);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_LONG;
   bind[0].buffer= (void *)&bc1;
   bind[0].length= &bl1;
@@ -8447,7 +8447,7 @@
   stmt= mysql_simple_prepare(mysql, "select * from test_free_result");
   check_stmt(stmt);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_LONG;
   bind[0].buffer= (void *)&bc1;
   bind[0].buffer_length= 0;
@@ -9908,7 +9908,7 @@
   rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
   myquery(rc);
 
-  bzero(bind_array, sizeof(bind_array));
+  bzero((char*) bind_array, sizeof(bind_array));
 
   for (bind= bind_array; bind < bind_end; bind++)
     bind->error= &bind->error_value;
@@ -10117,7 +10117,7 @@
 
     verify_param_count(stmt, 2);
 
-    bzero(&bind, sizeof(bind));
+    bzero((char*) bind, sizeof(bind));
 
     bind[0].buffer_type= MYSQL_TYPE_STRING;
     bind[0].buffer= (void *)str_data;
@@ -10357,7 +10357,7 @@
   rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
   myquery(rc);
 
-  bzero(bind_array, sizeof(bind_array));
+  bzero((char*) bind_array, sizeof(bind_array));
 
   bind_array[0].buffer_type= MYSQL_TYPE_STRING;
   bind_array[0].buffer= (void *) koi8;
@@ -10541,7 +10541,7 @@
   check_execute(stmt, rc);
 
   /* Bind input buffers */
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
 
   bind[0].buffer_type= MYSQL_TYPE_STRING;
   bind[0].buffer= (void *) concat_arg0;
@@ -10608,11 +10608,11 @@
   check_execute(stmt, rc);
 
   /* Bind input buffers */
-  bzero(bind, sizeof(bind));
-  bzero(&time_in, sizeof(time_in));
-  bzero(&time_out, sizeof(time_out));
-  bzero(&datetime_in, sizeof(datetime_in));
-  bzero(&datetime_out, sizeof(datetime_out));
+  bzero((char*) bind, sizeof(bind));
+  bzero((char*) &time_in, sizeof(time_in));
+  bzero((char*) &time_out, sizeof(time_out));
+  bzero((char*) &datetime_in, sizeof(datetime_in));
+  bzero((char*) &datetime_out, sizeof(datetime_out));
 
   bind[0].buffer_type= MYSQL_TYPE_TIME;
   bind[0].buffer= (void *) &time_in;
@@ -10690,7 +10690,7 @@
   check_execute(stmt, rc);
 
   /* Bind input buffers */
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
 
   bind[0].buffer_type= MYSQL_TYPE_LONG;
   bind[0].buffer= (void *) &res;
@@ -10759,13 +10759,13 @@
   check_execute(stmt, rc);
 
   /* Bind output buffers */
-  bzero(bind, sizeof(bind));
-  bzero(&time_canonical, sizeof(time_canonical));
-  bzero(&time_out, sizeof(time_out));
-  bzero(&date_canonical, sizeof(date_canonical));
-  bzero(&date_out, sizeof(date_out));
-  bzero(&datetime_canonical, sizeof(datetime_canonical));
-  bzero(&datetime_out, sizeof(datetime_out));
+  bzero((char*) bind, sizeof(bind));
+  bzero((char*) &time_canonical, sizeof(time_canonical));
+  bzero((char*) &time_out, sizeof(time_out));
+  bzero((char*) &date_canonical, sizeof(date_canonical));
+  bzero((char*) &date_out, sizeof(date_out));
+  bzero((char*) &datetime_canonical, sizeof(datetime_canonical));
+  bzero((char*) &datetime_out, sizeof(datetime_out));
 
   bind[0].buffer_type= MYSQL_TYPE_TIME;
   bind[0].buffer= (void *) &time_out;
@@ -10868,7 +10868,7 @@
   check_execute(stmt, rc);
 
   strmov(str_data, "TEST");
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= FIELD_TYPE_STRING;
   bind[0].buffer= (char *)&str_data;
   bind[0].buffer_length= 50;
@@ -10987,7 +10987,7 @@
                   " AENAME,T0001.DEPENDVARS AS DEPENDVARS,T0001.INACTIVE AS "
                   " INACTIVE from LTDX T0001 where (T0001.SRTF2 = 0)");
   myquery(rc);
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   for (i=0; i < 8; i++) {
     strmov(parms[i], "1");
     bind[i].buffer_type = MYSQL_TYPE_VAR_STRING;
@@ -11036,7 +11036,7 @@
   myquery(rc);
   rc= mysql_query(mysql, "CREATE VIEW vt1 AS SELECT a FROM t1");
   myquery(rc);
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   for (i= 0; i < 2; i++) {
     sprintf((char *)&parms[i], "%d", i);
     bind[i].buffer_type = MYSQL_TYPE_VAR_STRING;
@@ -11102,7 +11102,7 @@
   rc= mysql_stmt_prepare(select_stmt, query, strlen(query));
   check_execute(select_stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type = FIELD_TYPE_LONG;
   bind[0].buffer = (char *)&my_val;
   bind[0].length = &my_length;
@@ -11206,7 +11206,7 @@
                   " F7F8 AS F7F8, F6N4 AS F6N4, F5C8 AS F5C8, F9D8 AS F9D8"
                   " from t1 T0001");
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   for (i= 0; i < 11; i++)
   {
     l[i]= 20;
@@ -11274,7 +11274,7 @@
   check_execute(stmt, rc);
 
   /* Bind output buffers */
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
 
   bind[0].buffer_type= MYSQL_TYPE_LONG;
   bind[0].buffer= &c1;
@@ -11320,8 +11320,8 @@
   check_execute(stmt, rc);
 
   /* Bind input buffers */
-  bzero(bind, sizeof(bind));
-  bzero(tm, sizeof(tm));
+  bzero((char*) bind, sizeof(bind));
+  bzero((char*) tm, sizeof(tm));
 
   bind[0].buffer_type= MYSQL_TYPE_DATE;
   bind[0].buffer= &tm[0];
@@ -11381,7 +11381,7 @@
 
   myheader("test_bug5399");
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_LONG;
   bind[0].buffer= &no;
 
@@ -11541,7 +11541,7 @@
   param_str_length= strlen(param_str);
 
   /* setup bind array */
-  bzero(bind, MAX_PARAM_COUNT * sizeof(MYSQL_BIND));
+  bzero((char*) bind, MAX_PARAM_COUNT * sizeof(MYSQL_BIND));
   for (i= 0; i < MAX_PARAM_COUNT; ++i)
   {
     bind[i].buffer_type= MYSQL_TYPE_FLOAT;
@@ -11659,7 +11659,7 @@
   rc= mysql_stmt_execute(stmt);
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type    = MYSQL_TYPE_STRING;
   bind[0].buffer         = &buffer;
   bind[0].buffer_length  = sizeof(buffer);
@@ -11708,7 +11708,7 @@
   rc= mysql_stmt_execute(stmt);
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type    = MYSQL_TYPE_STRING;
   bind[0].buffer         = &buffer;
   bind[0].buffer_length  = sizeof(buffer);
@@ -11776,7 +11776,7 @@
   check_execute(stmt, rc);
 
   b= 1;
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer= &b;
   bind[0].buffer_type= MYSQL_TYPE_SHORT;
 
@@ -11955,7 +11955,7 @@
 
   /* Bind and fetch the data */
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   for (i= 0; i < stmt_field_count; ++i)
   {
     bind[i].buffer_type= MYSQL_TYPE_STRING;
@@ -12010,7 +12010,7 @@
   check_stmt(stmt);
   verify_param_count(stmt, 6);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   for (i= 0; i < 6; i++)
   {
     bind[i].buffer_type= MYSQL_TYPE_DATETIME;
@@ -12141,7 +12141,7 @@
   rc= mysql_stmt_execute(stmt);
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_STRING;
   bind[0].buffer= f;
   bind[0].buffer_length= sizeof(f);
@@ -12208,7 +12208,7 @@
   rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer= buff;
   bind[0].length= &length;
   bind[0].buffer_type= MYSQL_TYPE_STRING;
@@ -12271,7 +12271,7 @@
   rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
   check_execute(stmt, rc);
 
-  bzero(&bind,sizeof(MYSQL_BIND));
+  bzero((char*) &bind, sizeof(MYSQL_BIND));
   bind.buffer_type= MYSQL_TYPE_LONG;
   bind.buffer= (void *)&Data; /* this buffer won't be altered */
   bind.length= &length;
@@ -12367,7 +12367,7 @@
 
   /*************** Fill in the bind structure and bind it **************/
   bind_array= malloc(sizeof(MYSQL_BIND) * bind_count);
-  bzero(bind_array, sizeof(MYSQL_BIND) * bind_count);
+  bzero((char*) bind_array, sizeof(MYSQL_BIND) * bind_count);
   for (bind= bind_array; bind < bind_array + bind_count; bind++)
     bind->error= &bind->error_value;
   bind= bind_array;
@@ -12572,7 +12572,7 @@
   rc= mysql_stmt_execute(stmt);
   check_execute(stmt, rc);
 
-  bzero(&bind, sizeof(MYSQL_BIND));
+  bzero((char*) &bind, sizeof(MYSQL_BIND));
 
   bind.buffer= (void*) &buf;
   bind.buffer_type= MYSQL_TYPE_TINY;
@@ -12647,7 +12647,7 @@
   rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
   myquery(rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   for (i=0; i < 2; i++)
   {
     stmt[i]= mysql_stmt_init(mysql);
@@ -12921,7 +12921,7 @@
   rc= mysql_stmt_execute(stmt);
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_STRING;
   bind[0].buffer= (char*) a;
   bind[0].buffer_length= sizeof(a);
@@ -12970,7 +12970,7 @@
 
   stmt= open_cursor("select name from t1 where id=2");
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_STRING;
   bind[0].buffer= (char*) a;
   bind[0].buffer_length= sizeof(a);
@@ -13127,7 +13127,7 @@
   rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_LONG;
   bind[0].buffer= (void*) &a;
   bind[0].buffer_length= sizeof(a);
@@ -13183,7 +13183,7 @@
   mysql_stmt_prepare(stmt, query, strlen(query));
   mysql_stmt_execute(stmt);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   for (i=0; i < 2; i++)
   {
     bind[i].buffer_type= MYSQL_TYPE_STRING;
@@ -13220,7 +13220,7 @@
   int rc;
   const char *stmt_text;
   int i= 0;
-  char *name_array[3]= { "aaa", "bbb", "ccc" };
+  const char *name_array[3]= { "aaa", "bbb", "ccc" };
   ulong type;
 
   myheader("test_bug10729");
@@ -13241,7 +13241,7 @@
   rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_STRING;
   bind[0].buffer= (void*) a;
   bind[0].buffer_length= sizeof(a);
@@ -13351,7 +13351,7 @@
   rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
   check_execute(stmt, rc);
 
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_STRING;
   bind[0].buffer= (void*) a;
   bind[0].buffer_length= sizeof(a);
@@ -13400,7 +13400,7 @@
   stmt_text= "insert into t1 (id, name) values (?, ?)";
   rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
   check_execute(stmt, rc);
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_LONG;
   bind[0].buffer= (void*) &id_val;
   bind[1].buffer_type= MYSQL_TYPE_STRING;
@@ -13422,7 +13422,7 @@
   mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void*) &type);
   stmt1= mysql_stmt_init(mysql);
   mysql_stmt_attr_set(stmt1, STMT_ATTR_CURSOR_TYPE, (const void*) &type);
-  bzero(bind, sizeof(bind));
+  bzero((char*) bind, sizeof(bind));
   bind[0].buffer_type= MYSQL_TYPE_STRING;
   bind[0].buffer= (void*) a;
   bind[0].buffer_length= sizeof(a);
@@ -13495,9 +13495,9 @@
   type= (ulong) CURSOR_TYPE_READ_ONLY;
   mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void*) &type);
 
-  bzero(bind_in, sizeof(bind_in));
-  bzero(bind_out, sizeof(bind_out));
-  bzero(&hired, sizeof(hired));
+  bzero((char*) bind_in, sizeof(bind_in));
+  bzero((char*) bind_out, sizeof(bind_out));
+  bzero((char*) &hired, sizeof(hired));
   hired.year= 1965;
   hired.month= 1;
   hired.day= 1;
@@ -13565,9 +13565,9 @@
   type= (ulong) CURSOR_TYPE_READ_ONLY;
   mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void*) &type);
 
-  bzero(bind, sizeof(bind));
-  strcpy(buf[0], "pcint502_MY2");
-  strcpy(buf[1], "*");
+  bzero((char*) bind, sizeof(bind));
+  strmov(buf[0], "pcint502_MY2");
+  strmov(buf[1], "*");
   for (i=0; i < 2; i++)
   {
     bind[i].buffer_type= MYSQL_TYPE_STRING;
Thread
bk commit into 5.0 tree (monty:1.1943)monty18 Jul