Commit def460af authored by unknown's avatar unknown

More windows warnings cleanup


storage/archive/ha_archive.cc:
  More windows warnings clean up.
storage/archive/ha_archive.h:
  Change in prototype to clear windows warning.
parent 518a4e0e
...@@ -303,7 +303,6 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, ...@@ -303,7 +303,6 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name,
length))) length)))
{ {
char *tmp_name; char *tmp_name;
char tmp_file_name[FN_REFLEN];
azio_stream archive_tmp; azio_stream archive_tmp;
if (!my_multi_malloc(MYF(MY_WME | MY_ZEROFILL), if (!my_multi_malloc(MYF(MY_WME | MY_ZEROFILL),
...@@ -986,7 +985,7 @@ bool ha_archive::fix_rec_buff(unsigned int length) ...@@ -986,7 +985,7 @@ bool ha_archive::fix_rec_buff(unsigned int length)
length, record_buffer->length)); length, record_buffer->length));
DBUG_ASSERT(record_buffer->buffer); DBUG_ASSERT(record_buffer->buffer);
if (length > record_buffer->length); if (length > record_buffer->length)
{ {
byte *newptr; byte *newptr;
if (!(newptr=(byte*) my_realloc((gptr) record_buffer->buffer, if (!(newptr=(byte*) my_realloc((gptr) record_buffer->buffer,
...@@ -1002,7 +1001,7 @@ bool ha_archive::fix_rec_buff(unsigned int length) ...@@ -1002,7 +1001,7 @@ bool ha_archive::fix_rec_buff(unsigned int length)
DBUG_RETURN(0); DBUG_RETURN(0);
} }
int ha_archive::unpack_row(azio_stream *file_to_read, char *record) int ha_archive::unpack_row(azio_stream *file_to_read, byte *record)
{ {
DBUG_ENTER("ha_archive::unpack_row"); DBUG_ENTER("ha_archive::unpack_row");
...@@ -1050,7 +1049,9 @@ int ha_archive::unpack_row(azio_stream *file_to_read, char *record) ...@@ -1050,7 +1049,9 @@ int ha_archive::unpack_row(azio_stream *file_to_read, char *record)
int ha_archive::get_row_version3(azio_stream *file_to_read, byte *buf) int ha_archive::get_row_version3(azio_stream *file_to_read, byte *buf)
{ {
DBUG_ENTER("ha_archive::get_row_version3"); DBUG_ENTER("ha_archive::get_row_version3");
int returnable= unpack_row(file_to_read, buf); int returnable= unpack_row(file_to_read, buf);
DBUG_RETURN(returnable); DBUG_RETURN(returnable);
} }
...@@ -1284,7 +1285,7 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt) ...@@ -1284,7 +1285,7 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
} }
dbug_tmp_restore_column_map(table->read_set, org_bitmap); dbug_tmp_restore_column_map(table->read_set, org_bitmap);
share->rows_recorded= writer.rows; share->rows_recorded= (ha_rows)writer.rows;
} }
DBUG_PRINT("info", ("recovered %llu archive rows", DBUG_PRINT("info", ("recovered %llu archive rows",
...@@ -1380,13 +1381,8 @@ void ha_archive::update_create_info(HA_CREATE_INFO *create_info) ...@@ -1380,13 +1381,8 @@ void ha_archive::update_create_info(HA_CREATE_INFO *create_info)
create_info->auto_increment_value= stats.auto_increment_value + 1; create_info->auto_increment_value= stats.auto_increment_value + 1;
} }
if (!lstat(share->data_file_name, &stat_buff) && if (!(my_readlink(share->real_path, share->data_file_name, MYF(0))))
S_ISLNK(stat_buff.st_mode))
{
if (!(share->real_path[0]))
my_realpath(share->real_path, share->data_file_name,MYF(0));
create_info->data_file_name= share->real_path; create_info->data_file_name= share->real_path;
}
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
...@@ -140,7 +140,7 @@ class ha_archive: public handler ...@@ -140,7 +140,7 @@ class ha_archive: public handler
bool check_and_repair(THD *thd); bool check_and_repair(THD *thd);
uint32 max_row_length(const byte *buf); uint32 max_row_length(const byte *buf);
bool fix_rec_buff(unsigned int length); bool fix_rec_buff(unsigned int length);
int unpack_row(azio_stream *file_to_read, char *record); int unpack_row(azio_stream *file_to_read, byte *record);
unsigned int pack_row(byte *record); unsigned int pack_row(byte *record);
}; };
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