Commit 26387734 authored by unknown's avatar unknown

Fix gcc 4.6 warning after merge with 5.1

parent dd564da3
......@@ -2081,8 +2081,8 @@ int multi_update::do_updates()
err:
{
thd->fatal_error();
prepare_record_for_error_message(local_error, table);
table->file->print_error(local_error,MYF(0));
prepare_record_for_error_message(local_error, err_table);
err_table->file->print_error(local_error,MYF(0));
}
err2:
......
......@@ -5484,7 +5484,7 @@ int update_virtual_fields(THD *thd, TABLE *table, bool for_write)
{
DBUG_ENTER("update_virtual_fields");
Field **vfield_ptr, *vfield;
int error= 0;
int error __attribute__ ((unused))= 0;
if (!table || !table->vfield)
DBUG_RETURN(0);
......
......@@ -5342,7 +5342,6 @@ int _ma_scan_block_record(MARIA_HA *info, uchar *record,
my_bool skip_deleted __attribute__ ((unused)))
{
uint block_size;
my_off_t filepos;
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_scan_block_record");
......@@ -5472,7 +5471,6 @@ restart_bitmap_scan:
/* Read next bitmap */
info->scan.bitmap_page+= share->bitmap.pages_covered;
filepos= (my_off_t) info->scan.bitmap_page * block_size;
if (unlikely(info->scan.bitmap_page >= info->scan.max_page))
{
DBUG_PRINT("info", ("Found end of file"));
......
......@@ -1741,14 +1741,20 @@ int _ma_read_rnd_dynamic_record(MARIA_HA *info,
MARIA_RECORD_POS filepos,
my_bool skip_deleted_blocks)
{
int block_of_record, info_read;
int block_of_record;
#ifdef MARIA_EXTERNAL_LOCKING
int info_read;
#endif
uint left_len,b_type;
uchar *to;
MARIA_BLOCK_INFO block_info;
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_read_rnd_dynamic_record");
#ifdef MARIA_EXTERNAL_LOCKING
info_read=0;
#endif
LINT_INIT(to);
if (info->lock_type == F_UNLCK)
......@@ -1758,8 +1764,10 @@ int _ma_read_rnd_dynamic_record(MARIA_HA *info,
info->tmp_lock_type=F_RDLCK;
#endif
}
#ifdef MARIA_EXTERNAL_LOCKING
else
info_read=1; /* memory-keyinfoblock is ok */
#endif
block_of_record= 0; /* First block of record is numbered as zero. */
block_info.second_read= 0;
......
......@@ -703,7 +703,7 @@ static int sphinx_done_func ( void * )
pthread_mutex_destroy ( &sphinx_mutex );
}
SPH_RET(0);
SPH_RET(error);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment