mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Fixed compiler warnings (Mostly VC++):
- Removed not used variables - Changed some ulong parameters/variables to ulonglong (possible serious bug) - Added casts to get rid of safe assignment from longlong to long (and similar) - Added casts to function parameters - Fixed signed/unsigned compares - Added some constructores to structures - Removed some not portable constructs Better fix for bug Bug #21428 "skipped 9 bytes from file: socket (3)" on "mysqladmin shutdown" (Added new parameter to net_clear() to define when we want the communication buffer to be emptied) client/mysql.cc: Removed not used variable client/mysqldump.c: Fixed compiler warning client/mysqlslap.c: Fixed compiler warning client/mysqltest.c: Fixed compiler warning extra/replace.c: Fixed compiler warning include/my_global.h: Fixed compiler warning include/mysql_com.h: Changed prototype for net_clear() libmysql/libmysql.c: Changed prototype for net_clear() mysys/base64.c: Fixed compiler warning (function definition and prototype didn't match) mysys/my_thr_init.c: AFter merge fixes mysys/my_vle.c: Fixed compiler warning sql/event_data_objects.cc: Fixed compiler warning sql/event_scheduler.cc: Removed not used variable sql/field.cc: Removed not used variables Fixed compiler warning sql/gen_lex_hash.cc: Fixed compiler warning sql/ha_partition.h: Fixed compiler warning sql/handler.cc: Fixed compiler warning sql/item.cc: Fixed compiler warning sql/item_create.cc: Fixed compiler warning sql/item_func.cc: Fixed compiler warning sql/item_strfunc.cc: Fixed compiler warning sql/item_timefunc.cc: Fixed compiler warning sql/item_xmlfunc.cc: Fixed compiler warning sql/log.cc: Fixed compiler warning sql/log_event.cc: Fixed compiler warning sql/log_event.h: Fixed compiler warning sql/mysql_priv.h: Fixed too short 'select_type' sql/net_serv.cc: Added argument to net_clear() if we should empty the communication buffer. sql/opt_range.cc: Fixed compiler warning sql/partition_info.cc: Fixed compiler warning sql/rpl_injector.h: Fixed compiler warning sql/set_var.cc: Fixed compiler warning sql/slave.cc: Fixed compiler warning sql/sp_head.cc: Fixed compiler warning sql/sql_base.cc: Fixed compiler warning sql/sql_db.cc: Fixed compiler warning sql/sql_delete.cc: Fixed compiler warning sql/sql_insert.cc: Fixed compiler warning sql/sql_lex.h: Fixed compiler warning sql/sql_parse.cc: Fixed compiler warning sql/sql_partition.cc: Fixed compiler warning sql/sql_plugin.cc: Fixed compiler warning sql/sql_prepare.cc: Fixed compiler warning sql/sql_rename.cc: Fixed compiler warning sql/sql_select.cc: Fixed compiler warning sql/sql_show.cc: Fixed compiler warning sql/sql_table.cc: Fixed compiler warning sql/sql_trigger.cc: Fixed compiler warning sql-common/client.c: Better fix for bug Bug #21428 "skipped 9 bytes from file: socket (3)" on "mysqladmin shutdown" sql-common/my_time.c: Fixed compiler warning sql/sql_union.cc: Fixed compiler warning sql/sql_update.cc: Fixed compiler warning sql/sql_view.cc: Fixed compiler warning sql/sql_yacc.yy: Fixed compiler warning sql/table.cc: Fixed compiler warning storage/archive/azio.c: Fixed compiler warning storage/csv/ha_tina.cc: Removed not used code storage/myisam/mi_unique.c: Fixed compiler warning storage/ndb/include/util/OutputStream.hpp: Fixed compiler warning storage/ndb/include/util/SocketAuthenticator.hpp: Fixed compiler warning storage/ndb/src/kernel/vm/Pool.hpp: Fixed compiler warning strings/ctype-simple.c: Fixed compiler warning strings/my_strchr.c: Fixed compiler warning
This commit is contained in:
@@ -886,7 +886,6 @@ int check_signed_flag(partition_info *part_info)
|
||||
bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
|
||||
bool is_sub_part, bool is_field_to_be_setup)
|
||||
{
|
||||
MEM_ROOT new_mem_root;
|
||||
partition_info *part_info= table->part_info;
|
||||
uint dir_length, home_dir_length;
|
||||
bool result= TRUE;
|
||||
@@ -2002,7 +2001,7 @@ char *generate_partition_syntax(partition_info *part_info,
|
||||
bool use_sql_alloc,
|
||||
bool show_partition_options)
|
||||
{
|
||||
uint i,j, tot_no_parts, no_subparts, no_parts;
|
||||
uint i,j, tot_no_parts, no_subparts;
|
||||
partition_element *part_elem;
|
||||
partition_element *save_part_elem= NULL;
|
||||
ulonglong buffer_length;
|
||||
@@ -2302,10 +2301,13 @@ static uint32 get_part_id_hash(uint no_parts,
|
||||
Item *part_expr,
|
||||
longlong *func_value)
|
||||
{
|
||||
longlong int_hash_id;
|
||||
DBUG_ENTER("get_part_id_hash");
|
||||
|
||||
*func_value= part_val_int(part_expr);
|
||||
longlong int_hash_id= *func_value % no_parts;
|
||||
DBUG_RETURN(int_hash_id < 0 ? -int_hash_id : int_hash_id);
|
||||
int_hash_id= *func_value % no_parts;
|
||||
|
||||
DBUG_RETURN(int_hash_id < 0 ? (uint32) -int_hash_id : (uint32) int_hash_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -2358,7 +2360,7 @@ static uint32 get_part_id_key(Field **field_array,
|
||||
{
|
||||
DBUG_ENTER("get_part_id_key");
|
||||
*func_value= calculate_key_value(field_array);
|
||||
DBUG_RETURN(*func_value % no_parts);
|
||||
DBUG_RETURN((uint32) (*func_value % no_parts));
|
||||
}
|
||||
|
||||
|
||||
@@ -3936,7 +3938,7 @@ static int fast_end_partition(THD *thd, ulonglong copied,
|
||||
(ulong) (copied + deleted),
|
||||
(ulong) deleted,
|
||||
(ulong) 0);
|
||||
send_ok(thd,copied+deleted,0L,tmp_name);
|
||||
send_ok(thd, (ha_rows) (copied+deleted),0L,tmp_name);
|
||||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
table->file->print_error(error, MYF(0));
|
||||
@@ -4024,7 +4026,6 @@ static bool check_native_partitioned(HA_CREATE_INFO *create_info,bool *ret_val,
|
||||
handlerton *engine_type= create_info->db_type;
|
||||
handlerton *old_engine_type= engine_type;
|
||||
uint i= 0;
|
||||
handler *file;
|
||||
uint no_parts= part_info->partitions.elements;
|
||||
DBUG_ENTER("check_native_partitioned");
|
||||
|
||||
@@ -5476,7 +5477,6 @@ static void set_part_info_exec_log_entry(partition_info *part_info,
|
||||
|
||||
static bool write_log_drop_shadow_frm(ALTER_PARTITION_PARAM_TYPE *lpt)
|
||||
{
|
||||
DDL_LOG_ENTRY ddl_log_entry;
|
||||
partition_info *part_info= lpt->part_info;
|
||||
DDL_LOG_MEMORY_ENTRY *log_entry;
|
||||
DDL_LOG_MEMORY_ENTRY *exec_log_entry= NULL;
|
||||
@@ -5521,7 +5521,6 @@ error:
|
||||
|
||||
static bool write_log_rename_frm(ALTER_PARTITION_PARAM_TYPE *lpt)
|
||||
{
|
||||
DDL_LOG_ENTRY ddl_log_entry;
|
||||
partition_info *part_info= lpt->part_info;
|
||||
DDL_LOG_MEMORY_ENTRY *log_entry;
|
||||
DDL_LOG_MEMORY_ENTRY *exec_log_entry= part_info->exec_log_entry;
|
||||
@@ -5574,7 +5573,6 @@ error:
|
||||
|
||||
static bool write_log_drop_partition(ALTER_PARTITION_PARAM_TYPE *lpt)
|
||||
{
|
||||
DDL_LOG_ENTRY ddl_log_entry;
|
||||
partition_info *part_info= lpt->part_info;
|
||||
DDL_LOG_MEMORY_ENTRY *log_entry;
|
||||
DDL_LOG_MEMORY_ENTRY *exec_log_entry= part_info->exec_log_entry;
|
||||
@@ -5688,7 +5686,6 @@ error:
|
||||
|
||||
static bool write_log_final_change_partition(ALTER_PARTITION_PARAM_TYPE *lpt)
|
||||
{
|
||||
DDL_LOG_ENTRY ddl_log_entry;
|
||||
partition_info *part_info= lpt->part_info;
|
||||
DDL_LOG_MEMORY_ENTRY *log_entry;
|
||||
DDL_LOG_MEMORY_ENTRY *exec_log_entry= part_info->exec_log_entry;
|
||||
@@ -5746,7 +5743,6 @@ static void write_log_completed(ALTER_PARTITION_PARAM_TYPE *lpt,
|
||||
{
|
||||
partition_info *part_info= lpt->part_info;
|
||||
uint count_loop= 0;
|
||||
bool not_success;
|
||||
DDL_LOG_MEMORY_ENTRY *log_entry= part_info->exec_log_entry;
|
||||
DBUG_ENTER("write_log_completed");
|
||||
|
||||
@@ -7055,7 +7051,6 @@ static uint32 get_next_partition_via_walking(PARTITION_ITERATOR *part_iter)
|
||||
|
||||
static uint32 get_next_subpartition_via_walking(PARTITION_ITERATOR *part_iter)
|
||||
{
|
||||
uint32 part_id;
|
||||
Field *field= part_iter->part_info->subpart_field_array[0];
|
||||
if (part_iter->field_vals.cur == part_iter->field_vals.end)
|
||||
{
|
||||
|
Reference in New Issue
Block a user