mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +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:
@@ -540,7 +540,8 @@ class PARAM : public RANGE_OPT_PARAM
|
||||
{
|
||||
public:
|
||||
KEY_PART *key[MAX_KEY]; /* First key parts of keys used in the query */
|
||||
uint baseflag, max_key_part, range_count;
|
||||
longlong baseflag;
|
||||
uint max_key_part, range_count;
|
||||
|
||||
|
||||
char min_key[MAX_KEY_LENGTH+MAX_FIELD_WIDTH],
|
||||
@@ -1142,7 +1143,6 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler)
|
||||
{
|
||||
handler *save_file= file, *org_file;
|
||||
THD *thd;
|
||||
MY_BITMAP *bitmap;
|
||||
DBUG_ENTER("QUICK_RANGE_SELECT::init_ror_merged_scan");
|
||||
|
||||
in_ror_merged_scan= 1;
|
||||
@@ -2048,7 +2048,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
|
||||
|
||||
/* set up parameter that is passed to all functions */
|
||||
param.thd= thd;
|
||||
param.baseflag=head->file->ha_table_flags();
|
||||
param.baseflag= head->file->ha_table_flags();
|
||||
param.prev_tables=prev_tables | const_tables;
|
||||
param.read_tables=read_tables;
|
||||
param.current_table= head->map;
|
||||
@@ -2101,7 +2101,8 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
|
||||
key_parts->null_bit= key_part_info->null_bit;
|
||||
key_parts->image_type =
|
||||
(key_info->flags & HA_SPATIAL) ? Field::itMBR : Field::itRAW;
|
||||
key_parts->flag= key_part_info->key_part_flag;
|
||||
/* Only HA_PART_KEY_SEG is used */
|
||||
key_parts->flag= (uint8) key_part_info->key_part_flag;
|
||||
}
|
||||
param.real_keynr[param.keys++]=idx;
|
||||
}
|
||||
@@ -2508,7 +2509,6 @@ bool prune_partitions(THD *thd, TABLE *table, Item *pprune_cond)
|
||||
|
||||
prune_param.key= prune_param.range_param.key_parts;
|
||||
SEL_TREE *tree;
|
||||
SEL_ARG *arg;
|
||||
int res;
|
||||
|
||||
tree= get_mm_tree(range_par, pprune_cond);
|
||||
@@ -3223,12 +3223,12 @@ static bool create_partition_index_description(PART_PRUNE_PARAM *ppar)
|
||||
{
|
||||
key_part->key= 0;
|
||||
key_part->part= part;
|
||||
key_part->length= (*field)->pack_length_in_rec();
|
||||
key_part->length= (uint16) (*field)->pack_length_in_rec();
|
||||
/*
|
||||
psergey-todo: check yet again if this is correct for tricky field types,
|
||||
e.g. see "Fix a fatal error in decimal key handling" in open_binary_frm()
|
||||
*/
|
||||
key_part->store_length= (*field)->pack_length();
|
||||
key_part->store_length= (uint16) (*field)->pack_length();
|
||||
if ((*field)->real_maybe_null())
|
||||
key_part->store_length+= HA_KEY_NULL_LENGTH;
|
||||
if ((*field)->type() == FIELD_TYPE_BLOB ||
|
||||
@@ -7652,7 +7652,7 @@ QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table,
|
||||
key_part->length= key_info->key_part[part].length;
|
||||
key_part->store_length= key_info->key_part[part].store_length;
|
||||
key_part->null_bit= key_info->key_part[part].null_bit;
|
||||
key_part->flag= key_info->key_part[part].key_part_flag;
|
||||
key_part->flag= (uint8) key_info->key_part[part].key_part_flag;
|
||||
}
|
||||
if (insert_dynamic(&quick->ranges,(gptr)&range))
|
||||
goto err;
|
||||
|
||||
Reference in New Issue
Block a user