diff options
author | Vasil Dimov <vasil.dimov@oracle.com> | 2012-10-10 22:22:10 +0300 |
---|---|---|
committer | Vasil Dimov <vasil.dimov@oracle.com> | 2012-10-10 22:22:10 +0300 |
commit | 1d16fc16dc50d21e2456d6367cea20f83404ffc6 (patch) | |
tree | 790f6754f3cf057a1c89b14e21a332aa6d945db0 /storage | |
parent | 4cefe863aee8430a09e74a52feef0eb9ea4fae9b (diff) | |
download | mariadb-git-1d16fc16dc50d21e2456d6367cea20f83404ffc6.tar.gz |
Fix compilation error in debug mode:
os/os0file.c:1332: error: ISO C90 forbids mixed declarations and code
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/os/os0file.c | 27 | ||||
-rw-r--r-- | storage/innodb_plugin/os/os0file.c | 27 |
2 files changed, 26 insertions, 28 deletions
diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c index 9f68f93fd99..d088ff54ebc 100644 --- a/storage/innobase/os/os0file.c +++ b/storage/innobase/os/os0file.c @@ -1210,27 +1210,19 @@ os_file_create( ibool* success)/* out: TRUE if succeed, FALSE if error */ { #ifdef __WIN__ + os_file_t file; + DWORD share_mode = FILE_SHARE_READ; + 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); ); -#else /* __WIN__ */ - DBUG_EXECUTE_IF( - "ib_create_table_fail_disk_full", - *success = FALSE; - errno = ENOSPC; - return((os_file_t) -1); - ); -#endif /* __WIN__ */ -#ifdef __WIN__ - os_file_t file; - DWORD share_mode = FILE_SHARE_READ; - DWORD create_flag; - DWORD attributes; - ibool retry; try_again: ut_a(name); @@ -1334,6 +1326,13 @@ try_again: ibool retry; const char* mode_str = NULL; + DBUG_EXECUTE_IF( + "ib_create_table_fail_disk_full", + *success = FALSE; + errno = ENOSPC; + return((os_file_t) -1); + ); + try_again: ut_a(name); diff --git a/storage/innodb_plugin/os/os0file.c b/storage/innodb_plugin/os/os0file.c index 7f8c7c637a1..57a140ea698 100644 --- a/storage/innodb_plugin/os/os0file.c +++ b/storage/innodb_plugin/os/os0file.c @@ -1250,27 +1250,19 @@ os_file_create( ibool* success)/*!< out: TRUE if succeed, FALSE if error */ { #ifdef __WIN__ + os_file_t file; + DWORD share_mode = FILE_SHARE_READ; + 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); ); -#else /* __WIN__ */ - DBUG_EXECUTE_IF( - "ib_create_table_fail_disk_full", - *success = FALSE; - errno = ENOSPC; - return((os_file_t) -1); - ); -#endif /* __WIN__ */ -#ifdef __WIN__ - os_file_t file; - DWORD share_mode = FILE_SHARE_READ; - DWORD create_flag; - DWORD attributes; - ibool retry; try_again: ut_a(name); @@ -1386,6 +1378,13 @@ try_again: ibool retry; const char* mode_str = NULL; + DBUG_EXECUTE_IF( + "ib_create_table_fail_disk_full", + *success = FALSE; + errno = ENOSPC; + return((os_file_t) -1); + ); + try_again: ut_a(name); |