List:Internals« Previous MessageNext Message »
From:Jim Winstead Date:June 7 2005 1:32am
Subject:bk commit into 5.0 tree (jimw:1.1925) BUG#11045
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jwinstead. When jwinstead 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.1925 05/06/07 03:32:11 jimw@stripped +15 -0
  Fix various warnings picked up by VC6 (Bug #11045)

  sql/sql_select.cc
    1.330 05/06/07 03:31:01 jimw@stripped +5 -5
    Fix size of select_options parameters

  sql/mysqld.cc
    1.463 05/06/07 03:30:33 jimw@stripped +2 -1
    Fix signedness of thread_stack

  sql/mysql_priv.h
    1.309 05/06/07 03:30:20 jimw@stripped +2 -1
    Fix signedness of thread_stack

  sql/field.cc
    1.266 05/06/07 03:30:04 jimw@stripped +1 -1
    Cast parameter in constructor

  sql/ha_federated.cc
    1.30 05/06/07 03:09:16 jimw@stripped +1 -1
    Fix type of query id

  sql/ha_federated.cc
    1.29 05/06/07 02:52:04 jimw@stripped +2 -7
    Get rid of unused variables, fix type of query id

  sql/examples/ha_archive.cc
    1.41 05/06/07 02:35:00 jimw@stripped +1 -1
    Cast to get correct type for current_position

  sql/examples/ha_archive.h
    1.21 05/06/07 02:34:49 jimw@stripped +1 -1
    Fix type of rows_recorded

  sql/table.cc
    1.169 05/06/07 02:21:41 jimw@stripped +3 -2
    Cast lengths to correct size

  sql/sql_update.cc
    1.161 05/06/07 02:21:36 jimw@stripped +1 -1
    Fix size of options parameter

  sql/sql_select.h
    1.87 05/06/07 02:21:28 jimw@stripped +3 -3
    Fix size of select_options

  sql/sql_select.cc
    1.329 05/06/07 02:21:23 jimw@stripped +3 -3
    Fix size of options variables

  sql/sql_lex.h
    1.181 05/06/07 02:21:11 jimw@stripped +1 -1
    Fix size of variable

  sql/sql_insert.cc
    1.159 05/06/07 02:21:06 jimw@stripped +1 -1
    Fix type of query id

  sql/sql_delete.cc
    1.152 05/06/07 02:20:59 jimw@stripped +1 -1
    Fix size of options parameter

  sql/sql_acl.cc
    1.156 05/06/07 02:20:50 jimw@stripped +0 -2
    Remove unused variables

  sql/mysql_priv.h
    1.308 05/06/07 02:20:41 jimw@stripped +3 -3
    Fix size of options parameters

  sql/sql_select.h
    1.86 05/06/07 01:57:52 jimw@stripped +1 -1
    Fix size of select_options

  sql/sql_select.cc
    1.328 05/06/07 01:57:42 jimw@stripped +1 -1
    Fix size of select_options

  vio/viosocket.c
    1.32 05/06/07 01:52:48 jimw@stripped +1 -0
    Add missing parameter to vio_ignore_timeout()

# 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:	jimw
# Host:	production.mysql.com
# Root:	/usersnfs/jwinstead/mysql-5.0

--- 1.265/sql/field.cc	2005-06-06 08:30:12 +02:00
+++ 1.266/sql/field.cc	2005-06-07 03:30:04 +02:00
@@ -7997,7 +7997,7 @@
                                      struct st_table *table_arg)
   : Field_bit(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, bit_ptr_arg,
               bit_ofs_arg, unireg_check_arg, field_name_arg, table_arg),
-    create_length(len_arg)
+    create_length((uchar)len_arg)
 {
   bit_ptr= 0;
   bit_ofs= 0;

--- 1.307/sql/mysql_priv.h	2005-06-06 15:54:54 +02:00
+++ 1.309/sql/mysql_priv.h	2005-06-07 03:30:20 +02:00
@@ -636,7 +636,7 @@
 bool mysql_select(THD *thd, Item ***rref_pointer_array,
                   TABLE_LIST *tables, uint wild_num,  List<Item> &list,
                   COND *conds, uint og_num, ORDER *order, ORDER *group,
-                  Item *having, ORDER *proc_param, ulong select_type, 
+                  Item *having, ORDER *proc_param, ulonglong select_type, 
                   select_result *result, SELECT_LEX_UNIT *unit, 
                   SELECT_LEX *select_lex);
 void free_underlaid_joins(THD *thd, SELECT_LEX *select);
@@ -700,7 +700,7 @@
 		 enum enum_duplicates handle_duplicates, bool ignore);
 bool mysql_multi_update(THD *thd, TABLE_LIST *table_list,
                         List<Item> *fields, List<Item> *values,
-                        COND *conds, ulong options,
+                        COND *conds, ulonglong options,
                         enum enum_duplicates handle_duplicates, bool ignore,
                         SELECT_LEX_UNIT *unit, SELECT_LEX *select_lex);
 bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, TABLE *table,
@@ -715,7 +715,7 @@
 int check_that_all_fields_are_given_values(THD *thd, TABLE *entry);
 bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds);
 bool mysql_delete(THD *thd, TABLE_LIST *table, COND *conds, SQL_LIST *order,
-                  ha_rows rows, ulong options);
+                  ha_rows rows, ulonglong options);
 bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok);
 bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create);
 TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type update);
@@ -1076,7 +1076,8 @@
 extern ulong slave_net_timeout, slave_trans_retries;
 extern uint max_user_connections;
 extern ulong what_to_log,flush_time;
-extern ulong query_buff_size, thread_stack;
+extern ulong query_buff_size;
+extern long thread_stack;
 extern ulong binlog_cache_size, max_binlog_cache_size, open_files_limit;
 extern ulong max_binlog_size, max_relay_log_size;
 extern ulong rpl_recovery_rank, thread_cache_size;

--- 1.462/sql/mysqld.cc	2005-06-02 06:56:26 +02:00
+++ 1.463/sql/mysqld.cc	2005-06-07 03:30:33 +02:00
@@ -349,7 +349,8 @@
 uint volatile thread_count, thread_running;
 ulong back_log, connect_timeout, concurrency;
 ulong server_id, thd_startup_options;
-ulong table_cache_size, thread_stack, what_to_log;
+ulong table_cache_size, what_to_log;
+long thread_stack;
 ulong query_buff_size, slow_launch_time, slave_open_temp_tables;
 ulong open_files_limit, max_binlog_size, max_relay_log_size;
 ulong slave_net_timeout, slave_trans_retries;

--- 1.155/sql/sql_acl.cc	2005-06-02 06:56:26 +02:00
+++ 1.156/sql/sql_acl.cc	2005-06-07 02:20:50 +02:00
@@ -2476,7 +2476,6 @@
   int old_row_exists= 1;
   int error=0;
   ulong store_proc_rights;
-  byte *key;
   DBUG_ENTER("replace_routine_table");
 
   if (!initialized)
@@ -3216,7 +3215,6 @@
     do
     {
       GRANT_NAME *mem_check;
-      longlong proc_type;
       HASH *hash;
       if (!(mem_check=new GRANT_NAME(p_table)))
       {

--- 1.151/sql/sql_delete.cc	2005-05-31 11:29:22 +02:00
+++ 1.152/sql/sql_delete.cc	2005-06-07 02:20:59 +02:00
@@ -30,7 +30,7 @@
 #include "sql_trigger.h"
 
 bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
-                  SQL_LIST *order, ha_rows limit, ulong options)
+                  SQL_LIST *order, ha_rows limit, ulonglong options)
 {
   int		error;
   TABLE		*table;

--- 1.158/sql/sql_insert.cc	2005-06-06 19:41:49 +02:00
+++ 1.159/sql/sql_insert.cc	2005-06-07 02:21:06 +02:00
@@ -192,7 +192,7 @@
                                List<Item> &update_fields)
 {
   TABLE *table= insert_table_list->table;
-  ulong	timestamp_query_id;
+  query_id_t timestamp_query_id;
   LINT_INIT(timestamp_query_id);
 
   /*

--- 1.180/sql/sql_lex.h	2005-05-30 18:56:07 +02:00
+++ 1.181/sql/sql_lex.h	2005-06-07 02:21:11 +02:00
@@ -375,7 +375,7 @@
   TABLE *table; /* temporary table using for appending UNION results */
 
   select_result *result;
-  ulong found_rows_for_union;
+  ulonglong found_rows_for_union;
   bool res;
   bool  prepared, // prepare phase already performed for UNION (unit)
     optimized, // optimize phase already performed for UNION (unit)

--- 1.327/sql/sql_select.cc	2005-06-06 18:43:05 +02:00
+++ 1.330/sql/sql_select.cc	2005-06-07 03:31:01 +02:00
@@ -83,7 +83,7 @@
 static bool make_simple_join(JOIN *join,TABLE *tmp_table);
 static void make_outerjoin_info(JOIN *join);
 static bool make_join_select(JOIN *join,SQL_SELECT *select,COND *item);
-static void make_join_readinfo(JOIN *join,uint options);
+static void make_join_readinfo(JOIN *join, ulonglong options);
 static bool only_eq_ref_tables(JOIN *join, ORDER *order, table_map tables);
 static void update_depend_map(JOIN *join);
 static void update_depend_map(JOIN *join, ORDER *order);
@@ -91,7 +91,7 @@
 			   bool *simple_order);
 static int return_zero_rows(JOIN *join, select_result *res,TABLE_LIST *tables,
 			    List<Item> &fields, bool send_row,
-			    uint select_options, const char *info,
+			    ulonglong select_options, const char *info,
 			    Item *having, Procedure *proc,
 			    SELECT_LEX_UNIT *unit);
 static COND *build_equal_items(THD *thd, COND *cond,
@@ -112,7 +112,7 @@
 static bool const_expression_in_where(COND *conds,Item *item, Item **comp_item);
 static bool open_tmp_table(TABLE *table);
 static bool create_myisam_tmp_table(TABLE *table,TMP_TABLE_PARAM *param,
-				    ulong options);
+				    ulonglong options);
 static Next_select_func setup_end_select_func(JOIN *join);
 static int do_select(JOIN *join,List<Item> *fields,TABLE *tmp_table,
 		     Procedure *proc);
@@ -1976,7 +1976,7 @@
 mysql_select(THD *thd, Item ***rref_pointer_array,
 	     TABLE_LIST *tables, uint wild_num, List<Item> &fields,
 	     COND *conds, uint og_num,  ORDER *order, ORDER *group,
-	     Item *having, ORDER *proc_param, ulong select_options,
+	     Item *having, ORDER *proc_param, ulonglong select_options,
 	     select_result *result, SELECT_LEX_UNIT *unit,
 	     SELECT_LEX *select_lex)
 {
@@ -3749,7 +3749,7 @@
 {
   uint search_depth= join->thd->variables.optimizer_search_depth;
   uint prune_level=  join->thd->variables.optimizer_prune_level;
-  bool straight_join= join->select_options & SELECT_STRAIGHT_JOIN;
+  bool straight_join= (bool)join->select_options & SELECT_STRAIGHT_JOIN;
   DBUG_ENTER("choose_plan");
 
   /*
@@ -5661,7 +5661,7 @@
 }
 
 static void
-make_join_readinfo(JOIN *join, uint options)
+make_join_readinfo(JOIN *join, ulonglong options)
 {
   uint i;
 
@@ -6188,7 +6188,7 @@
 
 static int
 return_zero_rows(JOIN *join, select_result *result,TABLE_LIST *tables,
-		 List<Item> &fields, bool send_row, uint select_options,
+		 List<Item> &fields, bool send_row, ulonglong select_options,
 		 const char *info, Item *having, Procedure *procedure,
 		 SELECT_LEX_UNIT *unit)
 {
@@ -7984,7 +7984,7 @@
 TABLE *
 create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
 		 ORDER *group, bool distinct, bool save_sum_fields,
-		 ulong select_options, ha_rows rows_limit,
+		 ulonglong select_options, ha_rows rows_limit,
 		 char *table_alias)
 {
   TABLE *table;
@@ -8643,7 +8643,7 @@
 
 
 static bool create_myisam_tmp_table(TABLE *table,TMP_TABLE_PARAM *param,
-				    ulong options)
+				    ulonglong options)
 {
   int error;
   MI_KEYDEF keydef;

--- 1.85/sql/sql_select.h	2005-05-12 09:16:07 +02:00
+++ 1.87/sql/sql_select.h	2005-06-07 02:21:28 +02:00
@@ -202,7 +202,7 @@
   Item	    *having;
   Item      *tmp_having; // To store having when processed temporary table
   Item      *having_history; // Store having for explain
-  uint	    select_options;
+  ulonglong select_options;
   select_result *result;
   TMP_TABLE_PARAM tmp_table_param;
   MYSQL_LOCK *lock;
@@ -258,14 +258,14 @@
   bool union_part; // this subselect is part of union 
   bool optimized; // flag to avoid double optimization in EXPLAIN
 
-  JOIN(THD *thd_arg, List<Item> &fields_arg, ulong select_options_arg,
+  JOIN(THD *thd_arg, List<Item> &fields_arg, ulonglong select_options_arg,
        select_result *result_arg)
     :fields_list(fields_arg)
   {
     init(thd_arg, fields_arg, select_options_arg, result_arg);
   }
   
-  void init(THD *thd_arg, List<Item> &fields_arg, ulong select_options_arg,
+  void init(THD *thd_arg, List<Item> &fields_arg, ulonglong select_options_arg,
        select_result *result_arg)
   {
     join_tab= join_tab_save= 0;
@@ -414,7 +414,7 @@
 bool store_val_in_field(Field *field,Item *val);
 TABLE *create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
 			ORDER *group, bool distinct, bool save_sum_fields,
-			ulong select_options, ha_rows rows_limit,
+			ulonglong select_options, ha_rows rows_limit,
 			char* alias);
 TABLE *create_virtual_tmp_table(THD *thd, List<create_field> &field_list);
 void free_tmp_table(THD *thd, TABLE *entry);

--- 1.160/sql/sql_update.cc	2005-06-01 15:35:04 +02:00
+++ 1.161/sql/sql_update.cc	2005-06-07 02:21:36 +02:00
@@ -815,7 +815,7 @@
                         List<Item> *fields,
                         List<Item> *values,
                         COND *conds,
-                        ulong options,
+                        ulonglong options,
                         enum enum_duplicates handle_duplicates, bool ignore,
                         SELECT_LEX_UNIT *unit, SELECT_LEX *select_lex)
 {

--- 1.168/sql/table.cc	2005-06-01 15:35:04 +02:00
+++ 1.169/sql/table.cc	2005-06-07 02:21:41 +02:00
@@ -745,8 +745,9 @@
                 error.
               */
 	      keyinfo->key_length-= (key_part->length - field->key_length());
-	      key_part->store_length-= (key_part->length - field->key_length());
-              key_part->length= field->key_length();
+	      key_part->store_length-= (uint16)(key_part->length -
+                                                field->key_length());
+              key_part->length= (uint16)field->key_length();
               sql_print_error("Found wrong key definition in %s; Please do \"ALTER TABLE '%s' FORCE \" to fix it!", name, share->table_name);
               push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
                                   ER_CRASHED_ON_USAGE,

--- 1.40/sql/examples/ha_archive.cc	2005-06-02 07:49:58 +02:00
+++ 1.41/sql/examples/ha_archive.cc	2005-06-07 02:35:00 +02:00
@@ -789,7 +789,7 @@
   DBUG_ENTER("ha_archive::rnd_pos");
   statistic_increment(table->in_use->status_var.ha_read_rnd_next_count,
 		      &LOCK_status);
-  current_position= my_get_ptr(pos, ref_length);
+  current_position= (z_off_t)my_get_ptr(pos, ref_length);
   (void)gzseek(archive, current_position, SEEK_SET);
 
   DBUG_RETURN(get_row(archive, buf));

--- 1.20/sql/examples/ha_archive.h	2005-05-23 22:30:54 +02:00
+++ 1.21/sql/examples/ha_archive.h	2005-06-07 02:34:49 +02:00
@@ -36,7 +36,7 @@
   gzFile archive_write;     /* Archive file we are working with */
   bool dirty;               /* Flag for if a flush should occur */
   bool crashed;             /* Meta file is crashed */
-  ulonglong rows_recorded;  /* Number of rows in tables */
+  ha_rows rows_recorded;  /* Number of rows in tables */
 } ARCHIVE_SHARE;
 
 /*

--- 1.28/sql/ha_federated.cc	2005-06-05 16:18:48 +02:00
+++ 1.30/sql/ha_federated.cc	2005-06-07 03:09:16 +02:00
@@ -842,7 +842,7 @@
   query.length(0);
 
   uint table_name_length, table_base_name_length;
-  char *tmp_table_name, *tmp_table_base_name, *table_base_name, *select_query;
+  char *tmp_table_name, *table_base_name, *select_query;
 
   /* share->table_name has the file location - we want the table's name!  */
   table_base_name= (char*) table->s->table_name;
@@ -963,7 +963,6 @@
 
 int ha_federated::open(const char *name, int mode, uint test_if_locked)
 {
-  int rc;
   DBUG_ENTER("ha_federated::open");
 
   if (!(share= get_share(name, table)))
@@ -1076,8 +1075,8 @@
 {
   uint x= 0, num_fields= 0;
   Field **field;
-  ulong current_query_id= 1;
-  ulong tmp_query_id= 1;
+  query_id_t current_query_id= 1;
+  query_id_t tmp_query_id= 1;
   uint all_fields_have_same_query_id= 1;
 
   char insert_buffer[IO_SIZE];
@@ -1471,8 +1470,6 @@
                                  __attribute__ ((unused)))
 {
   char index_value[IO_SIZE];
-  char key_value[IO_SIZE];
-  char test_value[IO_SIZE];
   String index_string(index_value, sizeof(index_value), &my_charset_bin);
   index_string.length(0);
   uint keylen;
@@ -1538,7 +1535,6 @@
 /* Initialized at each key walk (called multiple times unlike rnd_init()) */
 int ha_federated::index_init(uint keynr)
 {
-  int error;
   DBUG_ENTER("ha_federated::index_init");
   DBUG_PRINT("info",
              ("table: '%s'  key: %d", table->s->table_name, keynr));
@@ -1570,7 +1566,6 @@
 int ha_federated::rnd_init(bool scan)
 {
   DBUG_ENTER("ha_federated::rnd_init");
-  int num_fields, rows;
 
   /*
     This 'scan' flag is incredibly important for this handler to work

--- 1.31/vio/viosocket.c	2005-05-06 15:15:46 +02:00
+++ 1.32/vio/viosocket.c	2005-06-07 01:52:48 +02:00
@@ -425,6 +425,7 @@
 
 
 void vio_ignore_timeout(Vio *vio __attribute__((unused)),
+			uint which __attribute__((unused)),
 			uint timeout __attribute__((unused)))
 {
 }
Thread
bk commit into 5.0 tree (jimw:1.1925) BUG#11045Jim Winstead7 Jun