mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
merge
This commit is contained in:
commit
4720b6f68b
34 changed files with 87 additions and 90 deletions
|
@ -5238,7 +5238,8 @@ void do_connect(struct st_command *command)
|
|||
int con_port= opt_port;
|
||||
char *con_options;
|
||||
my_bool con_ssl= 0, con_compress= 0;
|
||||
my_bool con_pipe= 0, con_shm= 0;
|
||||
my_bool con_pipe= 0;
|
||||
my_bool con_shm __attribute__ ((unused))= 0;
|
||||
struct st_connection* con_slot;
|
||||
|
||||
static DYNAMIC_STRING ds_connection_name;
|
||||
|
|
|
@ -1743,11 +1743,10 @@ dynamic_column_update_many(DYNAMIC_COLUMN *str,
|
|||
uint i, j, k;
|
||||
uint new_column_count, column_count, not_null;
|
||||
enum enum_dyncol_func_result rc;
|
||||
int header_delta, header_delta_sign, data_delta_sign;
|
||||
int header_delta;
|
||||
size_t offset_size, entry_size, header_size, data_size;
|
||||
size_t new_offset_size, new_entry_size, new_header_size, new_data_size;
|
||||
size_t max_offset;
|
||||
my_bool copy;
|
||||
|
||||
if (add_column_count == 0)
|
||||
return ER_DYNCOL_OK;
|
||||
|
@ -1878,7 +1877,7 @@ dynamic_column_update_many(DYNAMIC_COLUMN *str,
|
|||
|
||||
if (plan[i].val->type == DYN_COL_NULL)
|
||||
{
|
||||
plan[i].act= PLAN_NOP; /* Mark entry to be skiped */
|
||||
plan[i].act= PLAN_NOP; /* Mark entry to be skiped */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1915,17 +1914,17 @@ dynamic_column_update_many(DYNAMIC_COLUMN *str,
|
|||
goto end;
|
||||
}
|
||||
|
||||
#ifdef NOT_IMPLEMENTED
|
||||
/* if (new_offset_size != offset_size) then we have to rewrite header */
|
||||
header_delta_sign= new_offset_size - offset_size;
|
||||
data_delta_sign= 0;
|
||||
copy= FALSE;
|
||||
for (i= 0; i < add_column_count; i++)
|
||||
{
|
||||
/* This is the check for increasing/decreasing */
|
||||
DELTA_CHECK(header_delta_sign, plan[i].hdelta, copy);
|
||||
DELTA_CHECK(data_delta_sign, plan[i].ddelta, copy);
|
||||
}
|
||||
|
||||
#endif
|
||||
calc_param(&new_entry_size, &new_header_size,
|
||||
new_offset_size, new_column_count);
|
||||
|
||||
|
|
|
@ -5810,7 +5810,6 @@ Item* Item_equal::get_first(Item *field_item)
|
|||
{
|
||||
Item_equal_fields_iterator it(*this);
|
||||
Item *item;
|
||||
JOIN_TAB *field_tab;
|
||||
if (!field_item)
|
||||
return (it++);
|
||||
Field *field= ((Item_field *) (field_item->real_item()))->field;
|
||||
|
@ -5835,8 +5834,6 @@ Item* Item_equal::get_first(Item *field_item)
|
|||
in presense of SJM nests.
|
||||
*/
|
||||
|
||||
field_tab= field->table->reginfo.join_tab;
|
||||
|
||||
TABLE_LIST *emb_nest= field->table->pos_in_table_list->embedding;
|
||||
|
||||
if (emb_nest && emb_nest->sj_mat_info && emb_nest->sj_mat_info->is_used)
|
||||
|
|
|
@ -2436,7 +2436,6 @@ bool Item_func_add_time::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
|||
long days, microseconds;
|
||||
longlong seconds;
|
||||
int l_sign= sign, was_cut= 0;
|
||||
uint dec= decimals;
|
||||
|
||||
if (is_date) // TIMESTAMP function
|
||||
{
|
||||
|
@ -2478,10 +2477,6 @@ bool Item_func_add_time::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
|||
|
||||
ltime->time_type= is_time ? MYSQL_TIMESTAMP_TIME : MYSQL_TIMESTAMP_DATETIME;
|
||||
|
||||
if (cached_field_type == MYSQL_TYPE_STRING &&
|
||||
(l_time1.second_part || l_time2.second_part))
|
||||
dec= TIME_SECOND_PART_DIGITS;
|
||||
|
||||
if (!is_time)
|
||||
{
|
||||
get_date_from_daynr(days,<ime->year,<ime->month,<ime->day);
|
||||
|
|
|
@ -1636,7 +1636,8 @@ bool DsMrr_impl::get_disk_sweep_mrr_cost(uint keynr, ha_rows rows, uint flags,
|
|||
uint *buffer_size, COST_VECT *cost)
|
||||
{
|
||||
ulong max_buff_entries, elem_size;
|
||||
ha_rows rows_in_full_step, rows_in_last_step;
|
||||
ha_rows rows_in_full_step;
|
||||
ha_rows rows_in_last_step;
|
||||
uint n_full_steps;
|
||||
double index_read_cost;
|
||||
|
||||
|
@ -1661,7 +1662,7 @@ bool DsMrr_impl::get_disk_sweep_mrr_cost(uint keynr, ha_rows rows, uint flags,
|
|||
/* Adjust buffer size if we expect to use only part of the buffer */
|
||||
if (n_full_steps)
|
||||
{
|
||||
get_sort_and_sweep_cost(table, rows, cost);
|
||||
get_sort_and_sweep_cost(table, rows_in_full_step, cost);
|
||||
cost->multiply(n_full_steps);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -3385,7 +3385,7 @@ TABLE *create_duplicate_weedout_tmp_table(THD *thd,
|
|||
bool using_unique_constraint=FALSE;
|
||||
bool use_packed_rows= FALSE;
|
||||
Field *field, *key_field;
|
||||
uint blob_count, null_pack_length, null_count;
|
||||
uint null_pack_length, null_count;
|
||||
uchar *null_flags;
|
||||
uchar *pos;
|
||||
DBUG_ENTER("create_duplicate_weedout_tmp_table");
|
||||
|
@ -3466,8 +3466,6 @@ TABLE *create_duplicate_weedout_tmp_table(THD *thd,
|
|||
share->keys_for_keyread.init();
|
||||
share->keys_in_use.init();
|
||||
|
||||
blob_count= 0;
|
||||
|
||||
/* Create the field */
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -1274,7 +1274,7 @@ int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet,
|
|||
handler *file= table->file;
|
||||
TABLE_SHARE *share= table->s;
|
||||
HA_CREATE_INFO create_info;
|
||||
bool show_table_options= FALSE;
|
||||
bool show_table_options __attribute__ ((unused))= FALSE;
|
||||
bool foreign_db_mode= (thd->variables.sql_mode & (MODE_POSTGRESQL |
|
||||
MODE_ORACLE |
|
||||
MODE_MSSQL |
|
||||
|
@ -1507,7 +1507,9 @@ int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet,
|
|||
packet->append(STRING_WITH_LEN("\n)"));
|
||||
if (!(thd->variables.sql_mode & MODE_NO_TABLE_OPTIONS) && !foreign_db_mode)
|
||||
{
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
show_table_options= TRUE;
|
||||
#endif
|
||||
/*
|
||||
Get possible table space definitions and append them
|
||||
to the CREATE TABLE statement
|
||||
|
|
|
@ -5692,7 +5692,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);
|
||||
|
||||
|
|
|
@ -1413,7 +1413,7 @@ 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, best_prefix_area_size;
|
||||
uint page, size;
|
||||
ulonglong best_prefix_bits;
|
||||
DBUG_ENTER("allocate_full_pages");
|
||||
|
@ -1422,7 +1422,6 @@ static ulong allocate_full_pages(MARIA_FILE_BITMAP *bitmap,
|
|||
/* 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)
|
||||
|
@ -1494,7 +1493,6 @@ static ulong allocate_full_pages(MARIA_FILE_BITMAP *bitmap,
|
|||
best_area_size= area_size;
|
||||
best_prefix_bits= prefix_bits;
|
||||
best_prefix_area_size= prefix_area_size;
|
||||
best_suffix_area_size= suffix_area_size;
|
||||
|
||||
/* Prefer to put data in biggest possible area */
|
||||
if (area_size <= pages_needed)
|
||||
|
|
|
@ -5014,7 +5014,7 @@ static my_bool read_row_extent_info(MARIA_HA *info, uchar *buff,
|
|||
MARIA_EXTENT_CURSOR extent;
|
||||
MARIA_RECORD_POS *tail_pos;
|
||||
uchar *data, *end_of_data;
|
||||
uint flag, row_extents, row_extents_size, field_lengths;
|
||||
uint flag, row_extents, row_extents_size;
|
||||
uchar *extents, *end;
|
||||
DBUG_ENTER("read_row_extent_info");
|
||||
|
||||
|
@ -5049,9 +5049,6 @@ static my_bool read_row_extent_info(MARIA_HA *info, uchar *buff,
|
|||
}
|
||||
info->cur_row.extents_count= row_extents;
|
||||
|
||||
if (share->base.max_field_lengths)
|
||||
get_key_length(field_lengths, data);
|
||||
|
||||
if (share->calc_checksum)
|
||||
info->cur_row.checksum= (uint) (uchar) *data++;
|
||||
if (row_extents > 1)
|
||||
|
@ -5337,7 +5334,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");
|
||||
|
||||
|
@ -5467,7 +5463,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"));
|
||||
|
@ -6749,11 +6744,11 @@ uint _ma_apply_redo_insert_row_blobs(MARIA_HA *info,
|
|||
uint i;
|
||||
uint res;
|
||||
uint page_range;
|
||||
pgcache_page_no_t page, start_page;
|
||||
pgcache_page_no_t page;
|
||||
uchar *buff;
|
||||
uint data_on_page= data_size;
|
||||
|
||||
start_page= page= page_korr(header);
|
||||
page= page_korr(header);
|
||||
header+= PAGE_STORE_SIZE;
|
||||
page_range= pagerange_korr(header);
|
||||
header+= PAGERANGE_STORE_SIZE;
|
||||
|
|
|
@ -5684,7 +5684,7 @@ static int sort_insert_key(MARIA_SORT_PARAM *sort_param,
|
|||
my_off_t prev_block)
|
||||
{
|
||||
uint a_length,t_length,nod_flag;
|
||||
my_off_t filepos,key_file_length;
|
||||
my_off_t filepos;
|
||||
uchar *anc_buff,*lastkey;
|
||||
MARIA_KEY_PARAM s_temp;
|
||||
MARIA_KEYDEF *keyinfo=sort_param->keyinfo;
|
||||
|
@ -5752,7 +5752,6 @@ static int sort_insert_key(MARIA_SORT_PARAM *sort_param,
|
|||
_ma_store_page_used(share, anc_buff, key_block->last_length);
|
||||
bzero(anc_buff+key_block->last_length,
|
||||
keyinfo->block_length- key_block->last_length);
|
||||
key_file_length=share->state.state.key_file_length;
|
||||
if ((filepos= _ma_new(info, DFLT_INIT_HITS, &page_link)) == HA_OFFSET_ERROR)
|
||||
DBUG_RETURN(1);
|
||||
_ma_fast_unlock_key_del(info);
|
||||
|
@ -5863,7 +5862,7 @@ static int sort_delete_record(MARIA_SORT_PARAM *sort_param)
|
|||
int _ma_flush_pending_blocks(MARIA_SORT_PARAM *sort_param)
|
||||
{
|
||||
uint nod_flag,length;
|
||||
my_off_t filepos,key_file_length;
|
||||
my_off_t filepos;
|
||||
SORT_KEY_BLOCKS *key_block;
|
||||
MARIA_SORT_INFO *sort_info= sort_param->sort_info;
|
||||
myf myf_rw=sort_info->param->myf_rw;
|
||||
|
@ -5880,7 +5879,6 @@ int _ma_flush_pending_blocks(MARIA_SORT_PARAM *sort_param)
|
|||
length= _ma_get_page_used(info->s, key_block->buff);
|
||||
if (nod_flag)
|
||||
_ma_kpointer(info,key_block->end_pos,filepos);
|
||||
key_file_length= info->s->state.state.key_file_length;
|
||||
bzero(key_block->buff+length, keyinfo->block_length-length);
|
||||
if ((filepos= _ma_new(info, DFLT_INIT_HITS, &page_link)) ==
|
||||
HA_OFFSET_ERROR)
|
||||
|
|
|
@ -1741,14 +1741,19 @@ 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 +1763,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;
|
||||
|
|
|
@ -319,7 +319,6 @@ my_bool _ma_ft_convert_to_ft2(MARIA_HA *info, MARIA_KEY *key)
|
|||
uchar *key_ptr= (uchar*) dynamic_array_ptr(da, 0), *end;
|
||||
uint length, key_length;
|
||||
MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link;
|
||||
MARIA_KEY tmp_key;
|
||||
MARIA_PAGE page;
|
||||
DBUG_ENTER("_ma_ft_convert_to_ft2");
|
||||
|
||||
|
@ -357,13 +356,8 @@ my_bool _ma_ft_convert_to_ft2(MARIA_HA *info, MARIA_KEY *key)
|
|||
|
||||
/* inserting the rest of key values */
|
||||
end= (uchar*) dynamic_array_ptr(da, da->elements);
|
||||
tmp_key.keyinfo= keyinfo;
|
||||
tmp_key.data_length= keyinfo->keylength;
|
||||
tmp_key.ref_length= 0;
|
||||
tmp_key.flag= 0;
|
||||
for (key_ptr+=length; key_ptr < end; key_ptr+=keyinfo->keylength)
|
||||
{
|
||||
tmp_key.data= key_ptr;
|
||||
if (_ma_ck_real_write_btree(info, key, &root, SEARCH_SAME))
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
|
|
@ -944,7 +944,7 @@ uint _ma_apply_redo_index(MARIA_HA *info,
|
|||
uchar *buff;
|
||||
const uchar *header_end= header + head_length;
|
||||
uint page_offset= 0, org_page_length;
|
||||
uint nod_flag, page_length, keypage_header, keynr;
|
||||
uint page_length, keypage_header, keynr;
|
||||
uint max_page_size= share->max_index_block_size;
|
||||
int result;
|
||||
MARIA_PAGE page;
|
||||
|
@ -972,7 +972,6 @@ uint _ma_apply_redo_index(MARIA_HA *info,
|
|||
|
||||
keynr= _ma_get_keynr(share, buff);
|
||||
_ma_page_setup(&page, info, share->keyinfo + keynr, page_pos, buff);
|
||||
nod_flag= page.node;
|
||||
org_page_length= page_length= page.size;
|
||||
|
||||
keypage_header= share->keypage_header;
|
||||
|
|
|
@ -2612,13 +2612,11 @@ static my_bool translog_buffer_flush(struct st_translog_buffer *buffer)
|
|||
i+= TRANSLOG_PAGE_SIZE, pg++)
|
||||
{
|
||||
TRANSLOG_ADDRESS addr= (buffer->offset + i);
|
||||
TRANSLOG_VALIDATOR_DATA data;
|
||||
DBUG_PRINT("info", ("send log form %lu till %lu address: (%lu,0x%lx) "
|
||||
"page #: %lu buffer size: %lu buffer: 0x%lx",
|
||||
(ulong) i, (ulong) (i + TRANSLOG_PAGE_SIZE),
|
||||
LSN_IN_PARTS(addr), (ulong) pg, (ulong) buffer->size,
|
||||
(ulong) buffer));
|
||||
data.addr= &addr;
|
||||
DBUG_ASSERT(log_descriptor.pagecache->block_size == TRANSLOG_PAGE_SIZE);
|
||||
DBUG_ASSERT(i + TRANSLOG_PAGE_SIZE <= buffer->size);
|
||||
if (translog_status != TRANSLOG_OK && translog_status != TRANSLOG_SHUTDOWN)
|
||||
|
@ -6564,16 +6562,12 @@ my_bool translog_scanner_init(LSN lsn,
|
|||
TRANSLOG_SCANNER_DATA *scanner,
|
||||
my_bool use_direct)
|
||||
{
|
||||
TRANSLOG_VALIDATOR_DATA data;
|
||||
DBUG_ENTER("translog_scanner_init");
|
||||
DBUG_PRINT("enter", ("Scanner: 0x%lx LSN: (%lu,0x%lx)",
|
||||
(ulong) scanner, LSN_IN_PARTS(lsn)));
|
||||
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
|
||||
translog_status == TRANSLOG_READONLY);
|
||||
|
||||
data.addr= &scanner->page_addr;
|
||||
data.was_recovered= 0;
|
||||
|
||||
scanner->page_offset= LSN_OFFSET(lsn) % TRANSLOG_PAGE_SIZE;
|
||||
|
||||
scanner->fixed_horizon= fixed_horizon;
|
||||
|
|
|
@ -1842,7 +1842,6 @@ void _ma_set_index_pagecache_callbacks(PAGECACHE_FILE *file,
|
|||
int _ma_open_datafile(MARIA_HA *info, MARIA_SHARE *share, const char *org_name,
|
||||
File file_to_dup __attribute__((unused)))
|
||||
{
|
||||
char *data_name= share->data_file_name.str;
|
||||
char real_data_name[FN_REFLEN];
|
||||
|
||||
if (org_name)
|
||||
|
@ -1856,7 +1855,6 @@ int _ma_open_datafile(MARIA_HA *info, MARIA_SHARE *share, const char *org_name,
|
|||
my_errno= HA_WRONG_CREATE_OPTION;
|
||||
return 1;
|
||||
}
|
||||
data_name= real_data_name;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -380,7 +380,6 @@ int maria_rtree_split_page(const MARIA_KEY *key, MARIA_PAGE *page,
|
|||
SplitStruct *stop;
|
||||
double *coord_buf;
|
||||
double *next_coord;
|
||||
double *old_coord;
|
||||
int n_dim;
|
||||
uchar *source_cur, *cur1, *cur2;
|
||||
uchar *new_page_buff, *log_internal_copy, *log_internal_copy_ptr,
|
||||
|
@ -426,7 +425,6 @@ int maria_rtree_split_page(const MARIA_KEY *key, MARIA_PAGE *page,
|
|||
maria_rtree_d_mbr(keyinfo->seg, key->data, key_data_length, cur->coords);
|
||||
cur->key= key->data;
|
||||
|
||||
old_coord= next_coord;
|
||||
|
||||
if (split_maria_rtree_node(task, max_keys + 1,
|
||||
page->size + full_length + 2,
|
||||
|
|
|
@ -3062,7 +3062,6 @@ static int mrg_rrnd(PACK_MRG_INFO *info,uchar *buf)
|
|||
{
|
||||
int error;
|
||||
MARIA_HA *isam_info;
|
||||
my_off_t filepos;
|
||||
|
||||
if (!info->current)
|
||||
{
|
||||
|
@ -3087,7 +3086,6 @@ static int mrg_rrnd(PACK_MRG_INFO *info,uchar *buf)
|
|||
return(HA_ERR_END_OF_FILE);
|
||||
info->current++;
|
||||
isam_info= *info->current;
|
||||
filepos=isam_info->s->pack.header_length;
|
||||
maria_reset(isam_info);
|
||||
maria_extra(isam_info,HA_EXTRA_CACHE, 0);
|
||||
if ((error= maria_scan_init(isam_info)))
|
||||
|
|
|
@ -949,7 +949,6 @@ int chk_data_link(HA_CHECK *param, MI_INFO *info, my_bool extend)
|
|||
char llbuff[22],llbuff2[22],llbuff3[22];
|
||||
ha_checksum intern_record_checksum;
|
||||
ha_checksum key_checksum[HA_MAX_POSSIBLE_KEY];
|
||||
my_bool static_row_size;
|
||||
MI_KEYDEF *keyinfo;
|
||||
MI_BLOCK_INFO block_info;
|
||||
DBUG_ENTER("chk_data_link");
|
||||
|
@ -974,7 +973,6 @@ int chk_data_link(HA_CHECK *param, MI_INFO *info, my_bool extend)
|
|||
empty=info->s->pack.header_length;
|
||||
|
||||
/* Check how to calculate checksum of rows */
|
||||
static_row_size=1;
|
||||
if (info->s->data_file_type == COMPRESSED_RECORD)
|
||||
{
|
||||
for (field=0 ; field < info->s->base.fields ; field++)
|
||||
|
@ -982,7 +980,6 @@ int chk_data_link(HA_CHECK *param, MI_INFO *info, my_bool extend)
|
|||
if (info->s->rec[field].base_type == FIELD_BLOB ||
|
||||
info->s->rec[field].base_type == FIELD_VARCHAR)
|
||||
{
|
||||
static_row_size=0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ xtPublic void xt_lock_installation(XTThreadPtr self, char *installation_path)
|
|||
char file_path[PATH_MAX];
|
||||
char buffer[101];
|
||||
size_t red_size;
|
||||
llong pid;
|
||||
llong pid __attribute__ ((unused));
|
||||
xtBool cd = pbxt_crash_debug;
|
||||
|
||||
xt_strcpy(PATH_MAX, file_path, installation_path);
|
||||
|
|
|
@ -1594,7 +1594,7 @@ static int pbxt_rollback(handlerton *hton, THD *thd, bool all)
|
|||
if (!all)
|
||||
self->st_stat_trans = FALSE;
|
||||
}
|
||||
return 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef DRIZZLED
|
||||
|
@ -2898,7 +2898,7 @@ int ha_pbxt::update_row(const byte * old_data, byte * new_data)
|
|||
* insert into t1 (val) values (1);
|
||||
*/
|
||||
if (table->found_next_number_field && new_data == table->record[0]) {
|
||||
MX_LONGLONG_T nr;
|
||||
MX_LONGLONG_T nr __attribute__ ((unused));
|
||||
my_bitmap_map *old_map;
|
||||
|
||||
old_map = mx_tmp_use_all_columns(table, table->read_set);
|
||||
|
|
|
@ -558,7 +558,7 @@ static size_t mm_checkmem(XTThreadPtr self, MissingMemoryPtr mm_ptr, void *p, xt
|
|||
unsigned char *ptr = (unsigned char *) p - MEM_DEBUG_HDR_SIZE;
|
||||
MemoryDebugPtr debug_ptr = (MemoryDebugPtr) ptr;
|
||||
size_t size = debug_ptr->size;
|
||||
long a_value; /* Added to simplfy debugging. */
|
||||
long a_value __attribute__ ((unused)); /* Added to simplfy debugging. */
|
||||
|
||||
if (!ASSERT(p))
|
||||
return(0);
|
||||
|
|
|
@ -830,7 +830,10 @@ xtPublic xtBool myxt_create_row_from_key(XTOpenTablePtr XT_UNUSED(ot), XTIndexPt
|
|||
{
|
||||
byte *record = (byte *) dest_buff;
|
||||
register byte *key;
|
||||
byte *pos,*key_end;
|
||||
byte *pos;
|
||||
#ifdef CHECK_KEYS
|
||||
byte *key_end;
|
||||
#endif
|
||||
register XTIndexSegRec *keyseg = ind->mi_seg;
|
||||
|
||||
/* GOTCHA: When selecting from multiple
|
||||
|
@ -843,7 +846,9 @@ xtPublic xtBool myxt_create_row_from_key(XTOpenTablePtr XT_UNUSED(ot), XTIndexPt
|
|||
memset(dest_buff, 0xFF, table->s->null_bytes);
|
||||
*/
|
||||
key = (byte *) b_value;
|
||||
#ifdef CHECK_KEYS
|
||||
key_end = key + key_len;
|
||||
#endif
|
||||
for (u_int i=0; i<ind->mi_seg_count; i++, keyseg++) {
|
||||
if (keyseg->null_bit) {
|
||||
if (!*key++)
|
||||
|
@ -1021,7 +1026,8 @@ xtPublic u_int myxt_get_key_length(XTIndexPtr ind, xtWord1 *key_buf)
|
|||
register XTIndexSegRec *keyseg = ind->mi_seg;
|
||||
register uchar *key_data = (uchar *) key_buf;
|
||||
uint seg_len;
|
||||
uint pack_len;
|
||||
uint pack_len
|
||||
__attribute__ ((unused));
|
||||
|
||||
for (u_int i=0; i<ind->mi_seg_count; i++, keyseg++) {
|
||||
/* Handle NULL part */
|
||||
|
@ -1506,7 +1512,7 @@ xtPublic u_int myxt_key_seg_length(XTIndexSegRec *keyseg, u_int key_offset, xtWo
|
|||
xtPublic xtWord4 myxt_store_row_length(XTOpenTablePtr ot, char *rec_buff)
|
||||
{
|
||||
TABLE *table = ot->ot_table->tab_dic.dic_my_table;
|
||||
char *sdata;
|
||||
char *sdata __attribute__ ((unused));
|
||||
xtWord4 dlen;
|
||||
xtWord4 item_size;
|
||||
xtWord4 row_size = 0;
|
||||
|
@ -1886,7 +1892,8 @@ xtPublic void myxt_print_key(XTIndexPtr ind, xtWord1 *key_value)
|
|||
register XTIndexSegRec *keyseg = ind->mi_seg;
|
||||
register uchar *b = (uchar *) key_value;
|
||||
uint b_length;
|
||||
uint pack_len;
|
||||
uint pack_len
|
||||
__attribute__ ((unused));
|
||||
|
||||
for (u_int i = 0; i < ind->mi_seg_count; i++, keyseg++) {
|
||||
if (i!=0)
|
||||
|
|
|
@ -94,17 +94,21 @@ void xt_print_log_record(xtLogID log, xtLogOffset offset, XTXactLogBufferDPtr re
|
|||
xtBool xn_set = FALSE;
|
||||
xtXactID xn_id = 0;
|
||||
char buffer[200];
|
||||
#ifdef TRACE_RECORD_DATA
|
||||
XTTabRecExtDPtr rec_buf;
|
||||
XTTabRecExtDPtr ext_rec;
|
||||
XTTabRecFixDPtr fix_rec;
|
||||
u_int rec_len;
|
||||
#endif
|
||||
XTTabRecExtDPtr ext_rec;
|
||||
xtLogID log_id = 0;
|
||||
xtLogOffset log_offset = 0;
|
||||
|
||||
#ifdef TRACE_RECORD_DATA
|
||||
rec_buf = NULL;
|
||||
ext_rec = NULL;
|
||||
fix_rec = NULL;
|
||||
rec_len = 0;
|
||||
#endif
|
||||
ext_rec = NULL;
|
||||
switch (record->xl.xl_status_1) {
|
||||
case XT_LOG_ENT_REC_MODIFIED:
|
||||
case XT_LOG_ENT_UPDATE:
|
||||
|
@ -118,10 +122,12 @@ void xt_print_log_record(xtLogID log, xtLogOffset offset, XTXactLogBufferDPtr re
|
|||
rec_id = XT_GET_DISK_4(record->xu.xu_rec_id_4);
|
||||
xn_id = XT_GET_DISK_4(record->xu.xu_xact_id_4);
|
||||
row_id = XT_GET_DISK_4(record->xu.xu_row_id_4);
|
||||
rec_len = XT_GET_DISK_2(record->xu.xu_size_2);
|
||||
xn_set = TRUE;
|
||||
type="rec";
|
||||
#ifdef TRACE_RECORD_DATA
|
||||
rec_len = XT_GET_DISK_2(record->xu.xu_size_2);
|
||||
rec_buf = (XTTabRecExtDPtr) &record->xu.xu_rec_type_1;
|
||||
#endif
|
||||
ext_rec = (XTTabRecExtDPtr) &record->xu.xu_rec_type_1;
|
||||
if (XT_REC_IS_EXT_DLOG(ext_rec->tr_rec_type_1)) {
|
||||
log_id = XT_GET_DISK_2(ext_rec->re_log_id_2);
|
||||
|
@ -129,7 +135,9 @@ void xt_print_log_record(xtLogID log, xtLogOffset offset, XTXactLogBufferDPtr re
|
|||
}
|
||||
else {
|
||||
ext_rec = NULL;
|
||||
#ifdef TRACE_RECORD_DATA
|
||||
fix_rec = (XTTabRecFixDPtr) &record->xu.xu_rec_type_1;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case XT_LOG_ENT_UPDATE_FL:
|
||||
|
@ -143,10 +151,12 @@ void xt_print_log_record(xtLogID log, xtLogOffset offset, XTXactLogBufferDPtr re
|
|||
rec_id = XT_GET_DISK_4(record->xf.xf_rec_id_4);
|
||||
xn_id = XT_GET_DISK_4(record->xf.xf_xact_id_4);
|
||||
row_id = XT_GET_DISK_4(record->xf.xf_row_id_4);
|
||||
rec_len = XT_GET_DISK_2(record->xf.xf_size_2);
|
||||
xn_set = TRUE;
|
||||
type="rec";
|
||||
#ifdef TRACE_RECORD_DATA
|
||||
rec_len = XT_GET_DISK_2(record->xf.xf_size_2);
|
||||
rec_buf = (XTTabRecExtDPtr) &record->xf.xf_rec_type_1;
|
||||
#endif
|
||||
ext_rec = (XTTabRecExtDPtr) &record->xf.xf_rec_type_1;
|
||||
if (XT_REC_IS_EXT_DLOG(ext_rec->tr_rec_type_1)) {
|
||||
log_id = XT_GET_DISK_2(ext_rec->re_log_id_2);
|
||||
|
@ -154,7 +164,9 @@ void xt_print_log_record(xtLogID log, xtLogOffset offset, XTXactLogBufferDPtr re
|
|||
}
|
||||
else {
|
||||
ext_rec = NULL;
|
||||
#ifdef TRACE_RECORD_DATA
|
||||
fix_rec = (XTTabRecFixDPtr) &record->xf.xf_rec_type_1;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case XT_LOG_ENT_REC_FREED:
|
||||
|
@ -173,10 +185,12 @@ void xt_print_log_record(xtLogID log, xtLogOffset offset, XTXactLogBufferDPtr re
|
|||
rec_id = XT_GET_DISK_4(record->rb.rb_rec_id_4);
|
||||
xn_id = XT_GET_DISK_4(record->rb.rb_xact_id_4);
|
||||
row_id = XT_GET_DISK_4(record->rb.rb_row_id_4);
|
||||
rec_len = XT_GET_DISK_2(record->rb.rb_size_2);
|
||||
xn_set = TRUE;
|
||||
type="rec";
|
||||
#ifdef TRACE_RECORD_DATA
|
||||
rec_len = XT_GET_DISK_2(record->rb.rb_size_2);
|
||||
rec_buf = (XTTabRecExtDPtr) &record->rb.rb_rec_type_1;
|
||||
#endif
|
||||
ext_rec = (XTTabRecExtDPtr) &record->rb.rb_rec_type_1;
|
||||
if (XT_REC_IS_EXT_DLOG(record->rb.rb_rec_type_1)) {
|
||||
log_id = XT_GET_DISK_2(ext_rec->re_log_id_2);
|
||||
|
@ -184,7 +198,9 @@ void xt_print_log_record(xtLogID log, xtLogOffset offset, XTXactLogBufferDPtr re
|
|||
}
|
||||
else {
|
||||
ext_rec = NULL;
|
||||
#ifdef TRACE_RECORD_DATA
|
||||
fix_rec = (XTTabRecFixDPtr) &record->rb.rb_rec_type_1;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case XT_LOG_ENT_REC_MOVED:
|
||||
|
@ -967,7 +983,8 @@ static void xres_apply_change(XTThreadPtr self, XTOpenTablePtr ot, XTXactLogBuff
|
|||
xtLogID data_log_id = 0;
|
||||
xtLogOffset data_log_offset = 0;
|
||||
u_int cols_required = 0;
|
||||
xtBool record_loaded;
|
||||
xtBool record_loaded
|
||||
__attribute__ ((unused));
|
||||
size_t rec_size;
|
||||
|
||||
rec_id = XT_GET_DISK_4(record->rb.rb_rec_id_4);
|
||||
|
|
|
@ -393,7 +393,8 @@ void XTTabCache::xt_tc_release_page(XT_ROW_REC_FILE_PTR XT_UNUSED(file), XTTabCa
|
|||
TAB_CAC_WRITE_LOCK(&seg->tcs_lock, thread->t_id);
|
||||
|
||||
#ifdef DEBUG
|
||||
XTTabCachePagePtr lpage, ppage;
|
||||
XTTabCachePagePtr lpage;
|
||||
XTTabCachePagePtr ppage __attribute__ ((unused));
|
||||
|
||||
ppage = NULL;
|
||||
lpage = seg->tcs_hash_table[page->tcp_hash_idx];
|
||||
|
@ -1202,7 +1203,7 @@ static void tabc_fr_main(XTThreadPtr self)
|
|||
static void *tabc_fr_run_thread(XTThreadPtr self)
|
||||
{
|
||||
int count;
|
||||
void *mysql_thread;
|
||||
void *mysql_thread __attribute__ ((unused));
|
||||
|
||||
myxt_wait_pbxt_plugin_slot_assigned(self);
|
||||
|
||||
|
|
|
@ -1976,8 +1976,10 @@ xtPublic void xt_check_table(XTThreadPtr self, XTOpenTablePtr ot)
|
|||
xtLogOffset log_offset;
|
||||
#endif
|
||||
xtRecordID rec_id;
|
||||
#ifdef DUMP_CHECK_TABLE
|
||||
xtRecordID prev_rec_id;
|
||||
xtXactID xn_id;
|
||||
#endif
|
||||
xtRowID row_id;
|
||||
u_llong free_rec_count = 0, free_count2 = 0;
|
||||
u_llong delete_rec_count = 0;
|
||||
|
@ -2104,8 +2106,10 @@ xtPublic void xt_check_table(XTThreadPtr self, XTOpenTablePtr ot)
|
|||
else
|
||||
printf(" ");
|
||||
#endif
|
||||
#ifdef DUMP_CHECK_TABLE
|
||||
prev_rec_id = XT_GET_DISK_4(rec_buf->tr_prev_rec_id_4);
|
||||
xn_id = XT_GET_DISK_4(rec_buf->tr_xact_id_4);
|
||||
#endif
|
||||
row_id = XT_GET_DISK_4(rec_buf->tr_row_id_4);
|
||||
switch (rec_buf->tr_rec_type_1 & XT_TAB_STATUS_MASK) {
|
||||
case XT_TAB_STATUS_FREED:
|
||||
|
|
|
@ -488,7 +488,8 @@ static void thr_free_resources(XTThreadPtr self, XTResourcePtr top)
|
|||
|
||||
xtPublic void xt_bug(XTThreadPtr XT_UNUSED(self))
|
||||
{
|
||||
static int *bug_ptr = NULL;
|
||||
static int *bug_ptr __attribute__ ((unused));
|
||||
bug_ptr= NULL;
|
||||
|
||||
bug_ptr = NULL;
|
||||
}
|
||||
|
|
|
@ -2117,7 +2117,7 @@ xtBool XTDatabaseLog::xlog_seq_next(XTXactSeqReadPtr seq, XTXactLogBufferDPtr *r
|
|||
size_t rec_offset;
|
||||
size_t max_rec_len;
|
||||
size_t size;
|
||||
u_int check_size = 1;
|
||||
u_int check_size __attribute__ ((unused))= 1;
|
||||
|
||||
/* Go to the next record (xseq_record_len must be initialized
|
||||
* to 0 for this to work.
|
||||
|
@ -2629,7 +2629,7 @@ static void *xlog_wr_run_thread(XTThreadPtr self)
|
|||
{
|
||||
XTDatabaseHPtr db = (XTDatabaseHPtr) self->t_data;
|
||||
int count;
|
||||
void *mysql_thread;
|
||||
void *mysql_thread __attribute__ ((unused));
|
||||
|
||||
mysql_thread = myxt_create_thread();
|
||||
|
||||
|
|
|
@ -703,7 +703,7 @@ static int sphinx_done_func ( void * )
|
|||
pthread_mutex_destroy ( &sphinx_mutex );
|
||||
}
|
||||
|
||||
SPH_RET(0);
|
||||
SPH_RET(error);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3301,7 +3301,7 @@ static
|
|||
void
|
||||
btr_record_not_null_field_in_rec(
|
||||
/*=============================*/
|
||||
rec_t* rec, /*!< in: physical record */
|
||||
rec_t* rec __attribute__ ((unused)),/*!< in: physical record */
|
||||
ulint n_unique, /*!< in: dict_index_get_n_unique(index),
|
||||
number of columns uniquely determine
|
||||
an index entry */
|
||||
|
@ -3321,9 +3321,8 @@ btr_record_not_null_field_in_rec(
|
|||
|
||||
for (i = 0; i < n_unique; i++) {
|
||||
ulint rec_len;
|
||||
byte* field;
|
||||
|
||||
field = rec_get_nth_field(rec, offsets, i, &rec_len);
|
||||
rec_get_nth_field_offs(offsets, i, &rec_len);
|
||||
|
||||
if (rec_len != UNIV_SQL_NULL) {
|
||||
n_not_null[i]++;
|
||||
|
|
|
@ -3895,7 +3895,7 @@ buf_page_io_complete(
|
|||
enum buf_io_fix io_type;
|
||||
const ibool uncompressed = (buf_page_get_state(bpage)
|
||||
== BUF_BLOCK_FILE_PAGE);
|
||||
enum buf_flush flush_type;
|
||||
//enum buf_flush flush_type;
|
||||
mutex_t* block_mutex;
|
||||
|
||||
ut_a(buf_page_in_file(bpage));
|
||||
|
@ -4051,7 +4051,7 @@ corrupt:
|
|||
|
||||
//buf_pool_mutex_enter();
|
||||
if (io_type == BUF_IO_WRITE) {
|
||||
flush_type = buf_page_get_flush_type(bpage);
|
||||
//flush_type = buf_page_get_flush_type(bpage);
|
||||
/* to keep consistency at buf_LRU_insert_zip_clean() */
|
||||
//if (flush_type == BUF_FLUSH_LRU) { /* optimistic! */
|
||||
mutex_enter(&LRU_list_mutex);
|
||||
|
|
|
@ -3516,7 +3516,7 @@ os_aio_simulated_wake_handler_thread(
|
|||
{
|
||||
os_aio_array_t* array;
|
||||
os_aio_slot_t* slot;
|
||||
ulint segment;
|
||||
ulint segment __attribute__ ((unused));
|
||||
ulint n;
|
||||
ulint i;
|
||||
|
||||
|
@ -3926,7 +3926,7 @@ os_aio_simulated_handle(
|
|||
ulint* space_id)
|
||||
{
|
||||
os_aio_array_t* array;
|
||||
ulint segment;
|
||||
ulint segment __attribute__ ((unused));
|
||||
os_aio_slot_t* slot;
|
||||
os_aio_slot_t* slot2;
|
||||
os_aio_slot_t* consecutive_ios[OS_AIO_MERGE_N_CONSECUTIVE];
|
||||
|
|
|
@ -4396,7 +4396,7 @@ no_gap_lock:
|
|||
idx_cond_check:
|
||||
if (prebuilt->idx_cond_func) {
|
||||
int res;
|
||||
ibool ib_res;
|
||||
ibool ib_res __attribute__ ((unused));
|
||||
ut_ad(prebuilt->template_type != ROW_MYSQL_DUMMY_TEMPLATE);
|
||||
offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap);
|
||||
ib_res= row_sel_store_mysql_rec(buf, prebuilt, rec, FALSE,
|
||||
|
|
|
@ -33,14 +33,13 @@ LF_HASH lf_hash;
|
|||
pthread_handler_t test_lf_pinbox(void *arg)
|
||||
{
|
||||
int m= *(int *)arg;
|
||||
int32 x= 0;
|
||||
LF_PINS *pins;
|
||||
|
||||
my_thread_init();
|
||||
|
||||
pins= lf_pinbox_get_pins(&lf_allocator.pinbox);
|
||||
|
||||
for (x= ((int)(intptr)(&m)); m ; m--)
|
||||
for (; m ; m--)
|
||||
{
|
||||
lf_pinbox_put_pins(pins);
|
||||
pins= lf_pinbox_get_pins(&lf_allocator.pinbox);
|
||||
|
|
Loading…
Reference in a new issue