Merge with 3.23.58
This commit is contained in:
commit
fa823857d3
94
VC++Files/libmysql/libmysql.def
Executable file
94
VC++Files/libmysql/libmysql.def
Executable file
@ -0,0 +1,94 @@
|
||||
LIBRARY LIBMYSQL
|
||||
DESCRIPTION 'MySQL 3.23 Client Library'
|
||||
VERSION 2.5
|
||||
EXPORTS
|
||||
mysql_affected_rows
|
||||
mysql_close
|
||||
mysql_connect
|
||||
mysql_create_db
|
||||
mysql_data_seek
|
||||
mysql_debug
|
||||
mysql_drop_db
|
||||
mysql_dump_debug_info
|
||||
mysql_eof
|
||||
mysql_errno
|
||||
mysql_error
|
||||
mysql_escape_string
|
||||
mysql_fetch_field
|
||||
mysql_fetch_field_direct
|
||||
mysql_fetch_fields
|
||||
mysql_fetch_lengths
|
||||
mysql_fetch_row
|
||||
mysql_field_count
|
||||
mysql_field_seek
|
||||
mysql_field_tell
|
||||
mysql_free_result
|
||||
mysql_get_client_info
|
||||
mysql_get_host_info
|
||||
mysql_get_proto_info
|
||||
mysql_get_server_info
|
||||
mysql_info
|
||||
mysql_init
|
||||
mysql_insert_id
|
||||
mysql_kill
|
||||
mysql_list_dbs
|
||||
mysql_list_fields
|
||||
mysql_list_processes
|
||||
mysql_list_tables
|
||||
mysql_num_fields
|
||||
mysql_num_rows
|
||||
mysql_odbc_escape_string
|
||||
mysql_options
|
||||
mysql_ping
|
||||
mysql_query
|
||||
mysql_real_connect
|
||||
mysql_real_query
|
||||
mysql_refresh
|
||||
mysql_row_seek
|
||||
mysql_row_tell
|
||||
mysql_select_db
|
||||
mysql_shutdown
|
||||
mysql_stat
|
||||
mysql_store_result
|
||||
mysql_thread_id
|
||||
mysql_use_result
|
||||
bmove_upp
|
||||
delete_dynamic
|
||||
_dig_vec
|
||||
init_dynamic_array
|
||||
insert_dynamic
|
||||
int2str
|
||||
is_prefix
|
||||
list_add
|
||||
list_delete
|
||||
max_allowed_packet
|
||||
my_casecmp
|
||||
my_init
|
||||
my_end
|
||||
my_strdup
|
||||
my_malloc
|
||||
my_memdup
|
||||
my_no_flags_free
|
||||
my_realloc
|
||||
my_thread_end
|
||||
my_thread_init
|
||||
net_buffer_length
|
||||
set_dynamic
|
||||
strcend
|
||||
strdup_root
|
||||
strfill
|
||||
strinstr
|
||||
strmake
|
||||
strmov
|
||||
strxmov
|
||||
myodbc_remove_escape
|
||||
mysql_thread_safe
|
||||
mysql_character_set_name
|
||||
mysql_change_user
|
||||
mysql_send_query
|
||||
mysql_read_query_result
|
||||
mysql_real_escape_string
|
||||
load_defaults
|
||||
free_defaults
|
||||
|
||||
|
BIN
VC++Files/mysqlshutdown/mysql.ico
Normal file
BIN
VC++Files/mysqlshutdown/mysql.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 318 B |
@ -1,198 +1,198 @@
|
||||
/****************************************************************************
|
||||
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 ------------------------------------------
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
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 ------------------------------------------
|
||||
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
MySql ICON DISCARDABLE "MYSQL.ICO"
|
||||
|
||||
MySql ICON DISCARDABLE "MYSQL.ICO"
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,250 +1,250 @@
|
||||
/* Testing of thread creation to find memory allocation bug
|
||||
** This is coded to use as few extern functions as possible!
|
||||
**
|
||||
** The program must be compiled to be multithreaded !
|
||||
**
|
||||
** The problem is that when this program is run it will allocate more and more
|
||||
** memory, so there is a memory leak in the thread handling. The problem is how
|
||||
** to avoid is !
|
||||
**
|
||||
** It looks like the bug is that the std library doesn't free thread
|
||||
** specific variables if one uses a thread variable.
|
||||
** If one compiles this program with -DREMOVE_BUG
|
||||
** there is no memory leaks anymore!
|
||||
**
|
||||
** This program is tested with Microsofts VC++ 5.0, but BC5.2 is also
|
||||
** reported to have this bug.
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_COUNT 100000
|
||||
|
||||
/*****************************************************************************
|
||||
** The following is to emulate the posix thread interface
|
||||
*****************************************************************************/
|
||||
|
||||
typedef HANDLE pthread_t;
|
||||
typedef struct thread_attr {
|
||||
DWORD dwStackSize ;
|
||||
DWORD dwCreatingFlag ;
|
||||
int priority ;
|
||||
} pthread_attr_t ;
|
||||
typedef struct { int dummy; } pthread_condattr_t;
|
||||
typedef struct {
|
||||
unsigned int msg;
|
||||
pthread_t thread;
|
||||
DWORD thread_id;
|
||||
} pthread_cond_t;
|
||||
typedef CRITICAL_SECTION pthread_mutex_t;
|
||||
|
||||
#define pthread_mutex_init(A,B) InitializeCriticalSection(A)
|
||||
#define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
|
||||
#define pthread_mutex_unlock(A) LeaveCriticalSection(A)
|
||||
#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
|
||||
#define pthread_handler_decl(A,B) unsigned __cdecl A(void *B)
|
||||
typedef unsigned (__cdecl *pthread_handler)(void *);
|
||||
#define pthread_self() GetCurrentThread()
|
||||
|
||||
static unsigned int thread_count;
|
||||
static pthread_cond_t COND_thread_count;
|
||||
static pthread_mutex_t LOCK_thread_count;
|
||||
|
||||
pthread_mutex_t THR_LOCK_malloc,THR_LOCK_open,THR_LOCK_keycache,
|
||||
THR_LOCK_lock,THR_LOCK_isam;
|
||||
/*
|
||||
** We have tried to use '_beginthreadex' instead of '_beginthread' here
|
||||
** but in this case the program leaks about 512 characters for each
|
||||
** created thread !
|
||||
*/
|
||||
|
||||
int pthread_create(pthread_t *thread_id, pthread_attr_t *attr,
|
||||
pthread_handler func, void *param)
|
||||
{
|
||||
HANDLE hThread;
|
||||
|
||||
hThread=(HANDLE)_beginthread(func,
|
||||
attr->dwStackSize ? attr->dwStackSize :
|
||||
65535,param);
|
||||
if ((long) hThread == -1L)
|
||||
{
|
||||
return(errno ? errno : -1);
|
||||
}
|
||||
*thread_id=hThread;
|
||||
return(0);
|
||||
}
|
||||
|
||||
void pthread_exit(unsigned A)
|
||||
{
|
||||
_endthread();
|
||||
}
|
||||
|
||||
/*
|
||||
** The following simple implementation of conds works as long as
|
||||
** only one thread uses pthread_cond_wait at a time.
|
||||
** This is coded very carefully to work with thr_lock.
|
||||
*/
|
||||
|
||||
static unsigned int WIN32_WAIT_SIGNAL= 30000; /* Start message to use */
|
||||
|
||||
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
|
||||
{
|
||||
cond->msg=WIN32_WAIT_SIGNAL++;
|
||||
cond->thread=(pthread_t) pthread_self(); /* For global conds */
|
||||
//IRENA
|
||||
cond->thread_id=GetCurrentThreadId();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
|
||||
{
|
||||
MSG msg ;
|
||||
unsigned int msgCode=cond->msg;
|
||||
|
||||
cond->thread=(pthread_t) pthread_self();
|
||||
//IRENA
|
||||
//??? cond->thread_id=GetCurrentThreadId();
|
||||
//VOID(ReleaseMutex(*mutex));
|
||||
|
||||
LeaveCriticalSection(mutex);
|
||||
do
|
||||
{
|
||||
WaitMessage() ;
|
||||
if (!PeekMessage(&msg, NULL, 1, 65534,PM_REMOVE))
|
||||
{
|
||||
return errno=GetLastError() ;
|
||||
}
|
||||
} while (msg.message != msgCode) ;
|
||||
EnterCriticalSection(mutex);
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
|
||||
int pthread_cond_signal(pthread_cond_t *cond)
|
||||
{
|
||||
|
||||
if (!PostThreadMessage(cond->thread_id, cond->msg, 0,0))
|
||||
{
|
||||
return errno=GetLastError() ;
|
||||
}
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
int pthread_attr_init(pthread_attr_t *connect_att)
|
||||
{
|
||||
connect_att->dwStackSize = 0;
|
||||
connect_att->dwCreatingFlag = 0;
|
||||
connect_att->priority = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack)
|
||||
{
|
||||
connect_att->dwStackSize=stack;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pthread_attr_setprio(pthread_attr_t *connect_att,int priority)
|
||||
{
|
||||
connect_att->priority=priority;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pthread_attr_destroy(pthread_attr_t *connect_att)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* from my_pthread.c */
|
||||
|
||||
#ifndef REMOVE_BUG
|
||||
|
||||
__declspec(thread) int THR_KEY_my_errno;
|
||||
|
||||
int _my_errno(void)
|
||||
{
|
||||
return THR_KEY_my_errno;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
** The test program
|
||||
*****************************************************************************/
|
||||
|
||||
pthread_handler_decl(test_thread,arg)
|
||||
{
|
||||
pthread_mutex_lock(&LOCK_thread_count);
|
||||
thread_count--;
|
||||
pthread_cond_signal(&COND_thread_count); /* Tell main we are ready */
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
pthread_exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
pthread_t tid;
|
||||
pthread_attr_t thr_attr;
|
||||
int i,error;
|
||||
|
||||
if ((error=pthread_cond_init(&COND_thread_count,NULL)))
|
||||
{
|
||||
fprintf(stderr,"Got error: %d from pthread_cond_init (errno: %d)",
|
||||
error,errno);
|
||||
exit(1);
|
||||
}
|
||||
pthread_mutex_init(&LOCK_thread_count,NULL);
|
||||
if ((error=pthread_attr_init(&thr_attr)))
|
||||
{
|
||||
fprintf(stderr,"Got error: %d from pthread_attr_init (errno: %d)",
|
||||
error,errno);
|
||||
exit(1);
|
||||
}
|
||||
if ((error=pthread_attr_setstacksize(&thr_attr,65536L)))
|
||||
{
|
||||
fprintf(stderr,"Got error: %d from pthread_attr_setstacksize (errno: %d)",
|
||||
error,errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
printf("Init ok. Creating %d threads\n",TEST_COUNT);
|
||||
for (i=1 ; i <= TEST_COUNT ; i++)
|
||||
{
|
||||
int *param= &i;
|
||||
if ((i % 100) == 0)
|
||||
{
|
||||
printf("%8d",i);
|
||||
fflush(stdout);
|
||||
}
|
||||
if ((error=pthread_mutex_lock(&LOCK_thread_count)))
|
||||
{
|
||||
fprintf(stderr,"\nGot error: %d from pthread_mutex_lock (errno: %d)",
|
||||
error,errno);
|
||||
exit(1);
|
||||
}
|
||||
if ((error=pthread_create(&tid,&thr_attr,test_thread,(void*) param)))
|
||||
{
|
||||
fprintf(stderr,"\nGot error: %d from pthread_create (errno: %d)\n",
|
||||
error,errno);
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
exit(1);
|
||||
}
|
||||
thread_count++;
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
|
||||
if ((error=pthread_mutex_lock(&LOCK_thread_count)))
|
||||
fprintf(stderr,"\nGot error: %d from pthread_mutex_lock\n",error);
|
||||
while (thread_count)
|
||||
{
|
||||
if ((error=pthread_cond_wait(&COND_thread_count,&LOCK_thread_count)))
|
||||
fprintf(stderr,"\nGot error: %d from pthread_cond_wait\n",error);
|
||||
}
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
}
|
||||
pthread_attr_destroy(&thr_attr);
|
||||
printf("\nend\n");
|
||||
return 0;
|
||||
}
|
||||
/* Testing of thread creation to find memory allocation bug
|
||||
** This is coded to use as few extern functions as possible!
|
||||
**
|
||||
** The program must be compiled to be multithreaded !
|
||||
**
|
||||
** The problem is that when this program is run it will allocate more and more
|
||||
** memory, so there is a memory leak in the thread handling. The problem is how
|
||||
** to avoid is !
|
||||
**
|
||||
** It looks like the bug is that the std library doesn't free thread
|
||||
** specific variables if one uses a thread variable.
|
||||
** If one compiles this program with -DREMOVE_BUG
|
||||
** there is no memory leaks anymore!
|
||||
**
|
||||
** This program is tested with Microsofts VC++ 5.0, but BC5.2 is also
|
||||
** reported to have this bug.
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_COUNT 100000
|
||||
|
||||
/*****************************************************************************
|
||||
** The following is to emulate the posix thread interface
|
||||
*****************************************************************************/
|
||||
|
||||
typedef HANDLE pthread_t;
|
||||
typedef struct thread_attr {
|
||||
DWORD dwStackSize ;
|
||||
DWORD dwCreatingFlag ;
|
||||
int priority ;
|
||||
} pthread_attr_t ;
|
||||
typedef struct { int dummy; } pthread_condattr_t;
|
||||
typedef struct {
|
||||
unsigned int msg;
|
||||
pthread_t thread;
|
||||
DWORD thread_id;
|
||||
} pthread_cond_t;
|
||||
typedef CRITICAL_SECTION pthread_mutex_t;
|
||||
|
||||
#define pthread_mutex_init(A,B) InitializeCriticalSection(A)
|
||||
#define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
|
||||
#define pthread_mutex_unlock(A) LeaveCriticalSection(A)
|
||||
#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
|
||||
#define pthread_handler_decl(A,B) unsigned __cdecl A(void *B)
|
||||
typedef unsigned (__cdecl *pthread_handler)(void *);
|
||||
#define pthread_self() GetCurrentThread()
|
||||
|
||||
static unsigned int thread_count;
|
||||
static pthread_cond_t COND_thread_count;
|
||||
static pthread_mutex_t LOCK_thread_count;
|
||||
|
||||
pthread_mutex_t THR_LOCK_malloc,THR_LOCK_open,THR_LOCK_keycache,
|
||||
THR_LOCK_lock,THR_LOCK_isam;
|
||||
/*
|
||||
** We have tried to use '_beginthreadex' instead of '_beginthread' here
|
||||
** but in this case the program leaks about 512 characters for each
|
||||
** created thread !
|
||||
*/
|
||||
|
||||
int pthread_create(pthread_t *thread_id, pthread_attr_t *attr,
|
||||
pthread_handler func, void *param)
|
||||
{
|
||||
HANDLE hThread;
|
||||
|
||||
hThread=(HANDLE)_beginthread(func,
|
||||
attr->dwStackSize ? attr->dwStackSize :
|
||||
65535,param);
|
||||
if ((long) hThread == -1L)
|
||||
{
|
||||
return(errno ? errno : -1);
|
||||
}
|
||||
*thread_id=hThread;
|
||||
return(0);
|
||||
}
|
||||
|
||||
void pthread_exit(unsigned A)
|
||||
{
|
||||
_endthread();
|
||||
}
|
||||
|
||||
/*
|
||||
** The following simple implementation of conds works as long as
|
||||
** only one thread uses pthread_cond_wait at a time.
|
||||
** This is coded very carefully to work with thr_lock.
|
||||
*/
|
||||
|
||||
static unsigned int WIN32_WAIT_SIGNAL= 30000; /* Start message to use */
|
||||
|
||||
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
|
||||
{
|
||||
cond->msg=WIN32_WAIT_SIGNAL++;
|
||||
cond->thread=(pthread_t) pthread_self(); /* For global conds */
|
||||
//IRENA
|
||||
cond->thread_id=GetCurrentThreadId();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
|
||||
{
|
||||
MSG msg ;
|
||||
unsigned int msgCode=cond->msg;
|
||||
|
||||
cond->thread=(pthread_t) pthread_self();
|
||||
//IRENA
|
||||
//??? cond->thread_id=GetCurrentThreadId();
|
||||
//VOID(ReleaseMutex(*mutex));
|
||||
|
||||
LeaveCriticalSection(mutex);
|
||||
do
|
||||
{
|
||||
WaitMessage() ;
|
||||
if (!PeekMessage(&msg, NULL, 1, 65534,PM_REMOVE))
|
||||
{
|
||||
return errno=GetLastError() ;
|
||||
}
|
||||
} while (msg.message != msgCode) ;
|
||||
EnterCriticalSection(mutex);
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
|
||||
int pthread_cond_signal(pthread_cond_t *cond)
|
||||
{
|
||||
|
||||
if (!PostThreadMessage(cond->thread_id, cond->msg, 0,0))
|
||||
{
|
||||
return errno=GetLastError() ;
|
||||
}
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
int pthread_attr_init(pthread_attr_t *connect_att)
|
||||
{
|
||||
connect_att->dwStackSize = 0;
|
||||
connect_att->dwCreatingFlag = 0;
|
||||
connect_att->priority = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack)
|
||||
{
|
||||
connect_att->dwStackSize=stack;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pthread_attr_setprio(pthread_attr_t *connect_att,int priority)
|
||||
{
|
||||
connect_att->priority=priority;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pthread_attr_destroy(pthread_attr_t *connect_att)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* from my_pthread.c */
|
||||
|
||||
#ifndef REMOVE_BUG
|
||||
|
||||
__declspec(thread) int THR_KEY_my_errno;
|
||||
|
||||
int _my_errno(void)
|
||||
{
|
||||
return THR_KEY_my_errno;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
** The test program
|
||||
*****************************************************************************/
|
||||
|
||||
pthread_handler_decl(test_thread,arg)
|
||||
{
|
||||
pthread_mutex_lock(&LOCK_thread_count);
|
||||
thread_count--;
|
||||
pthread_cond_signal(&COND_thread_count); /* Tell main we are ready */
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
pthread_exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
pthread_t tid;
|
||||
pthread_attr_t thr_attr;
|
||||
int i,error;
|
||||
|
||||
if ((error=pthread_cond_init(&COND_thread_count,NULL)))
|
||||
{
|
||||
fprintf(stderr,"Got error: %d from pthread_cond_init (errno: %d)",
|
||||
error,errno);
|
||||
exit(1);
|
||||
}
|
||||
pthread_mutex_init(&LOCK_thread_count,NULL);
|
||||
if ((error=pthread_attr_init(&thr_attr)))
|
||||
{
|
||||
fprintf(stderr,"Got error: %d from pthread_attr_init (errno: %d)",
|
||||
error,errno);
|
||||
exit(1);
|
||||
}
|
||||
if ((error=pthread_attr_setstacksize(&thr_attr,65536L)))
|
||||
{
|
||||
fprintf(stderr,"Got error: %d from pthread_attr_setstacksize (errno: %d)",
|
||||
error,errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
printf("Init ok. Creating %d threads\n",TEST_COUNT);
|
||||
for (i=1 ; i <= TEST_COUNT ; i++)
|
||||
{
|
||||
int *param= &i;
|
||||
if ((i % 100) == 0)
|
||||
{
|
||||
printf("%8d",i);
|
||||
fflush(stdout);
|
||||
}
|
||||
if ((error=pthread_mutex_lock(&LOCK_thread_count)))
|
||||
{
|
||||
fprintf(stderr,"\nGot error: %d from pthread_mutex_lock (errno: %d)",
|
||||
error,errno);
|
||||
exit(1);
|
||||
}
|
||||
if ((error=pthread_create(&tid,&thr_attr,test_thread,(void*) param)))
|
||||
{
|
||||
fprintf(stderr,"\nGot error: %d from pthread_create (errno: %d)\n",
|
||||
error,errno);
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
exit(1);
|
||||
}
|
||||
thread_count++;
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
|
||||
if ((error=pthread_mutex_lock(&LOCK_thread_count)))
|
||||
fprintf(stderr,"\nGot error: %d from pthread_mutex_lock\n",error);
|
||||
while (thread_count)
|
||||
{
|
||||
if ((error=pthread_cond_wait(&COND_thread_count,&LOCK_thread_count)))
|
||||
fprintf(stderr,"\nGot error: %d from pthread_cond_wait\n",error);
|
||||
}
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
}
|
||||
pthread_attr_destroy(&thr_attr);
|
||||
printf("\nend\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -37,12 +37,10 @@ extern int h_errno;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_IN_ADDR_T
|
||||
#define in_addr_t u_long
|
||||
#define in_addr_t ulong
|
||||
#endif
|
||||
|
||||
|
||||
static my_bool silent;
|
||||
|
||||
static struct my_option my_long_options[] =
|
||||
{
|
||||
{"help", '?', "Displays this help and exits.",
|
||||
|
169
mytest-old.c
Normal file
169
mytest-old.c
Normal file
@ -0,0 +1,169 @@
|
||||
/*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 ], * pszT, szDB[ 50 ] ;
|
||||
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 ;
|
||||
|
||||
}
|
@ -17,7 +17,6 @@
|
||||
## Process this file with automake to create Makefile.in
|
||||
|
||||
bin_SCRIPTS = @server_scripts@ \
|
||||
make_win_src_distribution \
|
||||
msql2mysql \
|
||||
mysql_config \
|
||||
mysql_fix_privilege_tables \
|
||||
@ -33,7 +32,8 @@ bin_SCRIPTS = @server_scripts@ \
|
||||
mysqldumpslow \
|
||||
mysql_explain_log \
|
||||
mysql_tableinfo \
|
||||
mysqld_multi
|
||||
mysqld_multi \
|
||||
make_win_src_distribution
|
||||
|
||||
EXTRA_SCRIPTS = make_binary_distribution.sh \
|
||||
make_win_src_distribution.sh \
|
||||
@ -79,7 +79,8 @@ CLEANFILES = @server_scripts@ \
|
||||
mysql_find_rows \
|
||||
mysqlhotcopy \
|
||||
mysqldumpslow \
|
||||
mysqld_multi
|
||||
mysqld_multi \
|
||||
make_win_src_distribution
|
||||
|
||||
SUPERCLEANFILES = mysqlbug
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user