fix the build and compiler warnings (few of which were real bugs)
for "cmake ." builds
This commit is contained in:
parent
949027f7c7
commit
3794110f02
@ -46,9 +46,7 @@ static char *opt_password = 0, *current_user = 0,
|
||||
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
|
||||
static int first_error = 0;
|
||||
DYNAMIC_ARRAY tables4repair, tables4rebuild;
|
||||
#ifdef HAVE_SMEM
|
||||
static char *shared_memory_base_name=0;
|
||||
#endif
|
||||
static uint opt_protocol=0;
|
||||
|
||||
enum operations { DO_CHECK=1, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_UPGRADE };
|
||||
@ -912,10 +910,8 @@ static int dbConnect(char *host, char *user, char *passwd)
|
||||
#endif
|
||||
if (opt_protocol)
|
||||
mysql_options(&mysql_connection,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
||||
#ifdef HAVE_SMEM
|
||||
if (shared_memory_base_name)
|
||||
mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
||||
#endif
|
||||
|
||||
if (opt_plugin_dir && *opt_plugin_dir)
|
||||
mysql_options(&mysql_connection, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
||||
@ -980,7 +976,7 @@ int main(int argc, char **argv)
|
||||
** Check out the args
|
||||
*/
|
||||
if (load_defaults("my", load_default_groups, &argc, &argv))
|
||||
goto end1;
|
||||
goto end2;
|
||||
|
||||
defaults_argv= argv;
|
||||
if (get_options(&argc, &argv))
|
||||
@ -1036,11 +1032,10 @@ int main(int argc, char **argv)
|
||||
}
|
||||
end1:
|
||||
my_free(opt_password);
|
||||
#ifdef HAVE_SMEM
|
||||
my_free(shared_memory_base_name);
|
||||
#endif
|
||||
mysql_library_end();
|
||||
free_defaults(defaults_argv);
|
||||
end2:
|
||||
my_end(my_end_arg);
|
||||
return ret;
|
||||
} /* main */
|
||||
|
@ -949,8 +949,7 @@ static void type_and_offset_read(DYNAMIC_COLUMN_TYPE *type,
|
||||
size_t *offset,
|
||||
uchar *place, size_t offset_size)
|
||||
{
|
||||
ulong val;
|
||||
LINT_INIT(val);
|
||||
ulong UNINIT_VAR(val);
|
||||
|
||||
place+= COLUMN_NUMBER_SIZE; /* skip column number */
|
||||
switch (offset_size) {
|
||||
|
@ -135,11 +135,11 @@ IF(NOT WITHOUT_DYNAMIC_PLUGINS)
|
||||
${_PLATFORM} ${LIB_LOCATIONS} > mysqld.def
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
ADD_DEPENDENCIES(sql GenError)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF(MSVC)
|
||||
ENDIF(NOT WITHOUT_DYNAMIC_PLUGINS)
|
||||
|
||||
SET_TARGET_PROPERTIES(mysqld PROPERTIES ENABLE_EXPORTS TRUE)
|
||||
TARGET_LINK_LIBRARIES(mysqld sql mysys)
|
||||
TARGET_LINK_LIBRARIES(mysqld sql)
|
||||
|
||||
# Provide plugins with minimal set of libraries
|
||||
SET(INTERFACE_LIBS ${LIBRT})
|
||||
|
@ -5035,7 +5035,7 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate)
|
||||
*/
|
||||
if (likely(is_open()))
|
||||
{
|
||||
my_off_t my_org_b_tell;
|
||||
my_off_t UNINIT_VAR(my_org_b_tell);
|
||||
#ifdef HAVE_REPLICATION
|
||||
/*
|
||||
In the future we need to add to the following if tests like
|
||||
|
@ -2093,7 +2093,7 @@ static my_socket activate_tcp_port(uint port)
|
||||
int error;
|
||||
int arg;
|
||||
char port_buf[NI_MAXSERV];
|
||||
my_socket ip_sock;
|
||||
my_socket ip_sock= INVALID_SOCKET;
|
||||
DBUG_ENTER("activate_tcp_port");
|
||||
DBUG_PRINT("general",("IP Socket is %d",port));
|
||||
|
||||
@ -2111,12 +2111,8 @@ static my_socket activate_tcp_port(uint port)
|
||||
unireg_abort(1); /* purecov: tested */
|
||||
}
|
||||
|
||||
for (a= ai; a != NULL; a= a->ai_next)
|
||||
{
|
||||
for (a= ai; a != NULL && ip_sock == INVALID_SOCKET; a= a->ai_next)
|
||||
ip_sock= socket(a->ai_family, a->ai_socktype, a->ai_protocol);
|
||||
if (ip_sock != INVALID_SOCKET)
|
||||
break;
|
||||
}
|
||||
|
||||
if (ip_sock == INVALID_SOCKET)
|
||||
{
|
||||
|
@ -2073,7 +2073,7 @@ bool unpack_vcol_info_from_frm(THD *thd,
|
||||
thd->stmt_arena= vcol_arena;
|
||||
|
||||
if (init_lex_with_single_table(thd, table, &lex))
|
||||
goto end;
|
||||
goto err;
|
||||
|
||||
thd->lex->parse_vcol_expr= TRUE;
|
||||
|
||||
|
@ -1415,17 +1415,12 @@ static ulong allocate_full_pages(MARIA_FILE_BITMAP *bitmap,
|
||||
uchar *page_end= data + bitmap->total_size;
|
||||
uchar *best_data= 0;
|
||||
uint min_size;
|
||||
uint best_area_size, best_prefix_area_size, best_suffix_area_size;
|
||||
uint best_area_size, UNINIT_VAR(best_prefix_area_size), best_suffix_area_size;
|
||||
uint page, size;
|
||||
ulonglong best_prefix_bits;
|
||||
ulonglong UNINIT_VAR(best_prefix_bits);
|
||||
DBUG_ENTER("allocate_full_pages");
|
||||
DBUG_PRINT("enter", ("pages_needed: %lu", pages_needed));
|
||||
|
||||
/* Following variables are only used if best_data is set */
|
||||
LINT_INIT(best_prefix_bits);
|
||||
LINT_INIT(best_prefix_area_size);
|
||||
LINT_INIT(best_suffix_area_size);
|
||||
|
||||
min_size= pages_needed;
|
||||
if (!full_page && min_size > BLOB_SEGMENT_MIN_SIZE)
|
||||
min_size= BLOB_SEGMENT_MIN_SIZE;
|
||||
|
@ -2596,7 +2596,7 @@ static my_bool write_block_record(MARIA_HA *info,
|
||||
ha_checksum old_record_checksum)
|
||||
{
|
||||
uchar *data, *end_of_data, *tmp_data_used, *tmp_data;
|
||||
uchar *row_extents_first_part, *row_extents_second_part;
|
||||
uchar *UNINIT_VAR(row_extents_first_part), *UNINIT_VAR(row_extents_second_part);
|
||||
uchar *field_length_data;
|
||||
uchar *page_buff;
|
||||
MARIA_BITMAP_BLOCK *block, *head_block;
|
||||
@ -2611,9 +2611,6 @@ static my_bool write_block_record(MARIA_HA *info,
|
||||
uint save_my_errno;
|
||||
DBUG_ENTER("write_block_record");
|
||||
|
||||
LINT_INIT(row_extents_first_part);
|
||||
LINT_INIT(row_extents_second_part);
|
||||
|
||||
head_block= bitmap_blocks->block;
|
||||
block_size= share->block_size;
|
||||
|
||||
@ -4672,7 +4669,7 @@ int _ma_read_block_record2(MARIA_HA *info, uchar *record,
|
||||
uchar *data, uchar *end_of_data)
|
||||
{
|
||||
MARIA_SHARE *share= info->s;
|
||||
uchar *field_length_data, *blob_buffer, *start_of_data;
|
||||
uchar *UNINIT_VAR(field_length_data), *blob_buffer, *start_of_data;
|
||||
uint flag, null_bytes, cur_null_bytes, row_extents, field_lengths;
|
||||
my_bool found_blob= 0;
|
||||
MARIA_EXTENT_CURSOR extent;
|
||||
@ -4680,9 +4677,6 @@ int _ma_read_block_record2(MARIA_HA *info, uchar *record,
|
||||
MARIA_ROW *cur_row= &info->cur_row;
|
||||
DBUG_ENTER("_ma_read_block_record2");
|
||||
|
||||
LINT_INIT(field_length_data);
|
||||
LINT_INIT(blob_buffer);
|
||||
|
||||
start_of_data= data;
|
||||
flag= (uint) (uchar) data[0];
|
||||
cur_null_bytes= share->base.original_null_bytes;
|
||||
@ -7213,11 +7207,10 @@ my_bool _ma_apply_undo_row_update(MARIA_HA *info, LSN undo_lsn,
|
||||
const uchar *field_length_data, *field_length_data_end, *extent_info;
|
||||
uchar *current_record, *orig_record;
|
||||
pgcache_page_no_t page;
|
||||
ha_checksum checksum_delta;
|
||||
ha_checksum UNINIT_VAR(checksum_delta);
|
||||
uint rownr, field_length_header, extent_count, length_on_head_page;
|
||||
int error;
|
||||
DBUG_ENTER("_ma_apply_undo_row_update");
|
||||
LINT_INIT(checksum_delta);
|
||||
|
||||
page= page_korr(header);
|
||||
header+= PAGE_STORE_SIZE;
|
||||
|
@ -192,12 +192,10 @@ int maria_chk_del(HA_CHECK *param, register MARIA_HA *info,
|
||||
MARIA_SHARE *share= info->s;
|
||||
reg2 ha_rows i;
|
||||
uint delete_link_length;
|
||||
my_off_t empty,next_link,old_link;
|
||||
my_off_t empty,next_link,UNINIT_VAR(old_link);
|
||||
char buff[22],buff2[22];
|
||||
DBUG_ENTER("maria_chk_del");
|
||||
|
||||
LINT_INIT(old_link);
|
||||
|
||||
param->record_checksum=0;
|
||||
|
||||
if (share->data_file_type == BLOCK_RECORD)
|
||||
@ -3652,13 +3650,12 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info,
|
||||
double *rec_per_key_part;
|
||||
char llbuff[22];
|
||||
MARIA_SORT_INFO sort_info;
|
||||
ulonglong key_map;
|
||||
ulonglong UNINIT_VAR(key_map);
|
||||
myf sync_dir= ((share->now_transactional && !share->temporary) ?
|
||||
MY_SYNC_DIR : 0);
|
||||
my_bool scan_inited= 0, reenable_logging= 0;
|
||||
MARIA_SHARE backup_share;
|
||||
DBUG_ENTER("maria_repair_by_sort");
|
||||
LINT_INIT(key_map);
|
||||
|
||||
got_error= 1;
|
||||
new_file= -1;
|
||||
@ -4176,13 +4173,12 @@ int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info,
|
||||
IO_CACHE_SHARE io_share;
|
||||
MARIA_SORT_INFO sort_info;
|
||||
MARIA_SHARE backup_share;
|
||||
ulonglong key_map;
|
||||
ulonglong UNINIT_VAR(key_map);
|
||||
pthread_attr_t thr_attr;
|
||||
myf sync_dir= ((share->now_transactional && !share->temporary) ?
|
||||
MY_SYNC_DIR : 0);
|
||||
my_bool reenable_logging= 0;
|
||||
DBUG_ENTER("maria_repair_parallel");
|
||||
LINT_INIT(key_map);
|
||||
|
||||
got_error= 1;
|
||||
new_file= -1;
|
||||
@ -4908,9 +4904,8 @@ static int sort_get_next_record(MARIA_SORT_PARAM *sort_param)
|
||||
}
|
||||
case DYNAMIC_RECORD:
|
||||
{
|
||||
uchar *to;
|
||||
uchar *UNINIT_VAR(to);
|
||||
ha_checksum checksum= 0;
|
||||
LINT_INIT(to);
|
||||
|
||||
pos=sort_param->pos;
|
||||
param->progress= pos;
|
||||
|
@ -552,13 +552,10 @@ pthread_handler_t ma_checkpoint_background(void *arg)
|
||||
translog_get_horizon();
|
||||
ulonglong pagecache_flushes_at_last_checkpoint=
|
||||
maria_pagecache->global_cache_write;
|
||||
uint pages_bunch_size;
|
||||
uint UNINIT_VAR(pages_bunch_size);
|
||||
struct st_filter_param filter_param;
|
||||
PAGECACHE_FILE *dfile; /**< data file currently being flushed */
|
||||
PAGECACHE_FILE *kfile; /**< index file currently being flushed */
|
||||
LINT_INIT(kfile);
|
||||
LINT_INIT(dfile);
|
||||
LINT_INIT(pages_bunch_size);
|
||||
PAGECACHE_FILE *UNINIT_VAR(dfile); /**< data file currently being flushed */
|
||||
PAGECACHE_FILE *UNINIT_VAR(kfile); /**< index file currently being flushed */
|
||||
|
||||
my_thread_init();
|
||||
DBUG_PRINT("info",("Maria background checkpoint thread starts"));
|
||||
@ -756,7 +753,6 @@ static int collect_tables(LEX_STRING *str, LSN checkpoint_start_log_horizon)
|
||||
PAGECACHE_FLUSH_FILTER filter;
|
||||
DBUG_ENTER("collect_tables");
|
||||
|
||||
LINT_INIT(state_copies_horizon);
|
||||
/* let's make a list of distinct shares */
|
||||
mysql_mutex_lock(&THR_LOCK_maria);
|
||||
for (nb= 0, pos= maria_open_list; pos; pos= pos->next)
|
||||
|
@ -43,7 +43,7 @@ int maria_create(const char *name, enum data_file_type datafile_type,
|
||||
MARIA_CREATE_INFO *ci,uint flags)
|
||||
{
|
||||
register uint i,j;
|
||||
File dfile,file;
|
||||
File UNINIT_VAR(dfile), UNINIT_VAR(file);
|
||||
int errpos,save_errno, create_mode= O_RDWR | O_TRUNC, res;
|
||||
myf create_flag;
|
||||
uint length,max_key_length,packed,pack_bytes,pointer,real_length_diff,
|
||||
@ -76,8 +76,6 @@ int maria_create(const char *name, enum data_file_type datafile_type,
|
||||
keys, columns, uniques, flags));
|
||||
|
||||
DBUG_ASSERT(maria_inited);
|
||||
LINT_INIT(dfile);
|
||||
LINT_INIT(file);
|
||||
|
||||
if (!ci)
|
||||
{
|
||||
|
@ -1452,15 +1452,13 @@ int _ma_read_dynamic_record(MARIA_HA *info, uchar *buf,
|
||||
uint b_type;
|
||||
MARIA_BLOCK_INFO block_info;
|
||||
File file;
|
||||
uchar *to;
|
||||
uint left_length;
|
||||
uchar *UNINIT_VAR(to);
|
||||
uint UNINIT_VAR(left_length);
|
||||
DBUG_ENTER("_ma_read_dynamic_record");
|
||||
|
||||
if (filepos == HA_OFFSET_ERROR)
|
||||
goto err;
|
||||
|
||||
LINT_INIT(to);
|
||||
LINT_INIT(left_length);
|
||||
file= info->dfile.file;
|
||||
block_of_record= 0; /* First block of record is numbered as zero. */
|
||||
block_info.second_read= 0;
|
||||
@ -1738,13 +1736,12 @@ int _ma_read_rnd_dynamic_record(MARIA_HA *info,
|
||||
{
|
||||
int block_of_record, info_read;
|
||||
uint left_len,b_type;
|
||||
uchar *to;
|
||||
uchar *UNINIT_VAR(to);
|
||||
MARIA_BLOCK_INFO block_info;
|
||||
MARIA_SHARE *share= info->s;
|
||||
DBUG_ENTER("_ma_read_rnd_dynamic_record");
|
||||
|
||||
info_read=0;
|
||||
LINT_INIT(to);
|
||||
|
||||
if (info->lock_type == F_UNLCK)
|
||||
{
|
||||
|
@ -344,10 +344,9 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
|
||||
int subkeys=1;
|
||||
my_bool can_go_down;
|
||||
MARIA_HA *info=ftb->info;
|
||||
uint off, extra=HA_FT_WLEN+info->s->base.rec_reflength;
|
||||
uint UNINIT_VAR(off), extra=HA_FT_WLEN+info->s->base.rec_reflength;
|
||||
uchar *lastkey_buf= ftbw->word+ftbw->off;
|
||||
MARIA_KEY key;
|
||||
LINT_INIT(off);
|
||||
|
||||
if (ftbw->flags & FTB_FLAG_TRUNC)
|
||||
lastkey_buf+=ftbw->len;
|
||||
|
@ -1260,7 +1260,6 @@ static my_bool translog_set_lsn_for_files(uint32 from_file, uint32 to_file,
|
||||
{
|
||||
LOGHANDLER_FILE_INFO info;
|
||||
File fd;
|
||||
LINT_INIT(info.max_lsn);
|
||||
|
||||
fd= open_logfile_by_number_no_cache(file);
|
||||
if ((fd < 0) ||
|
||||
@ -1367,12 +1366,10 @@ end:
|
||||
static void translog_mark_file_finished(uint32 file)
|
||||
{
|
||||
int i;
|
||||
struct st_file_counter *fc_ptr;
|
||||
struct st_file_counter *UNINIT_VAR(fc_ptr);
|
||||
DBUG_ENTER("translog_mark_file_finished");
|
||||
DBUG_PRINT("enter", ("file: %lu", (ulong) file));
|
||||
|
||||
LINT_INIT(fc_ptr);
|
||||
|
||||
mysql_mutex_lock(&log_descriptor.unfinished_files_lock);
|
||||
|
||||
DBUG_ASSERT(log_descriptor.unfinished_files.elements > 0);
|
||||
@ -7487,7 +7484,6 @@ static void translog_force_current_buffer_to_finish()
|
||||
(uint) old_buffer->
|
||||
copy_to_buffer_in_progress));
|
||||
translog_lock_assert_owner();
|
||||
LINT_INIT(current_page_fill);
|
||||
new_buff_beginning= old_buffer->offset;
|
||||
new_buff_beginning+= old_buffer->size; /* increase offset */
|
||||
|
||||
@ -7770,9 +7766,8 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
|
||||
{
|
||||
dirty_buffer_mask_t dirty_buffer_mask;
|
||||
uint i;
|
||||
uint8 last_buffer_no, start_buffer_no;
|
||||
uint8 UNINIT_VAR(last_buffer_no), start_buffer_no;
|
||||
DBUG_ENTER("translog_flush_buffers");
|
||||
LINT_INIT(last_buffer_no);
|
||||
|
||||
/*
|
||||
We will recheck information when will lock buffers one by
|
||||
@ -7919,7 +7914,7 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
|
||||
my_bool translog_flush(TRANSLOG_ADDRESS lsn)
|
||||
{
|
||||
struct timespec abstime;
|
||||
ulonglong flush_interval;
|
||||
ulonglong UNINIT_VAR(flush_interval);
|
||||
ulonglong time_spent;
|
||||
LSN sent_to_disk= LSN_IMPOSSIBLE;
|
||||
TRANSLOG_ADDRESS flush_horizon;
|
||||
@ -7929,8 +7924,6 @@ my_bool translog_flush(TRANSLOG_ADDRESS lsn)
|
||||
DBUG_PRINT("enter", ("Flush up to LSN: (%lu,0x%lx)", LSN_IN_PARTS(lsn)));
|
||||
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
|
||||
translog_status == TRANSLOG_READONLY);
|
||||
LINT_INIT(sent_to_disk);
|
||||
LINT_INIT(flush_interval);
|
||||
|
||||
mysql_mutex_lock(&log_descriptor.log_flush_lock);
|
||||
DBUG_PRINT("info", ("Everything is flushed up to (%lu,0x%lx)",
|
||||
|
@ -1411,8 +1411,7 @@ uint _ma_pack_get_block_info(MARIA_HA *maria, MARIA_BIT_BUFF *bit_buff,
|
||||
File file, my_off_t filepos)
|
||||
{
|
||||
uchar *header= info->header;
|
||||
uint head_length,ref_length;
|
||||
LINT_INIT(ref_length);
|
||||
uint head_length,UNINIT_VAR(ref_length);
|
||||
|
||||
if (file >= 0)
|
||||
{
|
||||
|
@ -3038,12 +3038,11 @@ static MARIA_HA *get_MARIA_HA_from_REDO_record(const
|
||||
TRANSLOG_HEADER_BUFFER *rec)
|
||||
{
|
||||
uint16 sid;
|
||||
pgcache_page_no_t page;
|
||||
pgcache_page_no_t UNINIT_VAR(page);
|
||||
MARIA_HA *info;
|
||||
MARIA_SHARE *share;
|
||||
char llbuf[22];
|
||||
my_bool index_page_redo_entry= FALSE, page_redo_entry= FALSE;
|
||||
LINT_INIT(page);
|
||||
|
||||
print_redo_phase_progress(rec->lsn);
|
||||
sid= fileid_korr(rec->header);
|
||||
|
@ -356,8 +356,8 @@ int _ma_seq_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page,
|
||||
uint32 comp_flag, uchar **ret_pos,
|
||||
uchar *buff, my_bool *last_key)
|
||||
{
|
||||
int flag;
|
||||
uint page_flag, nod_flag, length, not_used[2];
|
||||
int UNINIT_VAR(flag);
|
||||
uint page_flag, nod_flag, UNINIT_VAR(length), not_used[2];
|
||||
uchar t_buff[MARIA_MAX_KEY_BUFF], *end;
|
||||
uchar *page;
|
||||
MARIA_KEYDEF *keyinfo= key->keyinfo;
|
||||
@ -365,9 +365,6 @@ int _ma_seq_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page,
|
||||
MARIA_KEY tmp_key;
|
||||
DBUG_ENTER("_ma_seq_search");
|
||||
|
||||
LINT_INIT(flag);
|
||||
LINT_INIT(length);
|
||||
|
||||
page_flag= ma_page->flag;
|
||||
nod_flag= ma_page->node;
|
||||
page= ma_page->buff;
|
||||
@ -430,10 +427,10 @@ int _ma_prefix_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page,
|
||||
uint nod_flag, length, len, matched, cmplen, kseg_len;
|
||||
uint page_flag, prefix_len,suffix_len;
|
||||
int key_len_skip, seg_len_pack, key_len_left;
|
||||
uchar *end, *vseg, *saved_vseg, *saved_from;
|
||||
uchar *end, *vseg, *UNINIT_VAR(saved_vseg), *UNINIT_VAR(saved_from);
|
||||
uchar *page;
|
||||
uchar tt_buff[MARIA_MAX_KEY_BUFF+2], *t_buff=tt_buff+2;
|
||||
uchar *saved_to;
|
||||
uchar *UNINIT_VAR(saved_to);
|
||||
const uchar *kseg;
|
||||
uint saved_length=0, saved_prefix_len=0;
|
||||
uint length_pack;
|
||||
@ -442,13 +439,6 @@ int _ma_prefix_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page,
|
||||
const uchar *sort_order= keyinfo->seg->charset->sort_order;
|
||||
DBUG_ENTER("_ma_prefix_search");
|
||||
|
||||
LINT_INIT(length);
|
||||
LINT_INIT(prefix_len);
|
||||
LINT_INIT(seg_len_pack);
|
||||
LINT_INIT(saved_from);
|
||||
LINT_INIT(saved_to);
|
||||
LINT_INIT(saved_vseg);
|
||||
|
||||
t_buff[0]=0; /* Avoid bugs */
|
||||
page_flag= ma_page->flag;
|
||||
nod_flag= ma_page->node;
|
||||
|
@ -506,7 +506,7 @@ int _ma_thr_write_keys(MARIA_SORT_PARAM *sort_param)
|
||||
{
|
||||
MARIA_SORT_INFO *sort_info=sort_param->sort_info;
|
||||
HA_CHECK *param=sort_info->param;
|
||||
ulong length, keys;
|
||||
ulong UNINIT_VAR(length), keys;
|
||||
double *rec_per_key_part= param->new_rec_per_key_part;
|
||||
int got_error=sort_info->got_error;
|
||||
uint i;
|
||||
@ -515,7 +515,6 @@ int _ma_thr_write_keys(MARIA_SORT_PARAM *sort_param)
|
||||
MARIA_SORT_PARAM *sinfo;
|
||||
uchar *mergebuf=0;
|
||||
DBUG_ENTER("_ma_thr_write_keys");
|
||||
LINT_INIT(length);
|
||||
|
||||
for (i= 0, sinfo= sort_param ;
|
||||
i < sort_info->total_keys ;
|
||||
@ -941,7 +940,7 @@ merge_buffers(MARIA_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
|
||||
int error;
|
||||
uint sort_length,maxcount;
|
||||
ha_rows count;
|
||||
my_off_t to_start_filepos;
|
||||
my_off_t UNINIT_VAR(to_start_filepos);
|
||||
uchar *strpos;
|
||||
BUFFPEK *buffpek,**refpek;
|
||||
QUEUE queue;
|
||||
@ -950,7 +949,6 @@ merge_buffers(MARIA_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
|
||||
count=error=0;
|
||||
maxcount=keys/((uint) (Tb-Fb) +1);
|
||||
DBUG_ASSERT(maxcount > 0);
|
||||
LINT_INIT(to_start_filepos);
|
||||
if (to_file)
|
||||
to_start_filepos=my_b_tell(to_file);
|
||||
strpos= (uchar*) sort_keys;
|
||||
|
@ -34,7 +34,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
|
||||
MI_CREATE_INFO *ci,uint flags)
|
||||
{
|
||||
register uint i,j;
|
||||
File dfile,file;
|
||||
File UNINIT_VAR(dfile),UNINIT_VAR(file);
|
||||
int errpos,save_errno, create_mode= O_RDWR | O_TRUNC;
|
||||
myf create_flag;
|
||||
uint fields,length,max_key_length,packed,pack_bytes,pointer,real_length_diff,
|
||||
@ -69,8 +69,6 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
|
||||
{
|
||||
DBUG_RETURN(my_errno=HA_WRONG_CREATE_OPTION);
|
||||
}
|
||||
LINT_INIT(dfile);
|
||||
LINT_INIT(file);
|
||||
|
||||
errpos=0;
|
||||
options=0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user