~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/os/os0file.c

Merge Stewart - Update innobase plugin to be based on innodb 1.1.4 from MySQL 5.5.8 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1297
1297
void
1298
1298
os_file_set_nocache(
1299
1299
/*================*/
1300
 
        int             fd,             /*!< in: file descriptor to alter */
1301
 
        const char*     file_name,      /*!< in: file name, used in the
1302
 
                                        diagnostic message */
1303
 
        const char*     operation_name) /*!< in: "open" or "create"; used in the
 
1300
        int             fd              /*!< in: file descriptor to alter */
 
1301
        __attribute__((unused)),
 
1302
        const char*     file_name       /*!< in: used in the diagnostic message */
 
1303
        __attribute__((unused)),
 
1304
        const char*     operation_name __attribute__((unused)))
 
1305
                                        /*!< in: "open" or "create"; used in the
1304
1306
                                        diagnostic message */
1305
1307
{
1306
1308
        /* some versions of Solaris may not have DIRECTIO_ON */
2404
2406
        ulint           i;
2405
2407
#endif /* !UNIV_HOTBACKUP */
2406
2408
 
 
2409
        /* On 64-bit Windows, ulint is 64 bits. But offset and n should be
 
2410
        no more than 32 bits. */
2407
2411
        ut_a((offset & 0xFFFFFFFFUL) == offset);
 
2412
        ut_a((n & 0xFFFFFFFFUL) == n);
2408
2413
 
2409
2414
        os_n_file_reads++;
2410
2415
        os_bytes_read_since_printout += n;
2530
2535
        ulint           i;
2531
2536
#endif /* !UNIV_HOTBACKUP */
2532
2537
 
 
2538
        /* On 64-bit Windows, ulint is 64 bits. But offset and n should be
 
2539
        no more than 32 bits. */
2533
2540
        ut_a((offset & 0xFFFFFFFFUL) == offset);
 
2541
        ut_a((n & 0xFFFFFFFFUL) == n);
2534
2542
 
2535
2543
        os_n_file_reads++;
2536
2544
        os_bytes_read_since_printout += n;
2662
2670
        ulint           i;
2663
2671
#endif /* !UNIV_HOTBACKUP */
2664
2672
 
2665
 
        ut_a((offset & 0xFFFFFFFF) == offset);
 
2673
        /* On 64-bit Windows, ulint is 64 bits. But offset and n should be
 
2674
        no more than 32 bits. */
 
2675
        ut_a((offset & 0xFFFFFFFFUL) == offset);
 
2676
        ut_a((n & 0xFFFFFFFFUL) == n);
2666
2677
 
2667
2678
        os_n_file_writes++;
2668
2679
 
3625
3636
        ulint           slots_per_seg;
3626
3637
        ulint           local_seg;
3627
3638
 
 
3639
#ifdef WIN_ASYNC_IO
 
3640
        ut_a((len & 0xFFFFFFFFUL) == len);
 
3641
#endif
 
3642
 
3628
3643
        /* No need of a mutex. Only reading constant fields */
3629
3644
        slots_per_seg = array->n_slots / array->n_segments;
3630
3645
 
4002
4017
        ut_ad(n % OS_FILE_LOG_BLOCK_SIZE == 0);
4003
4018
        ut_ad(offset % OS_FILE_LOG_BLOCK_SIZE == 0);
4004
4019
        ut_ad(os_aio_validate());
 
4020
#ifdef WIN_ASYNC_IO
 
4021
        ut_ad((n & 0xFFFFFFFFUL) == n);
 
4022
#endif
4005
4023
 
4006
4024
        wake_later = mode & OS_AIO_SIMULATED_WAKE_LATER;
4007
4025
        mode = mode & (~OS_AIO_SIMULATED_WAKE_LATER);
4279
4297
                                            __FILE__, __LINE__);
4280
4298
#endif
4281
4299
 
 
4300
                ut_a((slot->len & 0xFFFFFFFFUL) == slot->len);
 
4301
 
4282
4302
                switch (slot->type) {
4283
4303
                case OS_FILE_WRITE:
4284
4304
                        ret = WriteFile(slot->file, slot->buf,
4285
 
                                        slot->len, &len,
 
4305
                                        (DWORD) slot->len, &len,
4286
4306
                                        &(slot->control));
4287
4307
 
4288
4308
                        break;
4289
4309
                case OS_FILE_READ:
4290
4310
                        ret = ReadFile(slot->file, slot->buf,
4291
 
                                       slot->len, &len,
 
4311
                                       (DWORD) slot->len, &len,
4292
4312
                                       &(slot->control));
4293
4313
 
4294
4314
                        break;