~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/csv/ha_tina.cc

  • Committer: Monty Taylor
  • Date: 2009-01-30 04:39:04 UTC
  • mto: (779.7.3 devel)
  • mto: This revision was merged to the branch mainline in revision 823.
  • Revision ID: mordred@inaugust.com-20090130043904-gphdonl7m6zdz06v
Cleaned up warnings up through innodb.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1162
1162
    {
1163
1163
      bool in_hole= get_write_pos(&write_end, ptr);
1164
1164
      off_t write_length= write_end - write_begin;
 
1165
      if (write_length > SIZE_MAX)
 
1166
      {
 
1167
        goto error;
 
1168
      }
1165
1169
 
1166
1170
      /* if there is something to write, write it */
1167
1171
      if (write_length)
1169
1173
        if (my_write(update_temp_file,
1170
1174
                     (unsigned char*) (file_buff->ptr() +
1171
1175
                               (write_begin - file_buff->start())),
1172
 
                     write_length, MYF_RW))
 
1176
                     (size_t)write_length, MYF_RW))
1173
1177
          goto error;
1174
1178
        temp_file_length+= write_length;
1175
1179
      }
1347
1351
  while (1)
1348
1352
  {
1349
1353
    write_end= std::min(file_buff->end(), current_position);
1350
 
    if ((write_end - write_begin) &&
 
1354
 
 
1355
    off_t write_length= write_end - write_begin;
 
1356
    if (write_length > SIZE_MAX)
 
1357
    {
 
1358
      return -1;
 
1359
    }
 
1360
    if ((write_length) &&
1351
1361
        (my_write(repair_file, (unsigned char*)file_buff->ptr(),
1352
 
                  write_end - write_begin, MYF_RW)))
 
1362
                  (size_t)write_length, MYF_RW)))
1353
1363
      return(-1);
1354
1364
 
1355
1365
    write_begin= write_end;