MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:December 17 2009 12:20am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3292)
View as plain text  
#At file:///home/msvensson/mysql/7.0/ based on revid:magnus.blaudd@stripped0ioa580eip

 3292 Magnus Blåudd	2009-12-17
      ndb - remove unused files from portlib/win32

    removed:
      storage/ndb/src/common/portlib/win32/NdbCondition.c
      storage/ndb/src/common/portlib/win32/NdbEnv.c
      storage/ndb/src/common/portlib/win32/NdbHost.c
      storage/ndb/src/common/portlib/win32/NdbMem.c
      storage/ndb/src/common/portlib/win32/NdbMutex.c
      storage/ndb/src/common/portlib/win32/NdbSleep.c
      storage/ndb/src/common/portlib/win32/NdbTCP.c
      storage/ndb/src/common/portlib/win32/NdbThread.c
=== removed file 'storage/ndb/src/common/portlib/win32/NdbCondition.c'
--- a/storage/ndb/src/common/portlib/win32/NdbCondition.c	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/portlib/win32/NdbCondition.c	1970-01-01 00:00:00 +0000
@@ -1,180 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; version 2 of the License.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-*/
-
-
-#include <ndb_global.h>
-#include "NdbCondition.h"
-#include <NdbMutex.h>
-
-struct NdbCondition
-{
-    long nWaiters;
-    NdbMutex* pNdbMutexWaitersLock;
-    HANDLE hSemaphore;
-    HANDLE hEventWaitersDone;
-    int bWasBroadcast;
-};
-
-
-struct NdbCondition* 
-NdbCondition_Create(void)
-{
-    int result = 0;
-    struct NdbCondition* pNdbCondition = (struct NdbCondition*)malloc(sizeof(struct NdbCondition));
-    if(!pNdbCondition)
-        return 0;
-    
-    pNdbCondition->nWaiters = 0;
-    pNdbCondition->bWasBroadcast = 0;
-    if(!(pNdbCondition->hSemaphore = CreateSemaphore(0, 0, MAXLONG, 0)))
-        result = -1;
-    else if(!(pNdbCondition->pNdbMutexWaitersLock = NdbMutex_Create()))
-        result = -1;
-    else if(!(pNdbCondition->hEventWaitersDone = CreateEvent(0, 0, 0, 0)))
-        result = -1;
-
-    assert(!result);

-    return pNdbCondition;
-}
-
-
-int 
-NdbCondition_Wait(struct NdbCondition* p_cond,
-                  NdbMutex* p_mutex)
-{
-    int result;
-    int bLastWaiter;
-    if(!p_cond || !p_mutex)
-        return 1;
-    
-    NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
-    p_cond->nWaiters++;
-    NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
-    
-    if(NdbMutex_Unlock(p_mutex))
-        return -1;
-    result = WaitForSingleObject (p_cond->hSemaphore, INFINITE);
-
-    NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
-    p_cond->nWaiters--;
-    bLastWaiter = (p_cond->bWasBroadcast && p_cond->nWaiters==0);
-    NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
-    
-    if(result==WAIT_OBJECT_0 && bLastWaiter)
-        SetEvent(p_cond->hEventWaitersDone);
-    
-    NdbMutex_Lock(p_mutex);
-    return result;
-}
-
-
-int 
-NdbCondition_WaitTimeout(struct NdbCondition* p_cond,
-                         NdbMutex* p_mutex,
-                         int msecs)
-{
-    int result;
-    int bLastWaiter;
-    if (!p_cond || !p_mutex)
-        return 1;
-    
-    NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
-    p_cond->nWaiters++;
-    NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
-    if(msecs<0)
-        msecs = 0;
-
-    if(NdbMutex_Unlock(p_mutex))
-        return -1;
-    result = WaitForSingleObject(p_cond->hSemaphore, msecs);
-
-    NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
-    p_cond->nWaiters--;
-    bLastWaiter = (p_cond->bWasBroadcast && p_cond->nWaiters==0);
-    NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
-
-    if(result!=WAIT_OBJECT_0)
-        result = -1;
-
-    if(bLastWaiter)
-        SetEvent(p_cond->hEventWaitersDone); 
-
-    NdbMutex_Lock(p_mutex);
-    return result;
-}
-
-
-int 
-NdbCondition_Signal(struct NdbCondition* p_cond)
-{
-    int bHaveWaiters;
-    if(!p_cond)
-        return 1;
-    
-    NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
-    bHaveWaiters = (p_cond->nWaiters > 0);
-    NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
-    
-    if(bHaveWaiters)
-        return (ReleaseSemaphore(p_cond->hSemaphore, 1, 0) ? 0 : -1);
-    else
-        return 0;
-}
-
-
-int NdbCondition_Broadcast(struct NdbCondition* p_cond)
-{
-    int bHaveWaiters;
-    int result = 0;
-    if(!p_cond)
-        return 1;
-    
-    NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
-    bHaveWaiters = 0;
-    if(p_cond->nWaiters > 0)
-    {
-        p_cond->bWasBroadcast = !0;
-        bHaveWaiters = 1;
-    }
-    NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
-    if(bHaveWaiters)
-    {
-        if(!ReleaseSemaphore(p_cond->hSemaphore, p_cond->nWaiters, 0))
-            result = -1;
-        else if(WaitForSingleObject (p_cond->hEventWaitersDone, INFINITE) != WAIT_OBJECT_0)
-            result = -1;
-        p_cond->bWasBroadcast = 0;
-    }
-    return result;
-}
-
-
-int NdbCondition_Destroy(struct NdbCondition* p_cond)
-{
-    int result;
-    if(!p_cond)
-        return 1;
-    
-    CloseHandle(p_cond->hEventWaitersDone);
-    NdbMutex_Destroy(p_cond->pNdbMutexWaitersLock);
-    result = (CloseHandle(p_cond->hSemaphore) ? 0 : -1); 
-
-    free(p_cond);
-    return 0;
-}
-

=== removed file 'storage/ndb/src/common/portlib/win32/NdbEnv.c'
--- a/storage/ndb/src/common/portlib/win32/NdbEnv.c	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/portlib/win32/NdbEnv.c	1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; version 2 of the License.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-*/
-
-#include <ndb_global.h>
-#include "NdbEnv.h"
-
-const char* NdbEnv_GetEnv(const char* name, char * buf, int buflen)
-{
-    char* p = NULL;
-    p = getenv(name);
-    
-    if (p != NULL && buf != NULL){
-        strncpy(buf, p, buflen);
-        buf[buflen-1] = 0;
-    }
-    return p;
-}
-

=== removed file 'storage/ndb/src/common/portlib/win32/NdbHost.c'
--- a/storage/ndb/src/common/portlib/win32/NdbHost.c	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/portlib/win32/NdbHost.c	1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; version 2 of the License.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-*/
-
-
-#include <ndb_global.h>
-#include "NdbHost.h"
-
-
-int NdbHost_GetHostName(char* buf)
-{
-    /* We must initialize TCP/IP if we want to call gethostname */
-    WORD wVersionRequested;
-    WSADATA wsaData;
-    int err; 
-    
-    wVersionRequested = MAKEWORD( 2, 0 ); 
-    err = WSAStartup( wVersionRequested, &wsaData );
-    if ( err != 0 ) {    
-    /**
-    * Tell the user that we couldn't find a usable
-    * WinSock DLL.                               
-        */
-        return -1;
-    }
-    
-    /* Get host name */
-    if(gethostname(buf, MAXHOSTNAMELEN))
-    {
-        return -1;
-    }
-    return 0;
-}
-
-
-int NdbHost_GetProcessId(void)
-{
-    return _getpid();
-}
-

=== removed file 'storage/ndb/src/common/portlib/win32/NdbMem.c'
--- a/storage/ndb/src/common/portlib/win32/NdbMem.c	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/portlib/win32/NdbMem.c	1970-01-01 00:00:00 +0000
@@ -1,285 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; version 2 of the License.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-*/
-
-#include <ndb_global.h>
-#include "NdbMem.h"
-
-#if 0
-struct AWEINFO
-{
-    SIZE_T dwSizeInBytesRequested;
-    ULONG_PTR nNumberOfPagesRequested;
-    ULONG_PTR nNumberOfPagesActual;
-    ULONG_PTR nNumberOfPagesFreed;
-    ULONG_PTR* pnPhysicalMemoryPageArray;
-    void* pRegionReserved;
-};
-
-const size_t cNdbMem_nMaxAWEinfo = 256;
-size_t gNdbMem_nAWEinfo = 0;
-
-struct AWEINFO* gNdbMem_pAWEinfo = 0;
-
-
-void ShowLastError(const char* szContext, const char* szFunction)
-{
-    DWORD dwError = GetLastError();
-    LPVOID lpMsgBuf;
-    FormatMessage( 
-        FORMAT_MESSAGE_ALLOCATE_BUFFER | 
-        FORMAT_MESSAGE_FROM_SYSTEM | 
-        FORMAT_MESSAGE_IGNORE_INSERTS,
-        NULL,
-        dwError,
-        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
-        (LPTSTR)&lpMsgBuf,
-        0,
-        NULL 
-        );
-    printf("%s : %s failed : %lu : %s\n", szContext, szFunction, dwError, (char*)lpMsgBuf);
-    LocalFree(lpMsgBuf);
-}
-
-
-
-void NdbMem_Create()
-{
-    // Address Windowing Extensions
-    struct PRIVINFO
-    {
-        DWORD Count;
-        LUID_AND_ATTRIBUTES Privilege[1];
-    } Info;
-
-    HANDLE hProcess = GetCurrentProcess();
-    HANDLE hToken;
-    if(!OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES, &hToken))
-    {
-        ShowLastError("NdbMem_Create", "OpenProcessToken");
-    }
-    
-    Info.Count = 1;
-    Info.Privilege[0].Attributes = SE_PRIVILEGE_ENABLED;
-    if(!LookupPrivilegeValue(0, SE_LOCK_MEMORY_NAME, &(Info.Privilege[0].Luid)))
-    {
-        ShowLastError("NdbMem_Create", "LookupPrivilegeValue");
-    }
-    
-    if(!AdjustTokenPrivileges(hToken, FALSE, (PTOKEN_PRIVILEGES)&Info, 0, 0, 0))
-    {
-        ShowLastError("NdbMem_Create", "AdjustTokenPrivileges");
-    }
-    
-    if(!CloseHandle(hToken))
-    {
-        ShowLastError("NdbMem_Create", "CloseHandle");
-    }
-    
-    return;
-}
-
-void NdbMem_Destroy()
-{
-    /* Do nothing */
-    return;
-}
-
-void* NdbMem_Allocate(size_t size)
-{
-    // Address Windowing Extensions
-    struct AWEINFO* pAWEinfo;
-    HANDLE hProcess;
-    SYSTEM_INFO sysinfo;
-
-    if(!gNdbMem_pAWEinfo)
-    {
-        gNdbMem_pAWEinfo = VirtualAlloc(0, 
-            sizeof(struct AWEINFO)*cNdbMem_nMaxAWEinfo, 
-            MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);
-    }
-
-    assert(gNdbMem_nAWEinfo < cNdbMem_nMaxAWEinfo);
-    pAWEinfo = gNdbMem_pAWEinfo+gNdbMem_nAWEinfo++;
-
-    hProcess = GetCurrentProcess();
-    GetSystemInfo(&sysinfo);
-    pAWEinfo->nNumberOfPagesRequested = (size+sysinfo.dwPageSize-1)/sysinfo.dwPageSize;
-    pAWEinfo->pnPhysicalMemoryPageArray = VirtualAlloc(0, 
-        sizeof(ULONG_PTR)*pAWEinfo->nNumberOfPagesRequested, 
-        MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);
-    pAWEinfo->nNumberOfPagesActual = pAWEinfo->nNumberOfPagesRequested;
-    if(!AllocateUserPhysicalPages(hProcess, &(pAWEinfo->nNumberOfPagesActual), pAWEinfo->pnPhysicalMemoryPageArray))
-    {
-        ShowLastError("NdbMem_Allocate", "AllocateUserPhysicalPages");
-        return 0;
-    }
-    if(pAWEinfo->nNumberOfPagesRequested != pAWEinfo->nNumberOfPagesActual)
-    {
-        ShowLastError("NdbMem_Allocate", "nNumberOfPagesRequested != nNumberOfPagesActual");
-        return 0;
-    }
-    
-    pAWEinfo->dwSizeInBytesRequested = size;
-    pAWEinfo->pRegionReserved = VirtualAlloc(0, pAWEinfo->dwSizeInBytesRequested, MEM_RESERVE | MEM_PHYSICAL, PAGE_READWRITE);
-    if(!pAWEinfo->pRegionReserved)
-    {
-        ShowLastError("NdbMem_Allocate", "VirtualAlloc");
-        return 0;
-    }
-    
-    if(!MapUserPhysicalPages(pAWEinfo->pRegionReserved, pAWEinfo->nNumberOfPagesActual, pAWEinfo->pnPhysicalMemoryPageArray))
-    {
-        ShowLastError("NdbMem_Allocate", "MapUserPhysicalPages");
-        return 0;
-    }
-
-    /*
-    printf("allocate AWE memory: %lu bytes, %lu pages, address %lx\n", 
-        pAWEinfo->dwSizeInBytesRequested, 
-        pAWEinfo->nNumberOfPagesActual,
-        pAWEinfo->pRegionReserved);
-    */
-    return pAWEinfo->pRegionReserved;
-}
-
-
-void* NdbMem_AllocateAlign(size_t size, size_t alignment)
-{
-    /*
-    return (void*)memalign(alignment, size);
-    TEMP fix
-    */
-    return NdbMem_Allocate(size);
-}
-
-
-void NdbMem_Free(void* ptr)
-{
-    // VirtualFree(ptr, 0, MEM_DECOMMIT|MEM_RELEASE);
-    
-    // Address Windowing Extensions
-    struct AWEINFO* pAWEinfo = 0;
-    size_t i;
-    HANDLE hProcess;
-
-    for(i=0; i<gNdbMem_nAWEinfo; ++i)
-    {
-        if(ptr==gNdbMem_pAWEinfo[i].pRegionReserved)
-        {
-            pAWEinfo = gNdbMem_pAWEinfo+i;
-        }
-    }
-    if(!pAWEinfo)
-    {
-        ShowLastError("NdbMem_Free", "ptr is not AWE memory");
-    }
-
-    hProcess = GetCurrentProcess();
-    if(!MapUserPhysicalPages(ptr, pAWEinfo->nNumberOfPagesActual, 0))
-    {
-        ShowLastError("NdbMem_Free", "MapUserPhysicalPages");
-    }
-    
-    if(!VirtualFree(ptr, 0, MEM_RELEASE))
-    {
-        ShowLastError("NdbMem_Free", "VirtualFree");
-    }
-    
-    pAWEinfo->nNumberOfPagesFreed = pAWEinfo->nNumberOfPagesActual;
-    if(!FreeUserPhysicalPages(hProcess, &(pAWEinfo->nNumberOfPagesFreed), pAWEinfo->pnPhysicalMemoryPageArray))
-    {
-        ShowLastError("NdbMem_Free", "FreeUserPhysicalPages");
-    }
-    
-    VirtualFree(pAWEinfo->pnPhysicalMemoryPageArray, 0, MEM_DECOMMIT|MEM_RELEASE);
-}
-
-
-int NdbMem_MemLockAll()
-{
-    /*
-    HANDLE hProcess = GetCurrentProcess();
-    SIZE_T nMinimumWorkingSetSize;
-    SIZE_T nMaximumWorkingSetSize;
-    GetProcessWorkingSetSize(hProcess, &nMinimumWorkingSetSize, &nMaximumWorkingSetSize);
-    ndbout << "nMinimumWorkingSetSize=" << nMinimumWorkingSetSize << ", nMaximumWorkingSetSize=" << nMaximumWorkingSetSize << endl;
-
-    SetProcessWorkingSetSize(hProcess, 50000000, 100000000);
-  
-    GetProcessWorkingSetSize(hProcess, &nMinimumWorkingSetSize, &nMaximumWorkingSetSize);
-    ndbout << "nMinimumWorkingSetSize=" << nMinimumWorkingSetSize << ", nMaximumWorkingSetSize=" << nMaximumWorkingSetSize << endl;
-    */
-    return -1;
-}
-
-int NdbMem_MemUnlockAll()
-{
-    //VirtualUnlock();
-    return -1;
-}
-
-#endif
-
-void NdbMem_Create()
-{
-  /* Do nothing */
-  return;
-}
-
-void NdbMem_Destroy()
-{
-  /* Do nothing */
-  return;
-}
-
-
-void* NdbMem_Allocate(size_t size)
-{
-  void* mem_allocated;
-  assert(size > 0);
-  mem_allocated= (void*)malloc(size);
-  return mem_allocated;
-}
-
-void* NdbMem_AllocateAlign(size_t size, size_t alignment)
-{
-  (void)alignment; /* remove warning for unused parameter */
-  /*
-    return (void*)memalign(alignment, size);
-    TEMP fix
-  */
-  return (void*)malloc(size);
-}
-
-
-void NdbMem_Free(void* ptr)
-{
-  free(ptr);
-}
-
- 
-int NdbMem_MemLockAll()
-{
-  return 0;
-}
-
-int NdbMem_MemUnlockAll()
-{
-  return 0;
-}
-

=== removed file 'storage/ndb/src/common/portlib/win32/NdbMutex.c'
--- a/storage/ndb/src/common/portlib/win32/NdbMutex.c	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/portlib/win32/NdbMutex.c	1970-01-01 00:00:00 +0000
@@ -1,75 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; version 2 of the License.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-*/
-
-
-#include <ndb_global.h>
-#include "NdbMutex.h"
-
-NdbMutex* NdbMutex_Create(void)
-{
-    NdbMutex* pNdbMutex = (NdbMutex*)malloc(sizeof(NdbMutex));
-    if(!pNdbMutex)
-        return 0;
-    
-    InitializeCriticalSection(pNdbMutex);
-    return pNdbMutex;
-}
-
-
-int NdbMutex_Destroy(NdbMutex* p_mutex)
-{
-    if(!p_mutex)
-        return -1;
-    
-    DeleteCriticalSection(p_mutex);
-    free(p_mutex);
-    return 0;
-}
-
-
-int NdbMutex_Lock(NdbMutex* p_mutex)
-{
-    if(!p_mutex)
-        return -1;
-    
-    EnterCriticalSection (p_mutex);
-    return 0;
-}
-
-
-int NdbMutex_Unlock(NdbMutex* p_mutex)
-{
-    if(!p_mutex)
-        return -1;
-    
-    LeaveCriticalSection(p_mutex);
-    return 0;
-}
-
-
-int NdbMutex_Trylock(NdbMutex* p_mutex)
-{
-    int result = -1;
-    if(p_mutex) 
-    {
-        result = NdbMutex_Lock(p_mutex);
-	//(TryEnterCriticalSection(p_mutex) ? 0 : -1);
-    }
-    return result;
-}
-

=== removed file 'storage/ndb/src/common/portlib/win32/NdbSleep.c'
--- a/storage/ndb/src/common/portlib/win32/NdbSleep.c	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/portlib/win32/NdbSleep.c	1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; version 2 of the License.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-*/
-
-#include <ndb_global.h>
-#include "NdbSleep.h"
-
-int
-NdbSleep_MilliSleep(int milliseconds)
-{
-    Sleep(milliseconds);
-    return 0;
-}
-
-int
-NdbSleep_SecSleep(int seconds)
-{
-    return NdbSleep_MilliSleep(seconds*1000);
-}
-

=== removed file 'storage/ndb/src/common/portlib/win32/NdbTCP.c'
--- a/storage/ndb/src/common/portlib/win32/NdbTCP.c	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/src/common/portlib/win32/NdbTCP.c	1970-01-01 00:00:00 +0000
@@ -1,73 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; version 2 of the License.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-*/
-
-#include <ndb_global.h>
-#include "NdbTCP.h"
-
-int 
-Ndb_getInAddr(struct in_addr * dst, const char *address) 
-{
-    struct hostent * hostPtr;
-
-    /* Try it as aaa.bbb.ccc.ddd. */
-    dst->s_addr = inet_addr(address);
-    if (dst->s_addr != -1) {
-        return 0;
-    }
-
-    hostPtr = gethostbyname(address);
-    if (hostPtr != NULL) {
-        dst->s_addr = ((struct in_addr *) *hostPtr->h_addr_list)->s_addr;
-        return 0;
-    }
-    
-    return -1;
-}
-
-int Ndb_check_socket_hup(NDB_SOCKET_TYPE sock)
-{
-  fd_set readfds, writefds, errorfds;
-  struct timeval tv= {0,0};
-  int s_err;
-  int s_err_size= sizeof(s_err);
-
-  FD_ZERO(&readfds);
-  FD_ZERO(&writefds);
-  FD_ZERO(&errorfds);
-
-  FD_SET(sock, &readfds);
-  FD_SET(sock, &writefds);
-  FD_SET(sock, &errorfds);
-
-  if(select(1, &readfds, &writefds, &errorfds, &tv)==SOCKET_ERROR)
-    return 1;
-
-  if(FD_ISSET(sock,&errorfds))
-    return 1;
-
-  s_err=0;
-  if (my_getsockopt(sock, SOL_SOCKET, SO_ERROR, &s_err, &s_err_size) != 0)
-    return(1);
-
-  if (s_err)
-  {                                             /* getsockopt could succeed */
-    return(1);                                 /* but return an error... */
-  }
-
-  return 0;
-}

=== removed file 'storage/ndb/src/common/portlib/win32/NdbThread.c'
--- a/storage/ndb/src/common/portlib/win32/NdbThread.c	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/portlib/win32/NdbThread.c	1970-01-01 00:00:00 +0000
@@ -1,116 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; version 2 of the License.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-*/
-
-#include <ndb_global.h>
-#include "NdbThread.h"
-#include <process.h>
-
-#define MAX_THREAD_NAME 16
-
-typedef unsigned (WINAPI* NDB_WIN32_THREAD_FUNC)(void*);
-
-
-struct NdbThread 
-{ 
-    HANDLE hThread;
-    unsigned nThreadId;
-    char thread_name[MAX_THREAD_NAME];
-};
-
-
-struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
-                                   NDB_THREAD_ARG *p_thread_arg,
-                                   const NDB_THREAD_STACKSIZE thread_stack_size,
-                                   const char* p_thread_name,
-                                   NDB_THREAD_PRIO thread_prio)
-{
-    struct NdbThread* tmpThread;
-    unsigned initflag;
-    int nPriority = 0;
-
-    if(!p_thread_func)
-        return 0;
-    
-    tmpThread = (struct NdbThread*)malloc(sizeof(struct NdbThread));
-    if(!tmpThread)
-        return 0;
-    
-    strncpy((char*)&tmpThread->thread_name, p_thread_name, MAX_THREAD_NAME);
-    
-    switch(thread_prio)
-    {
-    case NDB_THREAD_PRIO_HIGHEST: nPriority=THREAD_PRIORITY_HIGHEST; break;
-    case NDB_THREAD_PRIO_HIGH: nPriority=THREAD_PRIORITY_ABOVE_NORMAL; break;
-    case NDB_THREAD_PRIO_MEAN: nPriority=THREAD_PRIORITY_NORMAL; break;
-    case NDB_THREAD_PRIO_LOW: nPriority=THREAD_PRIORITY_BELOW_NORMAL; break;
-    case NDB_THREAD_PRIO_LOWEST: nPriority=THREAD_PRIORITY_LOWEST; break;
-    }
-    initflag = (nPriority ? CREATE_SUSPENDED : 0);
-    
-    tmpThread->hThread = (HANDLE)_beginthreadex(0, thread_stack_size,
-        (NDB_WIN32_THREAD_FUNC)p_thread_func, p_thread_arg, 
-        initflag, &tmpThread->nThreadId);
-    
-    if(nPriority && tmpThread->hThread)
-    {
-        SetThreadPriority(tmpThread->hThread, nPriority);
-        ResumeThread (tmpThread->hThread);
-    }
-    
-    assert(tmpThread->hThread);
-    return tmpThread;
-}
-
-
-void NdbThread_Destroy(struct NdbThread** p_thread)
-{
-    CloseHandle((*p_thread)->hThread);
-    (*p_thread)->hThread = 0;
-    free(*p_thread); 
-    *p_thread = 0;
-}
-
-
-int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status)
-{
-    void *local_status = 0;
-    if (status == 0)
-        status = &local_status;
-    
-    if(WaitForSingleObject(p_wait_thread->hThread, INFINITE) == WAIT_OBJECT_0
-        && GetExitCodeThread(p_wait_thread->hThread, (LPDWORD)status))
-    {
-        CloseHandle(p_wait_thread->hThread);
-        p_wait_thread->hThread = 0;
-        return 0;
-    }
-    return -1; 
-}
-
-
-void NdbThread_Exit(int status)
-{
-    _endthreadex((DWORD) status);
-}
-
-
-int NdbThread_SetConcurrencyLevel(int level)
-{
-    return 0;
-}
-

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20091217002009-9x1x2s80jj4wgmpq.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3292)Magnus Blåudd17 Dec