diff options
author | Seppo Jaakola <seppo.jaakola@codership.com> | 2013-05-24 15:29:01 +0300 |
---|---|---|
committer | Seppo Jaakola <seppo.jaakola@codership.com> | 2013-05-24 15:29:01 +0300 |
commit | 48af4be62a077f5edfadc9b5ea4f6c8c4b00c469 (patch) | |
tree | 18ed52e4c23fdea08f654e611ddd30ee760c1377 /storage/xtradb/os | |
parent | e95fdb74ab85bf24b805c1d4ead8c3d3a791b79a (diff) | |
parent | 421c885446ddf7a996cecb0d3831f7b1a10d3701 (diff) | |
download | mariadb-git-48af4be62a077f5edfadc9b5ea4f6c8c4b00c469.tar.gz |
References: MDEV-4572 - merge with mariaDB 5.5.30
Diffstat (limited to 'storage/xtradb/os')
-rw-r--r-- | storage/xtradb/os/os0file.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/storage/xtradb/os/os0file.c b/storage/xtradb/os/os0file.c index 34de6daba99..97777e21df8 100644 --- a/storage/xtradb/os/os0file.c +++ b/storage/xtradb/os/os0file.c @@ -1503,6 +1503,13 @@ os_file_create_func( DWORD create_flag; DWORD attributes; ibool retry; + + DBUG_EXECUTE_IF( + "ib_create_table_fail_disk_full", + *success = FALSE; + SetLastError(ERROR_DISK_FULL); + return((os_file_t) -1); + ); try_again: ut_a(name); @@ -1633,6 +1640,12 @@ try_again: if (create_mode != OS_FILE_OPEN && create_mode != OS_FILE_OPEN_RAW) WAIT_ALLOW_WRITES(); + DBUG_EXECUTE_IF( + "ib_create_table_fail_disk_full", + *success = FALSE; + errno = ENOSPC; + return((os_file_t) -1); + ); try_again: ut_a(name); @@ -2397,7 +2410,7 @@ os_file_pread( os_n_file_reads++; - if (innobase_get_slow_log() && trx && trx->take_stats) + if (UNIV_UNLIKELY(trx && trx->take_stats)) { trx->io_reads++; trx->io_read += n; @@ -2430,7 +2443,7 @@ os_file_pread( os_n_pending_reads--; os_mutex_exit(os_file_count_mutex); - if (innobase_get_slow_log() && trx && trx->take_stats && start_time) + if (UNIV_UNLIKELY(start_time != 0)) { ut_usectime(&sec, &ms); finish_time = (ib_uint64_t)sec * 1000000 + ms; @@ -2484,7 +2497,7 @@ os_file_pread( os_n_pending_reads--; os_mutex_exit(os_file_count_mutex); - if (innobase_get_slow_log() && trx && trx->take_stats && start_time) + if (UNIV_UNLIKELY(start_time != 0) { ut_usectime(&sec, &ms); finish_time = (ib_uint64_t)sec * 1000000 + ms; @@ -4266,8 +4279,8 @@ os_aio_func( ut_ad(file); ut_ad(buf); ut_ad(n > 0); - ut_ad(n % OS_FILE_LOG_BLOCK_SIZE == 0); - ut_ad(offset % OS_FILE_LOG_BLOCK_SIZE == 0); + ut_ad(n % OS_MIN_LOG_BLOCK_SIZE == 0); + ut_ad(offset % OS_MIN_LOG_BLOCK_SIZE == 0); ut_ad(os_aio_validate_skip()); #ifdef WIN_ASYNC_IO ut_ad((n & 0xFFFFFFFFUL) == n); |