Commit graph

31 commits

Author SHA1 Message Date
Vladislav Vaintroub
4e92af9f43 This is the downport of
Bug#24509 - 2048 file descriptor limit on windows needs increasing, also 
WL#3049 - improved Windows I/O
                        
The patch replaces the use of the POSIX I/O interfaces in mysys on Windows with 
the Win32 API calls (CreateFile, WriteFile, etc). The Windows HANDLE for the open 
file is stored in the my_file_info struct, along with a flag for append mode 
because the Windows API does not support opening files in append mode in all cases)
The default max open files has been increased to 16384 and can be increased further
by setting --max-open-files=<value> during the server start.
                              
Another major change in this patch that almost all Windows specific file IO code
has been moved to a new file my_winfile.c, greatly reducing the amount of code 
in #ifdef blocks within mysys, thus improving readability.
                               
                                    
Minor enhancements:
- my_(f)stat() is changed to use __stati64 structure with  64 file size
and timestamps. It will return correct file size now (C runtime implementation
used to report outdated information)
- my_lock on Windows is prepared to handle additional timeout parameter
- after review : changed __WIN__ to _WIN32 in the new and changed code.
2009-09-11 22:26:35 +02:00
svoj@april.(none)
262ea6aafa Merge mysql.com:/home/svoj/devel/mysql/BUG27141/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG27141/mysql-5.1-engines
2007-06-05 03:43:11 +05:00
svoj@mysql.com/april.(none)
bb437f8205 BUG#27141 - Calling tell(-1) under Windows causes assertion failure in Debug mode
Original problem was fixed by Magnus (see BUG25807).

Currently only windows debug build causes assertion failure. This patch assures
that my_tell gets correct file descriptor on any platform by DBUG_ASSERT macro.
2007-06-05 03:16:02 +05:00
svoj@june.mysql.com
e232d9ced6 Merge mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-5.1-engines
2007-05-17 15:31:28 +05:00
svoj@mysql.com/june.mysql.com
8a809def0a Merge mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-5.0-engines
2007-05-17 15:27:56 +05:00
svoj@mysql.com/june.mysql.com
f6a111dfef Addition to fix for
BUG#25712 - insert delayed and check table run together report crashed
            tables
Fixed wrongly applied patch.
2007-05-17 15:23:59 +05:00
svoj@april.(none)
820651cd53 Merge mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-5.1-engines
2007-05-17 02:16:31 +05:00
svoj@mysql.com/april.(none)
bf473b1069 Merge mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-5.0-engines
2007-05-17 00:40:26 +05:00
svoj@mysql.com/april.(none)
3ea2ee357b BUG#25712 - insert delayed and check table run together report crashed
tables

In case system doesn't have native pread/pwrite calls (e.g. Windows)
and there is CHECK TABLE runs concurrently with another statement that
reads from a table, the table may be reported as crashed.

This is fixed by locking file descriptor when my_seek is executed on
MyISAM index file and emulated pread/pwrite may be executed concurrently.

Affects MyISAM tables on platforms that do not have native
pread/pwrite calls (e.g. Windows).

No deterministic test case for this bug.
2007-05-16 23:42:32 +05:00
jani@ua141d10.elisa.omakaista.fi
1c7beca65e Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-03-29 17:27:42 +03:00
jani@ua141d10.elisa.omakaista.fi
3c3b0391f8 Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1-main
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
2007-03-28 20:46:42 +03:00
jani@ua141d10.elisa.omakaista.fi
5c542a4656 Fixed compiler warnings. 2007-03-22 20:32:07 +02:00
kent@kent-amd64.(none)
be15e3bc15 Merge mysql.com:/home/kent/bk/main/mysql-5.0
into  mysql.com:/home/kent/bk/main/mysql-5.1
2006-12-23 20:20:40 +01:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
monty@nosik.monty.fi
89570bf966 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
2006-11-22 14:11:36 +02:00
monty@mysql.com/nosik.monty.fi
e825879800 Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)
2006-11-20 22:42:06 +02:00
thek@kpdesk.mysql.com
5f2424ead7 Merge kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.1-maint
2006-11-02 08:47:21 +01:00
thek@kpdesk.mysql.com
35b833eb86 Merge kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
2006-11-01 17:01:51 +01:00
thek@kpdesk.mysql.com
12d8f2bf31 Bug#22828 _my_b_read() ignores return values for my_seek() calls
- Because my_seek actually is capable of returning an error code we should
  exploit that in the best possible way.
- There might be kernel errors or other errors we can't predict and capturing
  the return value of all system calls gives us better understanding of
  possible errors.
2006-10-31 09:26:16 +01:00
Kristofer.Pettersson@naruto.
44e01d4144 Merge naruto.:C:/cpp/bug23010/my50-bug23010
into  naruto.:C:/cpp/bug23010/my51-bug23010
2006-10-17 10:37:55 +02:00
Kristofer.Pettersson@naruto.
3b316569a7 Bug#23010 _my_b_read() passing illegal file handles to my_seek()
- The io cache flag seek_not_done was not set properly in the reinit_
io_chache function call and this led my_seek to be called despite an
invalid file handle.
- Added a test in reinit_io_cache to ensure we have a valid file handle
before setting seek_not_done flag.
2006-10-09 21:13:37 +02:00
georg@lmy002.wdf.sap.corp
5686da41ac Fixes for crashes and test failures 2006-09-01 14:34:37 +02:00
rburnett@production.mysql.com
c31c2eba13 Bug #17722 Test 'partition_02myisam' hangs on Windows
The problem where is that Visual Studio 8 includes new security features to help write more secure code.  One of these features is parameter validation.  Many of the CRT functions, including lseek, assert on illegal parameter values in debug builds.  They also call parameter validation callback routines that can be registered.  We solve this problem by defaulting the error value to -1 and then only calling lseek if the fd != -1.

my_seek.c:
  Only call lseek if the fd is not -1 on Windows
2006-03-15 10:25:42 +01:00
konstantin@mysql.com
f08bbd1f12 assert.h needed for my_dbug.h now is included in my_dbug.h, where it for
some reason wasn't included before.
A lot of files cleaned up from #include <assert.h>
2004-06-10 23:58:39 +04:00
monty@narttu.mysql.fi
13530887cb Fix for UNION and LEFT JOIN (Bug #386)
Fixed wrong logging of Access denied error (Bug #398)
2003-05-13 18:58:26 +03:00
monty@hundin.mysql.fi
b658662ae4 Update copyright
Fixed memory leak on shutdown (Affects the embedded version & MyODBC)
2001-12-06 14:10:51 +02:00
monty@hundin.mysql.fi
ce7a0a0293 Fix not critical MyISAM bug in locking.
Free character sets properly (for embedded).
Add missing mutex in HANDLER CLOSE
2001-11-29 21:46:51 +02:00
monty@bitch.mysql.fi
d0ccff5090 New improved IO_CACHE 2001-11-28 02:55:52 +02:00
monty@hundin.mysql.fi
a2a838f887 Portability fix 2001-11-22 13:15:17 +02:00
monty@donna.mysql.com
40494168ad Fixed test when exeeding file quota on write
Sanity checks when opening MyISAM files
2001-01-15 17:17:43 +02:00
bk@work.mysql.com
f4c589ff6c Import changeset 2000-07-31 21:29:14 +02:00