Commit 7c9ec2d4 authored by unknown's avatar unknown

Merge work:/home/bk/mysql-4.0

into sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.0

parents 7b8f0177 6e5952d0
This diff is collapsed.
......@@ -68,8 +68,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
......
......@@ -67,8 +67,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
......
......@@ -65,8 +65,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_TLS" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /nologo /G6 /MTd /W3 /Zi /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_TLS" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
......@@ -172,18 +171,6 @@ SOURCE=..\libmysql\get_password.c
# End Source File
# Begin Source File
SOURCE=..\mysys\getopt.c
# End Source File
# Begin Source File
SOURCE=..\mysys\getopt1.c
# End Source File
# Begin Source File
SOURCE=..\mysys\getvar.c
# End Source File
# Begin Source File
SOURCE=..\strings\int2str.c
# End Source File
# Begin Source File
......@@ -232,6 +219,19 @@ SOURCE=..\mysys\mf_iocache.c
# End Source File
# Begin Source File
SOURCE=..\mysys\mf_iocache2.c
!IF "$(CFG)" == "mysqlclient - Win32 Release"
!ELSEIF "$(CFG)" == "mysqlclient - Win32 Debug"
# ADD CPP /Od
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\mysys\mf_loadpath.c
# End Source File
# Begin Source File
......@@ -292,6 +292,14 @@ SOURCE=..\mysys\my_fstream.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_gethostbyname.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_getopt.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_getwd.c
# End Source File
# Begin Source File
......@@ -368,6 +376,10 @@ SOURCE=..\mysys\my_thr_init.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_vsnprintf.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_wincond.c
# End Source File
# Begin Source File
......@@ -468,6 +480,10 @@ SOURCE=..\strings\strxmov.c
# End Source File
# Begin Source File
SOURCE=..\strings\strxnmov.c
# End Source File
# Begin Source File
SOURCE=..\mysys\thr_mutex.c
# End Source File
# Begin Source File
......
......@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /GX- /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
......@@ -67,8 +67,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX- /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
......
......@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /GX- /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
......@@ -68,8 +68,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX- /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
......
......@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /GX- /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
......@@ -67,8 +67,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX- /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
......
......@@ -20,6 +20,7 @@ CFG=innobase - Win32 Max
!MESSAGE "innobase - Win32 Max" (based on "Win32 (x86) Static Library")
!MESSAGE "innobase - Win32 Max nt" (based on "Win32 (x86) Static Library")
!MESSAGE "innobase - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "innobase - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
......@@ -98,6 +99,29 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\lib_release\innobase-nt.lib"
# ADD LIB32 /nologo /out:"..\lib_debug\innodb.lib"
!ELSEIF "$(CFG)" == "innobase - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "innobase___Win32_Release"
# PROP BASE Intermediate_Dir "innobase___Win32_Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "innobase___Win32_Release"
# PROP Intermediate_Dir "innobase___Win32_Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G6 /MT /W3 /GX /O2 /I "../innobase/include" /I "../include" /D "NDEBUG" /D "_LIB" /D "_WIN32" /D "WIN32" /D "_MBCS" /D "MYSQL_SERVER" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../innobase/include" /I "../include" /D "NDEBUG" /D "_LIB" /D "_WIN32" /D "WIN32" /D "_MBCS" /D "MYSQL_SERVER" /YX /FD /c
# ADD BASE RSC /l 0x416 /d "NDEBUG"
# ADD RSC /l 0x416 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\lib_release\innodb.lib"
# ADD LIB32 /nologo /out:"..\lib_release\innodb.lib"
!ENDIF
# Begin Target
......@@ -105,6 +129,7 @@ LIB32=link.exe -lib
# Name "innobase - Win32 Max"
# Name "innobase - Win32 Max nt"
# Name "innobase - Win32 Debug"
# Name "innobase - Win32 Release"
# Begin Source File
SOURCE=.\btr\btr0btr.c
......
......@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "." /I "..\include" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /D "USE_TLS" /FD /c
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "." /I "..\include" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /D "USE_TLS" /D "USE_OLD_FUNCTIONS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
......@@ -76,8 +76,7 @@ PostBuild_Cmds=copy release\libmysql.lib ..\lib_release
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "." /I "..\include" /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "." /I "..\include" /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "USE_OLD_FUNCTIONS" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
......@@ -92,7 +91,7 @@ LINK32=link.exe
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Desc=Move DLL export lib
PostBuild_Cmds=copy ..\lib_debug\libmysql.dll C:\winnt\system32 copy debug\libmysql.lib ..\lib_debug
PostBuild_Cmds=copy debug\libmysql.lib ..\lib_debug
# End Special Build Tool
!ENDIF
......@@ -283,6 +282,10 @@ SOURCE=..\mysys\my_fstream.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_gethostbyname.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_getwd.c
# End Source File
# Begin Source File
......@@ -351,6 +354,10 @@ SOURCE=..\mysys\my_thr_init.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_vsnprintf.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_wincond.c
# End Source File
# Begin Source File
......@@ -439,6 +446,10 @@ SOURCE=..\strings\strxmov.c
# End Source File
# Begin Source File
SOURCE=..\strings\strxnmov.c
# End Source File
# Begin Source File
SOURCE=..\mysys\thr_mutex.c
# End Source File
# Begin Source File
......
# Microsoft Developer Studio Project File - Name="test_libmysqld" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=test_libmysqld - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "test_libmysqld.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "test_libmysqld.mak" CFG="test_libmysqld - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "test_libmysqld - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\include" /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "DBUG_OFF" /FR /YX /FD /c
# ADD BASE RSC /l 0x416 /d "NDEBUG"
# ADD RSC /l 0x416 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"LIBCMTD" /out:"Release/mysql-server.exe"
# Begin Target
# Name "test_libmysqld - Win32 Release"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\client\mysql.cpp
# End Source File
# End Group
# Begin Source File
SOURCE=..\..\lib_release\libmysqld.lib
# End Source File
# End Target
# End Project
This diff is collapsed.
......@@ -67,8 +67,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "..\include" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# SUBTRACT CPP /Fr /YX
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "..\include" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
......
/*C4*/
/****************************************************************/
/* Author: Jethro Wright, III TS : 3/ 4/1998 9:15 */
/* Date: 02/18/1998 */
/* mytest.c : do some testing of the libmySQL.DLL.... */
/* */
/* History: */
/* 02/18/1998 jw3 also sprach zarathustra.... */
/****************************************************************/
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <mysql.h>
#define DEFALT_SQL_STMT "SELECT * FROM db"
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
/********************************************************
**
** main :-
**
********************************************************/
int
main( int argc, char * argv[] )
{
char szSQL[ 200 ], aszFlds[ 25 ][ 25 ], szDB[ 50 ] ;
const char *pszT;
int i, j, k, l, x ;
MYSQL * myData ;
MYSQL_RES * res ;
MYSQL_FIELD * fd ;
MYSQL_ROW row ;
//....just curious....
printf( "sizeof( MYSQL ) == %d\n", sizeof( MYSQL ) ) ;
if ( argc == 2 )
{
strcpy( szDB, argv[ 1 ] ) ;
strcpy( szSQL, DEFALT_SQL_STMT ) ;
if (!strcmp(szDB,"--debug"))
{
strcpy( szDB, "mysql" ) ;
printf("Some mysql struct information (size and offset):\n");
printf("net:\t%3d %3d\n",sizeof(myData->net),offsetof(MYSQL,net));
printf("host:\t%3d %3d\n",sizeof(myData->host),offsetof(MYSQL,host));
printf("port:\t%3d %3d\n",sizeof(myData->port),offsetof(MYSQL,port));
printf("protocol_version:\t%3d %3d\n",sizeof(myData->protocol_version),
offsetof(MYSQL,protocol_version));
printf("thread_id:\t%3d %3d\n",sizeof(myData->thread_id),
offsetof(MYSQL,thread_id));
printf("affected_rows:\t%3d %3d\n",sizeof(myData->affected_rows),
offsetof(MYSQL,affected_rows));
printf("packet_length:\t%3d %3d\n",sizeof(myData->packet_length),
offsetof(MYSQL,packet_length));
printf("status:\t%3d %3d\n",sizeof(myData->status),
offsetof(MYSQL,status));
printf("fields:\t%3d %3d\n",sizeof(myData->fields),
offsetof(MYSQL,fields));
printf("field_alloc:\t%3d %3d\n",sizeof(myData->field_alloc),
offsetof(MYSQL,field_alloc));
printf("free_me:\t%3d %3d\n",sizeof(myData->free_me),
offsetof(MYSQL,free_me));
printf("options:\t%3d %3d\n",sizeof(myData->options),
offsetof(MYSQL,options));
puts("");
}
}
else if ( argc > 2 ) {
strcpy( szDB, argv[ 1 ] ) ;
strcpy( szSQL, argv[ 2 ] ) ;
}
else {
strcpy( szDB, "mysql" ) ;
strcpy( szSQL, DEFALT_SQL_STMT ) ;
}
//....
if ( (myData = mysql_init((MYSQL*) 0)) &&
mysql_real_connect( myData, NULL, NULL, NULL, NULL, MYSQL_PORT,
NULL, 0 ) )
{
if ( mysql_select_db( myData, szDB ) < 0 ) {
printf( "Can't select the %s database !\n", szDB ) ;
mysql_close( myData ) ;
return 2 ;
}
}
else {
printf( "Can't connect to the mysql server on port %d !\n",
MYSQL_PORT ) ;
mysql_close( myData ) ;
return 1 ;
}
//....
if ( ! mysql_query( myData, szSQL ) ) {
res = mysql_store_result( myData ) ;
i = (int) mysql_num_rows( res ) ; l = 1 ;
printf( "Query: %s\nNumber of records found: %ld\n", szSQL, i ) ;
//....we can get the field-specific characteristics here....
for ( x = 0 ; fd = mysql_fetch_field( res ) ; x++ )
strcpy( aszFlds[ x ], fd->name ) ;
//....
while ( row = mysql_fetch_row( res ) ) {
j = mysql_num_fields( res ) ;
printf( "Record #%ld:-\n", l++ ) ;
for ( k = 0 ; k < j ; k++ )
printf( " Fld #%d (%s): %s\n", k + 1, aszFlds[ k ],
(((row[k]==NULL)||(!strlen(row[k])))?"NULL":row[k])) ;
puts( "==============================\n" ) ;
}
mysql_free_result( res ) ;
}
else printf( "Couldn't execute %s on the server !\n", szSQL ) ;
//....
puts( "==== Diagnostic info ====" ) ;
pszT = mysql_get_client_info() ;
printf( "Client info: %s\n", pszT ) ;
//....
pszT = mysql_get_host_info( myData ) ;
printf( "Host info: %s\n", pszT ) ;
//....
pszT = mysql_get_server_info( myData ) ;
printf( "Server info: %s\n", pszT ) ;
//....
res = mysql_list_processes( myData ) ; l = 1 ;
if (res)
{
for ( x = 0 ; fd = mysql_fetch_field( res ) ; x++ )
strcpy( aszFlds[ x ], fd->name ) ;
while ( row = mysql_fetch_row( res ) ) {
j = mysql_num_fields( res ) ;
printf( "Process #%ld:-\n", l++ ) ;
for ( k = 0 ; k < j ; k++ )
printf( " Fld #%d (%s): %s\n", k + 1, aszFlds[ k ],
(((row[k]==NULL)||(!strlen(row[k])))?"NULL":row[k])) ;
puts( "==============================\n" ) ;
}
}
else
{
printf("Got error %s when retreiving processlist\n",mysql_error(myData));
}
//....
res = mysql_list_tables( myData, "%" ) ; l = 1 ;
for ( x = 0 ; fd = mysql_fetch_field( res ) ; x++ )
strcpy( aszFlds[ x ], fd->name ) ;
while ( row = mysql_fetch_row( res ) ) {
j = mysql_num_fields( res ) ;
printf( "Table #%ld:-\n", l++ ) ;
for ( k = 0 ; k < j ; k++ )
printf( " Fld #%d (%s): %s\n", k + 1, aszFlds[ k ],
(((row[k]==NULL)||(!strlen(row[k])))?"NULL":row[k])) ;
puts( "==============================\n" ) ;
}
//....
pszT = mysql_stat( myData ) ;
puts( pszT ) ;
//....
mysql_close( myData ) ;
return 0 ;
}
......@@ -92,10 +92,6 @@ SOURCE=.\mrg_create.c
# End Source File
# Begin Source File
SOURCE=.\mrg_def.h
# End Source File
# Begin Source File
SOURCE=.\mrg_delete.c
# End Source File
# Begin Source File
......@@ -134,9 +130,5 @@ SOURCE=.\mrg_static.c
SOURCE=.\mrg_update.c
# End Source File
# Begin Source File
SOURCE=.\mrgdef.h
# End Source File
# End Target
# End Project
......@@ -89,10 +89,6 @@ SOURCE=.\ft_boolean_search.c
# End Source File
# Begin Source File
SOURCE=.\ft_eval.c
# End Source File
# Begin Source File
SOURCE=.\ft_nlq_search.c
# End Source File
# Begin Source File
......@@ -101,10 +97,6 @@ SOURCE=.\ft_parser.c
# End Source File
# Begin Source File
SOURCE=.\ft_search.c
# End Source File
# Begin Source File
SOURCE=.\ft_static.c
# End Source File
# Begin Source File
......
......@@ -117,6 +117,54 @@ Package=<4>
###############################################################################
Project: "libmysqld"=".\libmysqld\libmysqld.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name bdb
End Project Dependency
Begin Project Dependency
Project_Dep_Name dbug
End Project Dependency
Begin Project Dependency
Project_Dep_Name heap
End Project Dependency
Begin Project Dependency
Project_Dep_Name innobase
End Project Dependency
Begin Project Dependency
Project_Dep_Name myisam
End Project Dependency
Begin Project Dependency
Project_Dep_Name myisammrg
End Project Dependency
Begin Project Dependency
Project_Dep_Name mysys
End Project Dependency
Begin Project Dependency
Project_Dep_Name regex
End Project Dependency
Begin Project Dependency
Project_Dep_Name strings
End Project Dependency
Begin Project Dependency
Project_Dep_Name vio
End Project Dependency
Begin Project Dependency
Project_Dep_Name zlib
End Project Dependency
Begin Project Dependency
Project_Dep_Name merge
End Project Dependency
}}}
###############################################################################
Project: "merge"=".\merge\merge.dsp" - Package Owner=<4>
Package=<5>
......@@ -396,6 +444,18 @@ Package=<4>
###############################################################################
Project: "mysqldemb"=".\mysqldemb\mysqldemb.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "mysqldump"=".\client\mysqldump.dsp" - Package Owner=<4>
Package=<5>
......@@ -426,6 +486,54 @@ Package=<4>
###############################################################################
Project: "mysqlserver"=".\mysqlserver\mysqlserver.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name zlib
End Project Dependency
Begin Project Dependency
Project_Dep_Name bdb
End Project Dependency
Begin Project Dependency
Project_Dep_Name dbug
End Project Dependency
Begin Project Dependency
Project_Dep_Name heap
End Project Dependency
Begin Project Dependency
Project_Dep_Name innobase
End Project Dependency
Begin Project Dependency
Project_Dep_Name merge
End Project Dependency
Begin Project Dependency
Project_Dep_Name myisam
End Project Dependency
Begin Project Dependency
Project_Dep_Name myisammrg
End Project Dependency
Begin Project Dependency
Project_Dep_Name mysqldemb
End Project Dependency
Begin Project Dependency
Project_Dep_Name mysys
End Project Dependency
Begin Project Dependency
Project_Dep_Name regex
End Project Dependency
Begin Project Dependency
Project_Dep_Name strings
End Project Dependency
}}}
###############################################################################
Project: "mysqlshow"=".\client\mysqlshow.dsp" - Package Owner=<4>
Package=<5>
......@@ -582,6 +690,24 @@ Package=<4>
###############################################################################
Project: "test_libmysqld"=".\libmysqld\examples\test_libmysqld.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libmysqld
End Project Dependency
Begin Project Dependency
Project_Dep_Name mysqlclient
End Project Dependency
}}}
###############################################################################
Project: "thr_insert_test"=".\thr_insert_test\thr_insert_test.dsp" - Package Owner=<4>
Package=<5>
......
......@@ -67,7 +67,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "MYSQL_SERVER" /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "MYSQL_SERVER" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
......
......@@ -49,7 +49,7 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqlcheck.exe" /libpath:"..\lib_release\\"
!ELSEIF "$(CFG)" == "mysqlcheck - Win32 Debug"
......@@ -65,15 +65,15 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "MYSQL_SERVER" /FD /c
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "MYSQL_SERVER" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlcheck.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
!ENDIF
......
# Microsoft Developer Studio Project File - Name="mysqldemb" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=mysqldemb - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "mysqldemb.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mysqldemb.mak" CFG="mysqldemb - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mysqldemb - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "mysqldemb - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "mysqldemb - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /YX /FD /c
# ADD BASE RSC /l 0x416 /d "NDEBUG"
# ADD RSC /l 0x416 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "mysqldemb - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /Zi /Od /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x416 /d "_DEBUG"
# ADD RSC /l 0x416 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "mysqldemb - Win32 Release"
# Name "mysqldemb - Win32 Debug"
# Begin Source File
SOURCE=..\sql\convert.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\derror.cpp
# End Source File
# Begin Source File
SOURCE=..\libmysql\errmsg.c
# End Source File
# Begin Source File
SOURCE=..\sql\field.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\field_conv.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\filesort.cpp
# End Source File
# Begin Source File
SOURCE=..\libmysql\get_password.c
# End Source File
# Begin Source File
SOURCE=..\sql\ha_berkeley.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\ha_heap.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\ha_innodb.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\ha_isammrg.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\ha_myisam.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\ha_myisammrg.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\handler.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\hash_filo.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\hostname.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\init.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\item.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\item_buff.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\item_cmpfunc.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\item_create.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\item_func.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\item_strfunc.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\item_sum.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\item_timefunc.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\item_uniq.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\key.cpp
# End Source File
# Begin Source File
SOURCE=..\libmysqld\lib_load.cpp
# End Source File
# Begin Source File
SOURCE=..\libmysqld\lib_sql.cpp
# End Source File
# Begin Source File
SOURCE=..\libmysqld\libmysqld.c
# End Source File
# Begin Source File
SOURCE=..\sql\lock.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\log.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\log_event.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\mf_iocache.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\mini_client.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\net_pkg.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\net_serv.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\opt_ft.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\opt_range.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\opt_sum.cpp
# End Source File
# Begin Source File
SOURCE=..\libmysql\password.c
# End Source File
# Begin Source File
SOURCE=..\sql\procedure.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\records.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\repl_failsafe.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\slave.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_acl.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_analyse.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_base.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_cache.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_class.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_crypt.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_db.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_delete.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_do.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_handler.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_insert.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_lex.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_list.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_manager.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_map.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_parse.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_rename.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_repl.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_select.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_show.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_string.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_table.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_test.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_udf.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_union.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_update.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\sql_yacc.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\table.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\thr_malloc.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\time.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\uniques.cpp
# End Source File
# Begin Source File
SOURCE=..\sql\unireg.cpp
# End Source File
# End Target
# End Project
......@@ -71,8 +71,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../include" /D "_DEBUG" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /Fr /YX /Yc /Yu
# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /Zi /Od /I "../include" /D "_DEBUG" /D "_WINDOWS" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /o "NUL" /win32
# SUBTRACT MTL /mktyplib203
......
# Microsoft Developer Studio Project File - Name="mysqlserver" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=mysqlserver - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "mysqlserver.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mysqlserver.mak" CFG="mysqlserver - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mysqlserver - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "mysqlserver - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "mysqlserver - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /YX /FD /c
# ADD BASE RSC /l 0x416 /d "NDEBUG"
# ADD RSC /l 0x416 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "mysqlserver - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /Zi /Od /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x416 /d "_DEBUG"
# ADD RSC /l 0x416 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "mysqlserver - Win32 Release"
# Name "mysqlserver - Win32 Debug"
# End Target
# End Project
/****************************************************************************
MySqlShutdown - shutdown MySQL on system shutdown (Win95/98)
----------------------------------------------------------------------------
Revision History :
Version Author Date Description
001.00 Irena 21-12-99
*****************************************************************************/
#include <windows.h>
//-----------------------------------------------------------------------
// Local data
//-----------------------------------------------------------------------
static char szAppName[] = "MySqlShutdown";
static HINSTANCE hInstance;
#define MYWM_NOTIFYICON (WM_APP+100)
//-----------------------------------------------------------------------
// Exported functions
//-----------------------------------------------------------------------
LRESULT CALLBACK MainWindowProc (HWND, UINT, WPARAM, LPARAM);
//-----------------------------------------------------------------------
// Local functions
//-----------------------------------------------------------------------
static BOOL InitAppClass (HINSTANCE hInstance);
BOOL TrayMessageAdd(HWND hWnd, DWORD dwMessage)
{
BOOL res;
HICON hIcon =LoadIcon (hInstance, "MySql");
char *szTip="MySql Shutdown";
NOTIFYICONDATA tnd;
tnd.cbSize = sizeof(NOTIFYICONDATA);
tnd.hWnd = hWnd;
tnd.uID = 101;
tnd.uFlags = NIF_MESSAGE|NIF_ICON|NIF_TIP;
tnd.uCallbackMessage = MYWM_NOTIFYICON;
tnd.hIcon = hIcon;
strcpy(tnd.szTip, szTip);
res = Shell_NotifyIcon(dwMessage, &tnd);
if (hIcon) DestroyIcon(hIcon);
return res;
}
//-----------------------------------------------------------------------
// Name: WinMain
// Purpose: Main application entry point
//-----------------------------------------------------------------------
int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow)
{ HWND hWnd;
MSG Msg;
hInstance=hInst;
// Register application class if needed
if (InitAppClass (hInstance) == FALSE) return (0);
hWnd = CreateWindow (szAppName, "MySql",
WS_OVERLAPPEDWINDOW|WS_MINIMIZE,
0, 0,
GetSystemMetrics(SM_CXSCREEN)/4,
GetSystemMetrics(SM_CYSCREEN)/4,
0, 0, hInstance, NULL);
if(!hWnd)
{
return (0);
}
ShowWindow (hWnd, SW_HIDE);
UpdateWindow (hWnd);
while (GetMessage (&Msg, 0, 0, 0))
{ TranslateMessage (&Msg);
DispatchMessage (&Msg);
}
return ((int) (Msg.wParam));
}
//-----------------------------------------------------------------------
// Name: InitAppClass
// Purpose: Register the main application window class
//-----------------------------------------------------------------------
static BOOL InitAppClass (HINSTANCE hInstance)
{
WNDCLASS cls;
if (GetClassInfo (hInstance, szAppName, &cls) == 0)
{
cls.style = CS_HREDRAW | CS_VREDRAW ;;
cls.lpfnWndProc = (WNDPROC) MainWindowProc;
cls.cbClsExtra = 0;
cls.cbWndExtra = sizeof(HWND);
cls.hInstance = hInstance;
cls.hIcon = LoadIcon (hInstance, "MySql");
cls.hCursor = LoadCursor (NULL, IDC_ARROW);
cls.hbrBackground = GetStockObject (WHITE_BRUSH) ;
cls.lpszMenuName = 0; //szAppName;
cls.lpszClassName = szAppName;
return RegisterClass (&cls);
}
return (TRUE);
}
//-----------------------------------------------------------------------
// Name: MainWindowProc
// Purpose: Window procedure for main application window.
//-----------------------------------------------------------------------
LRESULT CALLBACK MainWindowProc (HWND hWnd, UINT Msg,WPARAM wParam, LPARAM lParam)
{
static RECT rect ;
HDC hdc ;
PAINTSTRUCT ps ;
static BOOL bShutdown=FALSE;
switch (Msg)
{
case WM_CREATE:
TrayMessageAdd(hWnd, NIM_ADD);
return TRUE;
/***************
case WM_SYSCOMMAND:
if(wParam==SC_CLOSE)
{ HANDLE hEventShutdown;
bShutdown=TRUE;
InvalidateRect(hWnd,NULL,TRUE);
ShowWindow (hWnd, SW_NORMAL);
UpdateWindow(hWnd);
hEventShutdown=OpenEvent(EVENT_MODIFY_STATE, 0, "MySqlShutdown");
if(hEventShutdown)
{
SetEvent(hEventShutdown);
CloseHandle(hEventShutdown);
Sleep(1000);
MessageBox(hWnd,"Shutdown", "MySql", MB_OK);
}
TrayMessageAdd(hWnd, NIM_DELETE);
}
break;
**************/
case WM_DESTROY:
TrayMessageAdd(hWnd, NIM_DELETE);
PostQuitMessage (0);
return 0;
case WM_SIZE:
GetClientRect (hWnd, &rect) ;
return 0 ;
case WM_PAINT:
hdc = BeginPaint (hWnd, &ps) ;
if(bShutdown)
DrawText (hdc, "MySql shutdown in progress...",
-1, &rect, DT_WORDBREAK) ;
EndPaint (hWnd, &ps) ;
return 0 ;
case WM_QUERYENDSESSION: //Shutdown MySql
{ HANDLE hEventShutdown;
bShutdown=TRUE;
InvalidateRect(hWnd,NULL,TRUE);
ShowWindow (hWnd, SW_NORMAL);
UpdateWindow(hWnd);
hEventShutdown=OpenEvent(EVENT_MODIFY_STATE, 0, "MySqlShutdown");
if(hEventShutdown)
{
SetEvent(hEventShutdown);
CloseHandle(hEventShutdown);
Sleep(1000);
MessageBox(hWnd,"Shutdown", "MySql", MB_OK);
}
}
return 1;
case MYWM_NOTIFYICON:
switch (lParam)
{
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
ShowWindow(hWnd, SW_SHOWNORMAL);
SetForegroundWindow(hWnd); // make us come to the front
break;
default:
break;
}
break;
}
return DefWindowProc (hWnd, Msg, wParam, lParam);
}
// ----------------------- The end ------------------------------------------
This diff is collapsed.
......@@ -66,8 +66,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /ZI /Od /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_SYMDIR" /FD /c
# SUBTRACT CPP /Fr
# ADD CPP /nologo /G6 /MTd /W3 /Zi /Od /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_SYMDIR" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
......@@ -142,23 +141,15 @@ SOURCE=.\errors.c
# End Source File
# Begin Source File
SOURCE=.\getopt.c
# End Source File
# Begin Source File
SOURCE=.\getopt1.c
# End Source File
# Begin Source File
SOURCE=.\getvar.c
SOURCE=.\hash.c
# End Source File
# Begin Source File
SOURCE=.\hash.c
SOURCE=.\list.c
# End Source File
# Begin Source File
SOURCE=.\list.c
SOURCE=.\md5.c
# End Source File
# Begin Source File
......@@ -210,10 +201,6 @@ SOURCE=.\mf_pack.c
# End Source File
# Begin Source File
SOURCE=.\mf_pack2.c
# End Source File
# Begin Source File
SOURCE=.\mf_path.c
# End Source File
# Begin Source File
......@@ -242,7 +229,7 @@ SOURCE=.\mf_soundex.c
# End Source File
# Begin Source File
SOURCE=.\mf_stripp.c
SOURCE=.\mf_strip.c
# End Source File
# Begin Source File
......@@ -262,6 +249,10 @@ SOURCE=.\mulalloc.c
# End Source File
# Begin Source File
SOURCE=.\my_aes.c
# End Source File
# Begin Source File
SOURCE=.\my_alarm.c
# End Source File
# Begin Source File
......@@ -322,6 +313,14 @@ SOURCE=.\my_fstream.c
# End Source File
# Begin Source File
SOURCE=.\my_gethostbyname.c
# End Source File
# Begin Source File
SOURCE=.\my_getopt.c
# End Source File
# Begin Source File
SOURCE=.\my_getwd.c
# End Source File
# Begin Source File
......@@ -438,6 +437,10 @@ SOURCE=.\my_wincond.c
# End Source File
# Begin Source File
SOURCE=.\my_winsem.c
# End Source File
# Begin Source File
SOURCE=.\my_winthread.c
# End Source File
# Begin Source File
......@@ -462,10 +465,18 @@ SOURCE=.\raid.cpp
# End Source File
# Begin Source File
SOURCE=.\rijndael.c
# End Source File
# Begin Source File
SOURCE=.\safemalloc.c
# End Source File
# Begin Source File
SOURCE=.\sha1.c
# End Source File
# Begin Source File
SOURCE=.\string.c
# End Source File
# Begin Source File
......
......@@ -66,8 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /I "../isam" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /Fr
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /I "../isam" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
......
......@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /GX- /O2 /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
......@@ -70,7 +70,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX- /ZI /Od /I "../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
......
......@@ -67,8 +67,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD BASE RSC /l 0x40b /d "_DEBUG"
# ADD RSC /l 0x40b /d "_DEBUG"
BSC32=bscmake.exe
......
......@@ -71,8 +71,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /I "../regex" /I "../bdb/build_win32" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /FD /c
# SUBTRACT CPP /Fr /YX
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /I "../regex" /I "../bdb/build_win32" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /FD /c
# ADD BASE RSC /l 0x410 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
......@@ -286,7 +285,7 @@ SOURCE=.\ha_heap.cpp
# End Source File
# Begin Source File
SOURCE=.\ha_innobase.cpp
SOURCE=.\ha_innodb.cpp
# End Source File
# Begin Source File
......@@ -615,10 +614,6 @@ SOURCE=.\log_event.cpp
# End Source File
# Begin Source File
SOURCE=.\md5.c
# End Source File
# Begin Source File
SOURCE=.\mf_iocache.cpp
!IF "$(CFG)" == "mysqld - Win32 Release"
......@@ -927,6 +922,10 @@ SOURCE=.\sql_delete.cpp
# End Source File
# Begin Source File
SOURCE=.\sql_do.cpp
# End Source File
# Begin Source File
SOURCE=.\sql_handler.cpp
# End Source File
# Begin Source File
......
......@@ -67,8 +67,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
......
......@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /GX- /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
......@@ -70,7 +70,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX- /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
......
......@@ -68,8 +68,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /D "__WIN32__" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /Fr /YX
# ADD CPP /nologo /G6 /MTd /W3 /Gm /Zi /Od /I "../include" /D "__WIN32__" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# ADD BASE RSC /l 0x40b /d "_DEBUG"
# ADD RSC /l 0x40b /d "_DEBUG"
BSC32=bscmake.exe
......
......@@ -64,7 +64,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /G6 /MTd /W3 /ZI /Od /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_SYMDIR" /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Zi /Od /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_SYMDIR" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
......
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "db.h"
#include "main.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
Tdbfrm *dbfrm;
//---------------------------------------------------------------------------
__fastcall Tdbfrm::Tdbfrm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall Tdbfrm::SpeedButton2Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall Tdbfrm::SpeedButton1Click(TObject *Sender)
{
if (VerDBName())
{
if (!Form1->CreatingDB())
{
Form1->OutRefresh();
Edit1->Text = "";
Application->MessageBox("The database was created", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
}
}
}
//---------------------------------------------------------------------------
bool __fastcall Tdbfrm::VerDBName()
{
String temp = Edit1->Text;
if (Edit1->Text.IsEmpty())
{
Application->MessageBox("The name of the Database is Empty", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
return false;
}
if (temp.Length() > 64)
{
Application->MessageBox("The name of the Database can't have more than 64 characters ", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
return false;
}
for (int j = 1; j <= temp.Length(); j++)
{
if (temp[j] == ' ')
{
Application->MessageBox("The name of the Database can't have blank spaces ", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
return false;
}
else if (temp[j] == '/')
{
Application->MessageBox("The name of the Database can't have frontslash (/)", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
return false;
}
else if (temp[j] == '\\')
{
Application->MessageBox("The name of the Database can't have backslash (\\)", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
return false;
}
else if (temp[j] == '.')
{
Application->MessageBox("The name of the Database can't have periods", "WinMySQLadmin 1.0", MB_OK |MB_ICONINFORMATION);
return false;
}
}
return true;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef dbH
#define dbH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <Buttons.hpp>
//---------------------------------------------------------------------------
class Tdbfrm : public TForm
{
__published: // IDE-managed Components
TImage *Image1;
TLabel *Label1;
TLabel *Label2;
TEdit *Edit1;
TSpeedButton *SpeedButton1;
TSpeedButton *SpeedButton2;
void __fastcall SpeedButton2Click(TObject *Sender);
void __fastcall SpeedButton1Click(TObject *Sender);
private: // User declarations
bool __fastcall VerDBName();
public: // User declarations
__fastcall Tdbfrm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE Tdbfrm *dbfrm;
//---------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "initsetup.h"
#include "main.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::BitBtn1Click(TObject *Sender)
{
if ((Edit1->Text).IsEmpty() || (Edit2->Text).IsEmpty())
Application->MessageBox("Fill the User name and Password text boxs ", "Winmysqladmin 1.0", MB_OK |MB_ICONINFORMATION);
else
{
if(Form1->ForceConnection())
if(Form1->ForceMySQLInit())
{
Form1->CreateMyIniFile();
Form1->CreatingShortCut();
}
Close();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm2::BitBtn2Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::SpeedButton1Click(TObject *Sender)
{
Application->HelpCommand(HELP_FINDER,0);
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "initsetup.h"
#include "main.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::BitBtn1Click(TObject *Sender)
{
if ((Edit1->Text).IsEmpty() || (Edit2->Text).IsEmpty())
Application->MessageBox("Fill the User name and Password text boxs ", "Winmysqladmin 1.0", MB_OK |MB_ICONINFORMATION);
else
{
Form1->GetServerFile();
Form1->CreateMyIniFile();
Form1->CreatingShortCut();
Close();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm2::BitBtn2Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::SpeedButton1Click(TObject *Sender)
{
Application->HelpCommand(HELP_FINDER,0);
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef initsetupH
#define initsetupH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
//---------------------------------------------------------------------------
class TForm2 : public TForm
{
__published: // IDE-managed Components
TImage *Image1;
TLabel *Label1;
TLabel *Label4;
TPanel *Panel1;
TLabel *Label5;
TLabel *Label6;
TLabel *Label2;
TEdit *Edit1;
TEdit *Edit2;
TBitBtn *BitBtn1;
TSpeedButton *SpeedButton1;
TBitBtn *BitBtn2;
void __fastcall BitBtn1Click(TObject *Sender);
void __fastcall BitBtn2Click(TObject *Sender);
void __fastcall SpeedButton1Click(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm2(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm2 *Form2;
//---------------------------------------------------------------------------
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA */
/*
** Common definition between mysql server & client
*/
#ifndef _mysql_com_h
#define _mysql_com_h
#define NAME_LEN 64 /* Field/table name length */
#define HOSTNAME_LENGTH 60
#define USERNAME_LENGTH 16
#define LOCAL_HOST "localhost"
#define LOCAL_HOST_NAMEDPIPE "."
#if defined(__EMX__) || defined(__OS2__)
#undef MYSQL_UNIX_ADDR
#define MYSQL_OS2_ADDR "\\socket\\MySQL"
#define MYSQL_UNIX_ADDR MYSQL_OS2_ADDR
#endif
#if defined(__WIN__) && !defined( _CUSTOMCONFIG_)
#define MYSQL_NAMEDPIPE "MySQL"
#define MYSQL_SERVICENAME "MySql"
#endif /* __WIN__ */
enum enum_server_command {COM_SLEEP,COM_QUIT,COM_INIT_DB,COM_QUERY,
COM_FIELD_LIST,COM_CREATE_DB,COM_DROP_DB,COM_REFRESH,
COM_SHUTDOWN,COM_STATISTICS,
COM_PROCESS_INFO,COM_CONNECT,COM_PROCESS_KILL,
COM_DEBUG,COM_PING,COM_TIME,COM_DELAYED_INSERT,
COM_CHANGE_USER, COM_BINLOG_DUMP,
COM_TABLE_DUMP};
#define NOT_NULL_FLAG 1 /* Field can't be NULL */
#define PRI_KEY_FLAG 2 /* Field is part of a primary key */
#define UNIQUE_KEY_FLAG 4 /* Field is part of a unique key */
#define MULTIPLE_KEY_FLAG 8 /* Field is part of a key */
#define BLOB_FLAG 16 /* Field is a blob */
#define UNSIGNED_FLAG 32 /* Field is unsigned */
#define ZEROFILL_FLAG 64 /* Field is zerofill */
#define BINARY_FLAG 128
/* The following are only sent to new clients */
#define ENUM_FLAG 256 /* field is an enum */
#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */
#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */
#define SET_FLAG 2048 /* field is a set */
#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
#define GROUP_FLAG 32768 /* Intern: Group field */
#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
#define REFRESH_GRANT 1 /* Refresh grant tables */
#define REFRESH_LOG 2 /* Start on new log file */
#define REFRESH_TABLES 4 /* close all tables */
#define REFRESH_HOSTS 8 /* Flush host cache */
#define REFRESH_STATUS 16 /* Flush status variables */
#define REFRESH_THREADS 32 /* Flush status variables */
#define REFRESH_SLAVE 64 /* Reset master info and restart slave
thread */
#define REFRESH_MASTER 128 /* Remove all bin logs in the index
and truncate the index */
/* The following can't be set with mysql_refresh() */
#define REFRESH_READ_LOCK 16384 /* Lock tables for read */
#define REFRESH_FAST 32768 /* Intern flag */
#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
#define CLIENT_LONG_FLAG 4 /* Get all column flags */
#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */
#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */
#define CLIENT_COMPRESS 32 /* Can use compression protocol */
#define CLIENT_ODBC 64 /* Odbc client */
#define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */
#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */
#define CLIENT_CHANGE_USER 512 /* Support the mysql_change_user() */
#define CLIENT_INTERACTIVE 1024 /* This is an interactive client */
#define CLIENT_SSL 2048 /* Switch to SSL after handshake */
#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
#define CLIENT_TRANSACTIONS 8196 /* Client knows about transactions */
#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
#define MYSQL_ERRMSG_SIZE 200
#define NET_READ_TIMEOUT 30 /* Timeout on read */
#define NET_WRITE_TIMEOUT 60 /* Timeout on write */
#define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */
#ifndef Vio_defined
#define Vio_defined
#ifdef HAVE_VIO
class Vio; /* Fill Vio class in C++ */
#else
struct st_vio; /* Only C */
typedef struct st_vio Vio;
#endif
#endif
typedef struct st_net {
Vio* vio;
my_socket fd; /* For Perl DBI/dbd */
int fcntl;
unsigned char *buff,*buff_end,*write_pos,*read_pos;
char last_error[MYSQL_ERRMSG_SIZE];
unsigned int last_errno,max_packet,timeout,pkt_nr;
unsigned char error;
my_bool return_errno,compress;
my_bool no_send_ok; /* needed if we are doing several
queries in one command ( as in LOAD TABLE ... FROM MASTER ),
and do not want to confuse the client with OK at the wrong time
*/
unsigned long remain_in_buf,length, buf_length, where_b;
unsigned int *return_status;
unsigned char reading_or_writing;
char save_char;
} NET;
#define packet_error ((unsigned int) -1)
enum enum_field_types { FIELD_TYPE_DECIMAL, FIELD_TYPE_TINY,
FIELD_TYPE_SHORT, FIELD_TYPE_LONG,
FIELD_TYPE_FLOAT, FIELD_TYPE_DOUBLE,
FIELD_TYPE_NULL, FIELD_TYPE_TIMESTAMP,
FIELD_TYPE_LONGLONG,FIELD_TYPE_INT24,
FIELD_TYPE_DATE, FIELD_TYPE_TIME,
FIELD_TYPE_DATETIME, FIELD_TYPE_YEAR,
FIELD_TYPE_NEWDATE,
FIELD_TYPE_ENUM=247,
FIELD_TYPE_SET=248,
FIELD_TYPE_TINY_BLOB=249,
FIELD_TYPE_MEDIUM_BLOB=250,
FIELD_TYPE_LONG_BLOB=251,
FIELD_TYPE_BLOB=252,
FIELD_TYPE_VAR_STRING=253,
FIELD_TYPE_STRING=254
};
#define FIELD_TYPE_CHAR FIELD_TYPE_TINY /* For compability */
#define FIELD_TYPE_INTERVAL FIELD_TYPE_ENUM /* For compability */
extern unsigned long max_allowed_packet;
extern unsigned long net_buffer_length;
#define net_new_transaction(net) ((net)->pkt_nr=0)
int my_net_init(NET *net, Vio* vio);
void net_end(NET *net);
void net_clear(NET *net);
int net_flush(NET *net);
int my_net_write(NET *net,const char *packet,unsigned long len);
int net_write_command(NET *net,unsigned char command,const char *packet,
unsigned long len);
int net_real_write(NET *net,const char *packet,unsigned long len);
unsigned int my_net_read(NET *net);
struct rand_struct {
unsigned long seed1,seed2,max_value;
double max_value_dbl;
};
/* The following is for user defined functions */
enum Item_result {STRING_RESULT,REAL_RESULT,INT_RESULT};
typedef struct st_udf_args
{
unsigned int arg_count; /* Number of arguments */
enum Item_result *arg_type; /* Pointer to item_results */
char **args; /* Pointer to argument */
unsigned long *lengths; /* Length of string arguments */
char *maybe_null; /* Set to 1 for all maybe_null args */
} UDF_ARGS;
/* This holds information about the result */
typedef struct st_udf_init
{
my_bool maybe_null; /* 1 if function can return NULL */
unsigned int decimals; /* for real functions */
unsigned int max_length; /* For string functions */
char *ptr; /* free pointer for function data */
my_bool const_item; /* 0 if result is independent of arguments */
} UDF_INIT;
/* Constants when using compression */
#define NET_HEADER_SIZE 4 /* standard header size */
#define COMP_HEADER_SIZE 3 /* compression header extra size */
/* Prototypes to password functions */
#ifdef __cplusplus
extern "C" {
#endif
void randominit(struct rand_struct *,unsigned long seed1,
unsigned long seed2);
double rnd(struct rand_struct *);
void make_scrambled_password(char *to,const char *password);
void get_salt_from_password(unsigned long *res,const char *password);
void make_password_from_salt(char *to, unsigned long *hash_res);
char *scramble(char *to,const char *message,const char *password,
my_bool old_ver);
my_bool check_scramble(const char *, const char *message,
unsigned long *salt,my_bool old_ver);
char *get_tty_password(char *opt_message);
void hash_password(unsigned long *result, const char *password);
#ifdef __cplusplus
}
#endif
/* Some other useful functions */
void my_init(void);
void load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv);
#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
#ifdef __WIN__
#define socket_errno WSAGetLastError()
#else
#define socket_errno errno
#endif
#endif
/* Copyright Abandoned 1996,1999 TCX DataKonsult AB & Monty Program KB & Detron HB
This file is public domain and comes with NO WARRANTY of any kind */
/* Version numbers for protocol & mysqld */
#ifdef _CUSTOMCONFIG_
#include <custom_conf.h>
#else
#define PROTOCOL_VERSION 10
#define MYSQL_SERVER_VERSION "3.23.22-beta"
#define FRM_VER 6
#define MYSQL_VERSION_ID 32322
#define MYSQL_PORT 3306
#define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
/* mysqld compile time options */
#ifndef MYSQL_CHARSET
#define MYSQL_CHARSET "latin1"
#endif
#endif
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
HINSTANCE g_hinst;
USERES("winmysqladmin.res");
USEFORM("main.cpp", Form1);
USEFORM("initsetup.cpp", Form2);
USEFORM("db.cpp", dbfrm);
USELIB("lib\mysqlclient.lib");
USELIB("lib\myisammrg.lib");
USELIB("lib\heap.lib");
USELIB("lib\isam.lib");
USELIB("lib\merge.lib");
USELIB("lib\myisam.lib");
USELIB("lib\mysys.lib");
USELIB("lib\regex.lib");
USELIB("lib\strings.lib");
USELIB("lib\zlib.lib");
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->HelpFile = "C:\\mysql\\bin\\WINMYSQLADMIN.HLP";
Application->Title = "WinMySQLadmin 1.0";
Application->CreateForm(__classid(TForm1), &Form1);
Application->CreateForm(__classid(TForm2), &Form2);
Application->CreateForm(__classid(Tdbfrm), &dbfrm);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
return 0;
}
//---------------------------------------------------------------------------
......@@ -65,8 +65,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /ZI /Od /D "_DEBUG" /D "__WIN32__" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /nologo /G6 /MTd /W3 /Zi /Od /D "_DEBUG" /D "__WIN32__" /D "_WINDOWS" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
......
......@@ -1530,7 +1530,7 @@ AC_SUBST(MAKE_SHELL)
AC_CHECK_HEADERS(varargs.h stdarg.h dirent.h locale.h ndir.h sys/dir.h \
sys/file.h sys/ndir.h sys/ptem.h sys/pte.h sys/select.h sys/stream.h \
sys/mman.h curses.h termcap.h termio.h termbits.h asm/termbits.h grp.h \
paths.h)
paths.h semaphore.h)
# Already-done: strcasecmp
AC_CHECK_FUNCS(lstat putenv select setenv setlocale strcoll tcgetattr)
......
......@@ -24,11 +24,11 @@
#include <malloc.h>
#if defined(__NT__)
#define SYSTEM_TYPE "NT"
#define SYSTEM_TYPE "NT"
#elif defined(__WIN2000__)
#define SYSTEM_TYPE "WIN2000"
#define SYSTEM_TYPE "WIN2000"
#else
#define SYSTEM_TYPE "Win95/Win98"
#define SYSTEM_TYPE "Win95/Win98"
#endif
#if defined(_WIN64) || defined(WIN64)
......@@ -43,23 +43,23 @@
#endif
#endif /* _WIN64 */
#ifndef __WIN__
#define __WIN__ /* To make it easier in VC++ */
#define __WIN__ /* To make it easier in VC++ */
#endif
/* File and lock constants */
#define O_SHARE 0x1000 /* Open file in sharing mode */
#define O_SHARE 0x1000 /* Open file in sharing mode */
#ifdef __BORLANDC__
#define F_RDLCK LK_NBLCK /* read lock */
#define F_WRLCK LK_NBRLCK /* write lock */
#define F_UNLCK LK_UNLCK /* remove lock(s) */
#define F_RDLCK LK_NBLCK /* read lock */
#define F_WRLCK LK_NBRLCK /* write lock */
#define F_UNLCK LK_UNLCK /* remove lock(s) */
#else
#define F_RDLCK _LK_NBLCK /* read lock */
#define F_WRLCK _LK_NBRLCK /* write lock */
#define F_UNLCK _LK_UNLCK /* remove lock(s) */
#define F_RDLCK _LK_NBLCK /* read lock */
#define F_WRLCK _LK_NBRLCK /* write lock */
#define F_UNLCK _LK_UNLCK /* remove lock(s) */
#endif
#define F_EXCLUSIVE 1 /* We have only exclusive locking */
#define F_TO_EOF (INT_MAX32/2) /* size for lock of all file */
#define F_EXCLUSIVE 1 /* We have only exclusive locking */
#define F_TO_EOF (INT_MAX32/2) /* size for lock of all file */
#define F_OK 0 /* parameter to access() */
#define S_IROTH S_IREAD /* for my_lib */
......@@ -70,15 +70,15 @@
#define O_SHORT_LIVED 0
#define SH_DENYNO _SH_DENYNO
#else
#define O_BINARY _O_BINARY /* compability with MSDOS */
#define FILE_BINARY _O_BINARY /* my_fopen in binary mode */
#define O_TEMPORARY _O_TEMPORARY
#define O_SHORT_LIVED _O_SHORT_LIVED
#define SH_DENYNO _SH_DENYNO
#define O_BINARY _O_BINARY /* compability with MSDOS */
#define FILE_BINARY _O_BINARY /* my_fopen in binary mode */
#define O_TEMPORARY _O_TEMPORARY
#define O_SHORT_LIVED _O_SHORT_LIVED
#define SH_DENYNO _SH_DENYNO
#endif
#define NO_OPEN_3 /* For my_create() */
#define SIGQUIT SIGTERM /* No SIGQUIT */
#define SIGQUIT SIGTERM /* No SIGQUIT */
#undef _REENTRANT /* Crashes something for win32 */
#undef SAFE_MUTEX /* Can't be used on windows */
......@@ -89,15 +89,15 @@
/* Type information */
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */
typedef __int64 longlong;
typedef __int64 longlong;
typedef int sigset_t;
#define longlong_defined
/* off_t should not be __int64 because of conflicts in header files;
Use my_off_t or os_off_t instead */
typedef long off_t;
typedef long off_t;
typedef __int64 os_off_t;
#ifdef _WIN64
typedef UINT_PTR rf_SetTimer;
......@@ -109,7 +109,7 @@ typedef uint rf_SetTimer;
#define Socket_defined
#define my_socket SOCKET
#define bool BOOL
#define SIGPIPE SIGINT
#define SIGPIPE SIGINT
#define RETQSORTTYPE void
#define QSORT_TYPE_IS_VOID
#define RETSIGTYPE void
......@@ -118,7 +118,9 @@ typedef uint rf_SetTimer;
#define bool_defined
#define byte_defined
#define HUGE_PTR
#define STDCALL __stdcall /* Used by libmysql.dll */
#define STDCALL __stdcall /* Used by libmysql.dll */
#define isnan(X) _isnan(X)
#define finite(X) _finite(X)
#ifndef UNDEF_THREAD_HACK
#define THREAD
......@@ -201,7 +203,7 @@ inline double ulonglong2double(ulonglong value)
(((uint32) ((uchar) (A)[1])) << 8) +\
(((uint32) ((uchar) (A)[2])) << 16) +\
(((uint32) ((uchar) (A)[3])) << 24)) +\
(((ulonglong) ((uchar) (A)[4])) << 32))
(((ulonglong) ((uchar) (A)[4])) << 32))
#define uint8korr(A) (*((ulonglong *) (A)))
#define sint8korr(A) (*((longlong *) (A)))
#define int2store(T,A) *((uint16*) (T))= (uint16) (A)
......@@ -247,14 +249,15 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_FLOAT_H
#define HAVE_LIMITS_H
#define HAVE_STDDEF_H
#define HAVE_RINT /* defined in this file */
#define NO_FCNTL_NONBLOCK /* No FCNTL */
#define HAVE_RINT /* defined in this file */
#define NO_FCNTL_NONBLOCK /* No FCNTL */
#define HAVE_ALLOCA
#define HAVE_STRPBRK
#define HAVE_STRSTR
#define HAVE_COMPRESS
#define HAVE_CREATESEMAPHORE
#define HAVE_ISNAN
#define HAVE_FINITE
#define HAVE_ISAM /* We want to have support for ISAM in 4.0 */
#ifdef NOT_USED
......@@ -276,8 +279,8 @@ inline double ulonglong2double(ulonglong value)
#ifdef _CUSTOMCONFIG_
#include <custom_conf.h>
#else
#define DEFAULT_MYSQL_HOME "c:\\mysql"
#define PACKAGE "mysql"
#define DEFAULT_MYSQL_HOME "c:\\mysql"
#define PACKAGE "mysql"
#define DEFAULT_BASEDIR "C:\\"
#define SHAREDIR "share"
#define DEFAULT_CHARSET_HOME "C:/mysql/"
......@@ -303,6 +306,6 @@ inline double ulonglong2double(ulonglong value)
pthread_mutex_lock((L)); (V)+=(C); pthread_mutex_unlock((L));
#define thread_safe_sub(V,C,L) \
pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L));
#define statistic_add(V,C,L) (V)+=(C)
#define statistic_add(V,C,L) (V)+=(C)
#endif
#define statistic_increment(V,L) thread_safe_increment((V),(L))
......@@ -33,20 +33,29 @@
C_MODE_START
#ifndef __WIN__
#ifdef HAVE_SEMAPHORE_H
#include <semaphore.h>
#else
#ifdef __WIN__
typedef HANDLE sem_t;
#else
typedef struct {
pthread_mutex_t mutex;
pthread_cond_t cond;
uint count;
} sem_t;
#endif
int sem_init(sem_t * sem, int pshared, unsigned int value);
int sem_destroy(sem_t * sem);
int sem_trywait(sem_t * sem);
int sem_wait(sem_t * sem);
int sem_post(sem_t * sem);
int sem_post_multiple(sem_t * sem,int count);
int sem_getvalue(sem_t * sem, int * sval);
int sem_post_multiple(sem_t * sem, unsigned int count);
int sem_getvalue(sem_t * sem, unsigned int * sval);
#endif /* __WIN__ */
#endif
C_MODE_END
#endif /* !_my_semaphore_h_ */
......@@ -351,6 +351,7 @@ typedef struct st_mi_check_param
char *op_name;
} MI_CHECK;
typedef struct st_sort_info
{
MI_INFO *info;
......@@ -368,6 +369,7 @@ typedef struct st_sort_info
pthread_cond_t cond;
} SORT_INFO;
typedef struct st_mi_sort_param
{
pthread_t thr;
......@@ -391,6 +393,7 @@ typedef struct st_mi_sort_param
void (*lock_in_memory)(MI_CHECK *);
} MI_SORT_PARAM;
/* functions in mi_check */
void myisamchk_init(MI_CHECK *param);
int chk_status(MI_CHECK *param, MI_INFO *info);
......@@ -422,8 +425,6 @@ int movepoint(MI_INFO *info,byte *record,my_off_t oldpos,
int sort_write_record(MI_SORT_PARAM *sort_param);
int write_data_suffix(SORT_INFO *sort_info, my_bool fix_datafile);
int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages, ulong);
void *_thr_find_all_keys(MI_SORT_PARAM *info);
int _thr_write_keys(MI_SORT_PARAM *sort_param);
int test_if_almost_full(MI_INFO *info);
int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename);
void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows);
......
......@@ -2130,6 +2130,7 @@ int mi_repair_by_sort_r(MI_CHECK *param, register MI_INFO *info,
IO_CACHE_SHARE io_share;
SORT_INFO sort_info;
ulonglong key_map=share->state.key_map;
pthread_attr_t thr_attr;
DBUG_ENTER("mi_repair_by_sort_r");
start_records=info->state->records;
......@@ -2307,6 +2308,9 @@ int mi_repair_by_sort_r(MI_CHECK *param, register MI_INFO *info,
pthread_mutex_lock(&sort_info.mutex);
init_io_cache_share(&param->read_cache, &io_share, i);
(void) pthread_attr_init(&thr_attr);
(void) pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED);
for (i=0 ; i < sort_info.total_keys ; i++)
{
sort_param[i].read_cache=param->read_cache;
......@@ -2322,8 +2326,9 @@ int mi_repair_by_sort_r(MI_CHECK *param, register MI_INFO *info,
#else
param->sort_buffer_length*sort_param[i].key_length/total_key_length;
#endif
if (pthread_create(& sort_param[i].thr, 0,
(void *(*)(void*))_thr_find_all_keys, sort_param+i))
if (pthread_create(&sort_param[i].thr, &thr_attr,
thr_find_all_keys,
(void *) (sort_param+i)))
{
mi_check_print_error(param,"Cannot start a repair thread");
remove_io_thread(&param->read_cache);
......@@ -2332,13 +2337,14 @@ int mi_repair_by_sort_r(MI_CHECK *param, register MI_INFO *info,
else
sort_info.threads_running++;
}
(void) pthread_attr_destroy(&thr_attr);
/* waiting for all threads to finish */
while (sort_info.threads_running)
pthread_cond_wait(&sort_info.cond, &sort_info.mutex);
pthread_mutex_unlock(&sort_info.mutex);
if ((got_error= _thr_write_keys(sort_param)))
if ((got_error= thr_write_keys(sort_param)))
{
param->retry_repair=1;
goto err;
......
......@@ -219,7 +219,7 @@ int mi_lock_database(MI_INFO *info, int lock_type)
/****************************************************************************
** The following functions are called by thr_lock() in threaded applications
The following functions are called by thr_lock() in threaded applications
****************************************************************************/
void mi_get_status(void* param)
......
......@@ -99,7 +99,7 @@ int main(int argc, char **argv)
while (--argc >= 0)
{
int new_error=myisamchk(&check_param, *(argv++));
if (check_param.testflag & T_REP_ANY != T_REP)
if ((check_param.testflag & T_REP_ANY) != T_REP)
check_param.testflag&= ~T_REP;
VOID(fflush(stdout));
VOID(fflush(stderr));
......
......@@ -659,6 +659,10 @@ void mi_check_print_error _VARARGS((MI_CHECK *param, const char *fmt,...));
void mi_check_print_warning _VARARGS((MI_CHECK *param, const char *fmt,...));
void mi_check_print_info _VARARGS((MI_CHECK *param, const char *fmt,...));
int flush_pending_blocks(MI_SORT_PARAM *param);
int thr_write_keys(MI_SORT_PARAM *sort_param);
#ifdef THREAD
pthread_handler_decl(thr_find_all_keys,arg);
#endif
#ifdef __cplusplus
}
......
......@@ -277,8 +277,9 @@ static ha_rows NEAR_F find_all_keys(MI_SORT_PARAM *info, uint keys,
/* Search after all keys and place them in a temp. file */
void *_thr_find_all_keys(MI_SORT_PARAM *info)
pthread_handler_decl(thr_find_all_keys,arg)
{
MI_SORT_PARAM *info= (MI_SORT_PARAM*) arg;
int error;
uint memavl,old_memavl,keys,sort_length;
uint idx, maxbuffer;
......@@ -401,10 +402,10 @@ ok:
pthread_cond_signal(&info->sort_info->cond);
pthread_mutex_unlock(&info->sort_info->mutex);
return NULL;
} /* _thr_find_all_keys */
}
int _thr_write_keys(MI_SORT_PARAM *sort_param)
int thr_write_keys(MI_SORT_PARAM *sort_param)
{
SORT_INFO *sort_info=sort_param->sort_info;
MI_CHECK *param=sort_info->param;
......
......@@ -46,7 +46,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c\
my_quick.c my_lockmem.c my_static.c \
my_getopt.c my_mkdir.c \
default.c my_compress.c checksum.c raid.cc \
my_net.c \
my_net.c my_semaphore.c \
my_vsnprintf.c charset.c my_bitmap.c my_bit.c md5.c \
my_gethostbyname.c rijndael.c my_aes.c sha1.c
EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \
......
......@@ -56,7 +56,6 @@ struct hostent *my_gethostbyname_r(const char *name,
struct hostent *result, char *buffer,
int buflen, int *h_errnop)
{
DBUG_ASSERT(buflen >= sizeof(struct hostent_data));
if (gethostbyname_r(name,result,(struct hostent_data *) buffer) == -1)
{
*h_errnop= errno;
......
......@@ -75,7 +75,7 @@ int handle_options(int *argc, char ***argv,
uint opt_found, argvpos= 0, length, i;
my_bool end_of_options= 0, must_be_var, set_maximum_value, special_used,
option_is_loose;
char *progname= *(*argv), **pos, *optend, *prev_found;
char *progname= *(*argv), **pos, **pos_end, *optend, *prev_found;
const struct my_option *optp;
int error;
......@@ -84,7 +84,7 @@ int handle_options(int *argc, char ***argv,
(*argv)++; /* --- || ---- */
init_variables(longopts);
for (pos= *argv; *pos; pos++)
for (pos= *argv, pos_end=pos+ *argc; pos != pos_end ; pos++)
{
char *cur_arg= *pos;
if (cur_arg[0] == '-' && cur_arg[1] && !end_of_options) /* must be opt */
......
This diff is collapsed.
......@@ -375,7 +375,7 @@ sem_post (sem_t * sem)
*/
int
sem_post_multiple (sem_t * sem, int count )
sem_post_multiple (sem_t * sem, unsigned int count)
{
#ifdef EXTRA_DEBUG
if (sem == NULL || *sem == NULL || count <= 0)
......@@ -397,7 +397,7 @@ sem_post_multiple (sem_t * sem, int count )
}
int
sem_getvalue (sem_t *sem, int *sval)
sem_getvalue (sem_t *sem, unsigned int *sval)
{
errno = ENOSYS;
return -1;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment