mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
BUG
replace HAVE_SETFILEPOINTER with __WIN__ include/config-win.h: remove HAVE_SETFILEPOINTER mysys/my_chsize.c: replace HAVE_SETFILEPOINTER with __WIN__ move __WIN__ section to up
This commit is contained in:
@@ -276,7 +276,6 @@ inline double ulonglong2double(ulonglong value)
|
|||||||
#define HAVE_ISAM /* We want to have support for ISAM in 4.0 */
|
#define HAVE_ISAM /* We want to have support for ISAM in 4.0 */
|
||||||
#define HAVE_QUERY_CACHE
|
#define HAVE_QUERY_CACHE
|
||||||
#define SPRINTF_RETURNS_INT
|
#define SPRINTF_RETURNS_INT
|
||||||
#define HAVE_SETFILEPOINTER /* SetFilePointer function for huge files */
|
|
||||||
|
|
||||||
#ifdef NOT_USED
|
#ifdef NOT_USED
|
||||||
#define HAVE_SNPRINTF /* Gave link error */
|
#define HAVE_SNPRINTF /* Gave link error */
|
||||||
|
@@ -49,24 +49,7 @@ int my_chsize(File fd, my_off_t newlength, int filler, myf MyFlags)
|
|||||||
oldsize = my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE));
|
oldsize = my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE));
|
||||||
DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize));
|
DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize));
|
||||||
|
|
||||||
#ifdef HAVE_CHSIZE
|
#ifdef __WIN__
|
||||||
if (oldsize > newlength || filler == 0)
|
|
||||||
{
|
|
||||||
if (chsize(fd,(off_t) newlength))
|
|
||||||
{
|
|
||||||
DBUG_PRINT("error",("errno: %d",errno));
|
|
||||||
my_errno=errno;
|
|
||||||
if (MyFlags & MY_WME)
|
|
||||||
my_error(EE_CANT_CHSIZE,MYF(ME_BELL+ME_WAITTANG),errno);
|
|
||||||
DBUG_RETURN(1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (filler == 0)
|
|
||||||
DBUG_RETURN(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#elif defined(HAVE_SETFILEPOINTER)
|
|
||||||
if (oldsize > newlength)
|
if (oldsize > newlength)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER new_length;
|
LARGE_INTEGER new_length;
|
||||||
@@ -84,6 +67,23 @@ int my_chsize(File fd, my_off_t newlength, int filler, myf MyFlags)
|
|||||||
my_error(EE_CANT_CHSIZE,MYF(ME_BELL+ME_WAITTANG),errno);
|
my_error(EE_CANT_CHSIZE,MYF(ME_BELL+ME_WAITTANG),errno);
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
|
#elif define(HAVE_CHSIZE)
|
||||||
|
if (oldsize > newlength || filler == 0)
|
||||||
|
{
|
||||||
|
if (chsize(fd,(off_t) newlength))
|
||||||
|
{
|
||||||
|
DBUG_PRINT("error",("errno: %d",errno));
|
||||||
|
my_errno=errno;
|
||||||
|
if (MyFlags & MY_WME)
|
||||||
|
my_error(EE_CANT_CHSIZE,MYF(ME_BELL+ME_WAITTANG),errno);
|
||||||
|
DBUG_RETURN(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (filler == 0)
|
||||||
|
DBUG_RETURN(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
#elif defined(HAVE_FTRUNCATE)
|
#elif defined(HAVE_FTRUNCATE)
|
||||||
if (oldsize > newlength)
|
if (oldsize > newlength)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user