Commit 73165eca authored by unknown's avatar unknown

Merge mleich@bk-internal.mysql.com:/home/bk/mysql-4.1

into three.local.lan:/home/matthias/Arbeit/mysql-4.1/src

parents 3aa1605f b857b6e7
...@@ -945,3 +945,4 @@ libmysqld/ha_example.cc ...@@ -945,3 +945,4 @@ libmysqld/ha_example.cc
libmysqld/ha_tina.cc libmysqld/ha_tina.cc
analyse.test analyse.test
client/mysqladmin.c client/mysqladmin.c
mysql-4.1.8-win-src.zip
...@@ -42,8 +42,8 @@ RSC=rc.exe ...@@ -42,8 +42,8 @@ RSC=rc.exe
# PROP Output_Dir ".\debug" # PROP Output_Dir ".\debug"
# PROP Intermediate_Dir ".\debug" # PROP Intermediate_Dir ".\debug"
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_WINDOWS" /D "USE_TLS" /D "_MBCS" /Fp".\debug/mysqltest.pch" /Fo".\debug/" /Fd".\debug/" /GZ /c /GX # ADD BASE CPP /nologo /MTd /I "../include" /I "../regex" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_WINDOWS" /D "_MBCS" /Fp".\debug/mysqltest.pch" /Fo".\debug/" /Fd".\debug/" /GZ /c /GX
# ADD CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_WINDOWS" /D "USE_TLS" /D "_MBCS" /Fp".\debug/mysqltest.pch" /Fo".\debug/" /Fd".\debug/" /GZ /c /GX # ADD CPP /nologo /MTd /I "../include" /I "../regex" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_WINDOWS" /D "_MBCS" /Fp".\debug/mysqltest.pch" /Fo".\debug/" /Fd".\debug/" /GZ /c /GX
# ADD BASE MTL /nologo /tlb".\debug\mysqltest.tlb" /win32 # ADD BASE MTL /nologo /tlb".\debug\mysqltest.tlb" /win32
# ADD MTL /nologo /tlb".\debug\mysqltest.tlb" /win32 # ADD MTL /nologo /tlb".\debug\mysqltest.tlb" /win32
# ADD BASE RSC /l 1033 /d "_DEBUG" # ADD BASE RSC /l 1033 /d "_DEBUG"
...@@ -52,8 +52,8 @@ BSC32=bscmake.exe ...@@ -52,8 +52,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 mysqlclient.lib wsock32.lib odbc32.lib odbccp32.lib mysys.lib /nologo /out:"..\client_debug\mysqltest.exe" /incremental:no /libpath:"..\lib_debug\" /debug /pdb:".\debug\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\client_debug\mysqltest.exe" /incremental:no /libpath:"..\lib_debug\" /debug /pdb:".\debug\mysqltest.pdb" /pdbtype:sept /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 mysqlclient.lib wsock32.lib odbc32.lib odbccp32.lib mysys.lib /nologo /out:"..\client_debug\mysqltest.exe" /incremental:no /libpath:"..\lib_debug\" /debug /pdb:".\debug\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\client_debug\mysqltest.exe" /incremental:no /libpath:"..\lib_debug\" /debug /pdb:".\debug\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
!ELSEIF "$(CFG)" == "mysqltest - Win32 classic" !ELSEIF "$(CFG)" == "mysqltest - Win32 classic"
...@@ -77,8 +77,8 @@ BSC32=bscmake.exe ...@@ -77,8 +77,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 mysqlclient.lib wsock32.lib odbc32.lib odbccp32.lib /nologo /out:"..\client_classic\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\classic\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib /nologo /out:"..\client_classic\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\classic\mysqltest.pdb" /pdbtype:sept /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 mysqlclient.lib wsock32.lib odbc32.lib odbccp32.lib /nologo /out:"..\client_classic\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\classic\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib /nologo /out:"..\client_classic\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\classic\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
!ELSEIF "$(CFG)" == "mysqltest - Win32 Release" !ELSEIF "$(CFG)" == "mysqltest - Win32 Release"
...@@ -102,8 +102,8 @@ BSC32=bscmake.exe ...@@ -102,8 +102,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 mysqlclient.lib wsock32.lib odbc32.lib odbccp32.lib /nologo /out:"..\client_release\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\release\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib /nologo /out:"..\client_release\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\release\mysqltest.pdb" /pdbtype:sept /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 mysqlclient.lib wsock32.lib odbc32.lib odbccp32.lib /nologo /out:"..\client_release\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\release\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib /nologo /out:"..\client_release\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\release\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
!ENDIF !ENDIF
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Microsoft Developer Studio Generated Build File, Format Version 6.00 # Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT ** # ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101 # TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=mysql_test_run_new - Win32 Debug CFG=mysql_test_run_new - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE This is not a valid makefile. To build this project using NMAKE,
...@@ -17,8 +17,8 @@ CFG=mysql_test_run_new - Win32 Debug ...@@ -17,8 +17,8 @@ CFG=mysql_test_run_new - Win32 Debug
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "mysql_test_run_new - Win32 Debug" (based on "Win32 (x86) Application") !MESSAGE "mysql_test_run_new - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "mysql_test_run_new - Win32 Release" (based on "Win32 (x86) Application") !MESSAGE "mysql_test_run_new - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
...@@ -33,51 +33,51 @@ RSC=rc.exe ...@@ -33,51 +33,51 @@ RSC=rc.exe
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1 # PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug" # PROP BASE Output_Dir ".\Debug"
# PROP BASE Intermediate_Dir "Debug" # PROP BASE Intermediate_Dir ".\Debug"
# PROP BASE Target_Dir "" # PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug" # PROP Output_Dir ".\Debug"
# PROP Intermediate_Dir "Debug" # PROP Intermediate_Dir ".\Debug"
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /Fp".\debug/mysql_test_run.pch" /Fo".\debug/" /Fd".\debug/" /GZ /c /GX # ADD BASE CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /Fp".\Debug/mysql_test_run_new.pch" /Fo".\Debug/" /Fd".\Debug/" /GZ /c /GX
# ADD CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /Fp".\debug/mysql_test_run.pch" /Fo".\debug/" /Fd".\debug/" /GZ /c /GX # ADD CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /Fp".\Debug/mysql_test_run_new.pch" /Fo".\Debug/" /Fd".\Debug/" /GZ /c /GX
# ADD BASE MTL /nologo /win32 # ADD BASE MTL /nologo /tlb".\Debug\mysql_test_run_new.tlb" /win32
# ADD MTL /nologo /win32 # ADD MTL /nologo /tlb".\Debug\mysql_test_run_new.tlb" /win32
# ADD BASE RSC /l 1033 # ADD BASE RSC /l 1033
# ADD RSC /l 1033 # ADD RSC /l 1033
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /debug /pdb:".\debug\mysql_test_run_new.pdb" /pdbtype:sept /map /mapinfo:exports /subsystem:windows # 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 odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:yes /debug /pdb:".\Debug\mysql_test_run_new.pdb" /pdbtype:sept /map:".\Debug\mysql_test_run_new.map" /subsystem:console
# 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 Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /debug /pdb:".\debug\mysql_test_run_new.pdb" /pdbtype:sept /map /mapinfo:exports /subsystem:windows # 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 odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:yes /debug /pdb:".\Debug\mysql_test_run_new.pdb" /pdbtype:sept /map:".\Debug\mysql_test_run_new.map" /subsystem:console
!ELSEIF "$(CFG)" == "mysql_test_run_new - Win32 Release" !ELSEIF "$(CFG)" == "mysql_test_run_new - Win32 Release"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0 # PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release" # PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir "Release" # PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir "" # PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 0 # PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release" # PROP Output_Dir ".\Release"
# PROP Intermediate_Dir "Release" # PROP Intermediate_Dir ".\Release"
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fo".\release/" /Fd".\release/" /c /GX # ADD BASE CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_test_run_new.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
# ADD CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fo".\release/" /Fd".\release/" /c /GX # ADD CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_test_run_new.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
# ADD BASE MTL /nologo /win32 # ADD BASE MTL /nologo /tlb".\Release\mysql_test_run_new.tlb" /win32
# ADD MTL /nologo /win32 # ADD MTL /nologo /tlb".\Release\mysql_test_run_new.tlb" /win32
# ADD BASE RSC /l 1033 # ADD BASE RSC /l 1033
# ADD RSC /l 1033 # ADD RSC /l 1033
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /pdbtype:sept /subsystem:windows # 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 odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:no /pdb:".\Release\mysql_test_run_new.pdb" /pdbtype:sept /subsystem:windows
# 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 Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /pdbtype:sept /subsystem:windows # 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 odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:no /pdb:".\Release\mysql_test_run_new.pdb" /pdbtype:sept /subsystem:windows
!ENDIF !ENDIF
...@@ -87,19 +87,19 @@ LINK32=link.exe ...@@ -87,19 +87,19 @@ LINK32=link.exe
# Name "mysql_test_run_new - Win32 Release" # Name "mysql_test_run_new - Win32 Release"
# Begin Source File # Begin Source File
SOURCE=my_create_tables.c SOURCE=.\my_create_tables.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=my_manage.c SOURCE=.\my_manage.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=my_manage.h SOURCE=.\my_manage.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=mysql_test_run_new.c SOURCE=.\mysql_test_run_new.c
# End Source File # End Source File
# End Target # End Target
# End Project # End Project
......
...@@ -824,11 +824,20 @@ Package=<5> ...@@ -824,11 +824,20 @@ Package=<5>
Package=<4> Package=<4>
{{{ {{{
Begin Project Dependency
Project_Dep_Name libmysql
End Project Dependency
Begin Project Dependency
Project_Dep_Name mysys
End Project Dependency
Begin Project Dependency
Project_Dep_Name regex
End Project Dependency
}}} }}}
############################################################################### ###############################################################################
Project: "mysql_test_run_new"=.\mysql-test\mysql_test_run_new.dsp - Package Owner=<4> Project: "mysql_test_run_new"=".\mysql-test\mysql_test_run_new.dsp" - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
...@@ -836,6 +845,12 @@ Package=<5> ...@@ -836,6 +845,12 @@ Package=<5>
Package=<4> Package=<4>
{{{ {{{
Begin Project Dependency
Project_Dep_Name mysqltest
End Project Dependency
Begin Project Dependency
Project_Dep_Name mysqladmin
End Project Dependency
}}} }}}
############################################################################### ###############################################################################
......
...@@ -227,7 +227,7 @@ typedef struct ...@@ -227,7 +227,7 @@ typedef struct
int alloced; int alloced;
} VAR; } VAR;
#ifdef __NETWARE__ #if defined(__NETWARE__) || defined(__WIN__)
/* /*
Netware doesn't proved environment variable substitution that is done Netware doesn't proved environment variable substitution that is done
by the shell in unix environments. We do this in the following function: by the shell in unix environments. We do this in the following function:
...@@ -4600,6 +4600,9 @@ static char *subst_env_var(const char *str) ...@@ -4600,6 +4600,9 @@ static char *subst_env_var(const char *str)
*/ */
#undef popen /* Remove wrapper */ #undef popen /* Remove wrapper */
#ifdef __WIN__
#define popen _popen /* redefine for windows */
#endif
FILE *my_popen(const char *cmd, const char *mode __attribute__((unused))) FILE *my_popen(const char *cmd, const char *mode __attribute__((unused)))
{ {
......
...@@ -90,3 +90,4 @@ extern const char *client_errors[]; /* Error messages */ ...@@ -90,3 +90,4 @@ extern const char *client_errors[]; /* Error messages */
#define CR_SECURE_AUTH 2049 #define CR_SECURE_AUTH 2049
#define CR_FETCH_CANCELED 2050 #define CR_FETCH_CANCELED 2050
#define CR_NO_DATA 2051 #define CR_NO_DATA 2051
#define CR_NO_STMT_METADATA 2052
...@@ -78,7 +78,9 @@ const char *client_errors[]= ...@@ -78,7 +78,9 @@ const char *client_errors[]=
"Invalid connection handle", "Invalid connection handle",
"Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)", "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
"Row retrieval was canceled by mysql_stmt_close() call", "Row retrieval was canceled by mysql_stmt_close() call",
"Attempt to read column without prior row fetch" "Attempt to read column without prior row fetch",
"Prepared statement contains no metadata",
""
}; };
/* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */ /* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */
...@@ -137,7 +139,9 @@ const char *client_errors[]= ...@@ -137,7 +139,9 @@ const char *client_errors[]=
"Invalid connection handle", "Invalid connection handle",
"Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)", "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
"Row retrieval was canceled by mysql_stmt_close() call", "Row retrieval was canceled by mysql_stmt_close() call",
"Attempt to read column without prior row fetch" "Attempt to read column without prior row fetch",
"Prepared statement contains no metadata",
""
}; };
#else /* ENGLISH */ #else /* ENGLISH */
...@@ -194,7 +198,9 @@ const char *client_errors[]= ...@@ -194,7 +198,9 @@ const char *client_errors[]=
"Invalid connection handle", "Invalid connection handle",
"Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)", "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
"Row retrieval was canceled by mysql_stmt_close() call", "Row retrieval was canceled by mysql_stmt_close() call",
"Attempt to read column without prior row fetch" "Attempt to read column without prior row fetch",
"Prepared statement contains no metadata",
""
}; };
#endif #endif
......
...@@ -2139,12 +2139,12 @@ static void update_stmt_fields(MYSQL_STMT *stmt) ...@@ -2139,12 +2139,12 @@ static void update_stmt_fields(MYSQL_STMT *stmt)
DESCRIPTION DESCRIPTION
This function should be used after mysql_stmt_execute(). This function should be used after mysql_stmt_execute().
You can safely check that prepared statement has a result set by calling You can safely check that prepared statement has a result set by calling
mysql_stmt_num_fields(): if number of fields is not zero, you can call mysql_stmt_field_count(): if number of fields is not zero, you can call
this function to get fields metadata. this function to get fields metadata.
Next steps you may want to make: Next steps you may want to make:
- find out number of columns in result set by calling - find out number of columns in result set by calling
mysql_num_fields(res) (the same value is returned by mysql_num_fields(res) (the same value is returned by
mysql_stmt_num_fields) mysql_stmt_field_count())
- fetch metadata for any column with mysql_fetch_field, - fetch metadata for any column with mysql_fetch_field,
mysql_fetch_field_direct, mysql_fetch_fields, mysql_field_seek. mysql_fetch_field_direct, mysql_fetch_fields, mysql_field_seek.
- free returned MYSQL_RES structure with mysql_free_result. - free returned MYSQL_RES structure with mysql_free_result.
...@@ -3882,11 +3882,10 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind) ...@@ -3882,11 +3882,10 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
if (!bind_count) if (!bind_count)
{ {
if ((int) stmt->state < (int) MYSQL_STMT_PREPARE_DONE) int errorcode= (int) stmt->state < (int) MYSQL_STMT_PREPARE_DONE ?
{ CR_NO_PREPARE_STMT : CR_NO_STMT_METADATA;
set_stmt_error(stmt, CR_NO_PREPARE_STMT, unknown_sqlstate); set_stmt_error(stmt, errorcode, unknown_sqlstate);
} DBUG_RETURN(1);
DBUG_RETURN(0);
} }
/* /*
...@@ -4278,7 +4277,7 @@ static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data) ...@@ -4278,7 +4277,7 @@ static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data)
row+= (stmt->field_count+9)/8; /* skip null bits */ row+= (stmt->field_count+9)/8; /* skip null bits */
bit= 4; /* first 2 bits are reserved */ bit= 4; /* first 2 bits are reserved */
/* Go throw all fields and calculate metadata */ /* Go through all fields and calculate metadata */
for (bind= stmt->bind, end= bind + stmt->field_count, field= stmt->fields ; for (bind= stmt->bind, end= bind + stmt->field_count, field= stmt->fields ;
bind < end ; bind < end ;
bind++, field++) bind++, field++)
......
...@@ -84,7 +84,9 @@ static int NEAR_F write_merge_key_varlen(MI_SORT_PARAM *info, ...@@ -84,7 +84,9 @@ static int NEAR_F write_merge_key_varlen(MI_SORT_PARAM *info,
IO_CACHE *to_file, IO_CACHE *to_file,
char* key, uint sort_length, char* key, uint sort_length,
uint count); uint count);
inline int my_var_write(MI_SORT_PARAM *info,IO_CACHE *to_file, byte *bufs); static inline int
my_var_write(MI_SORT_PARAM *info, IO_CACHE *to_file, byte *bufs);
/* /*
Creates a index of sorted keys Creates a index of sorted keys
...@@ -625,7 +627,8 @@ static int NEAR_F write_keys(MI_SORT_PARAM *info, register uchar **sort_keys, ...@@ -625,7 +627,8 @@ static int NEAR_F write_keys(MI_SORT_PARAM *info, register uchar **sort_keys,
} /* write_keys */ } /* write_keys */
inline int my_var_write(MI_SORT_PARAM *info, IO_CACHE *to_file, byte *bufs) static inline int
my_var_write(MI_SORT_PARAM *info, IO_CACHE *to_file, byte *bufs)
{ {
int err; int err;
uint16 len = _mi_keylength(info->keyinfo, (uchar*) bufs); uint16 len = _mi_keylength(info->keyinfo, (uchar*) bufs);
......
...@@ -39,7 +39,7 @@ CLEANFILES = $(test_SCRIPTS) $(test_DATA) ...@@ -39,7 +39,7 @@ CLEANFILES = $(test_SCRIPTS) $(test_DATA)
INCLUDES = -I$(srcdir)/../include -I../include -I.. INCLUDES = -I$(srcdir)/../include -I../include -I..
EXTRA_PROGRAMS = mysql_test_run_new EXTRA_PROGRAMS = mysql_test_run_new
noinst_HEADERS = my_manage.h noinst_HEADERS = my_manage.h
mysql_test_run_new_SOURCES= mysql_test_run_new.c my_manage.c mysql_test_run_new_SOURCES= mysql_test_run_new.c my_manage.c my_create_tables.c
dist-hook: dist-hook:
......
This diff is collapsed.
...@@ -333,7 +333,6 @@ int spawn(char *path, arg_list_t *al, int join, char *input, ...@@ -333,7 +333,6 @@ int spawn(char *path, arg_list_t *al, int join, char *input,
PROCESS_INFORMATION process_information; PROCESS_INFORMATION process_information;
DWORD exit_code; DWORD exit_code;
char win_args[1024]= ""; char win_args[1024]= "";
char command_line[1024]= "";
/* Skip the first parameter */ /* Skip the first parameter */
for (i= 1; i < al->argc; i++) for (i= 1; i < al->argc; i++)
...@@ -724,7 +723,7 @@ int removef(const char *format, ...) ...@@ -724,7 +723,7 @@ int removef(const char *format, ...)
va_end(ap); va_end(ap);
return remove(path); return remove(path);
#eldef __WIN__ #elif __WIN__
{ {
va_list ap; va_list ap;
char path[FN_REFLEN]; char path[FN_REFLEN];
......
...@@ -52,6 +52,8 @@ int my_vsnprintf_(char *to, size_t n, const char* value, ...); ...@@ -52,6 +52,8 @@ int my_vsnprintf_(char *to, size_t n, const char* value, ...);
#define TRY_MAX 5 #define TRY_MAX 5
#ifdef __WIN__ #ifdef __WIN__
#define PATH_MAX _MAX_PATH
#define NAME_MAX _MAX_FNAME
#define kill(A,B) TerminateProcess((HANDLE)A,0) #define kill(A,B) TerminateProcess((HANDLE)A,0)
#define NOT_NEED_PID 0 #define NOT_NEED_PID 0
#define MASTER_PID 1 #define MASTER_PID 1
...@@ -130,4 +132,6 @@ int removef(const char *, ...); ...@@ -130,4 +132,6 @@ int removef(const char *, ...);
void get_basedir(char *, char *); void get_basedir(char *, char *);
void remove_empty_file(const char *file_name); void remove_empty_file(const char *file_name);
bool create_system_files(const char *mdata,const char *output_file, bool test);
#endif /* _MY_MANAGE */ #endif /* _MY_MANAGE */
...@@ -267,6 +267,8 @@ void install_db(char *datadir) ...@@ -267,6 +267,8 @@ void install_db(char *datadir)
snprintf(output, FN_REFLEN, "%s/install.out", datadir); snprintf(output, FN_REFLEN, "%s/install.out", datadir);
snprintf(error, FN_REFLEN, "%s/install.err", datadir); snprintf(error, FN_REFLEN, "%s/install.err", datadir);
if (create_system_files(datadir,input, TRUE))
die("Unable to create init_db.sql.");
/* args */ /* args */
init_args(&al); init_args(&al);
add_arg(&al, mysqld_file); add_arg(&al, mysqld_file);
...@@ -307,9 +309,6 @@ void mysql_install_db() ...@@ -307,9 +309,6 @@ void mysql_install_db()
/* var directory */ /* var directory */
snprintf(temp, FN_REFLEN, "%s/var", mysql_test_dir); snprintf(temp, FN_REFLEN, "%s/var", mysql_test_dir);
/* clean up old direcotry */
del_tree(temp);
/* create var directory */ /* create var directory */
#ifndef __WIN__ #ifndef __WIN__
mkdir(temp, S_IRWXU); mkdir(temp, S_IRWXU);
...@@ -1435,6 +1434,17 @@ void setup(char *file __attribute__((unused))) ...@@ -1435,6 +1434,17 @@ void setup(char *file __attribute__((unused)))
} }
/*
Compare names of testes for right order
*/
#ifdef __WIN__
int compare( const void *arg1, const void *arg2 )
{
return _stricmp( * ( char** ) arg1, * ( char** ) arg2 );
}
#endif
/****************************************************************************** /******************************************************************************
main() main()
......
...@@ -2115,9 +2115,7 @@ GovernmentForm char(45) NOT NULL default '', ...@@ -2115,9 +2115,7 @@ GovernmentForm char(45) NOT NULL default '',
HeadOfState char(60) default NULL, HeadOfState char(60) default NULL,
Capital int(11) default NULL, Capital int(11) default NULL,
Code2 char(2) NOT NULL default '' Code2 char(2) NOT NULL default ''
) TYPE=MyISAM; ) ENGINE=MyISAM;
Warnings:
Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
INSERT INTO t1 VALUES ('XXX','Xxxxx','Oceania','Xxxxxx',26.00,0,0,0,0,0,'Xxxxx','Xxxxx','Xxxxx',NULL,'XX'); INSERT INTO t1 VALUES ('XXX','Xxxxx','Oceania','Xxxxxx',26.00,0,0,0,0,0,'Xxxxx','Xxxxx','Xxxxx',NULL,'XX');
INSERT INTO t1 VALUES ('ASM','American Samoa','Oceania','Polynesia',199.00,0,68000,75.1,334.00,NULL,'Amerika Samoa','US Territory','George W. Bush',54,'AS'); INSERT INTO t1 VALUES ('ASM','American Samoa','Oceania','Polynesia',199.00,0,68000,75.1,334.00,NULL,'Amerika Samoa','US Territory','George W. Bush',54,'AS');
INSERT INTO t1 VALUES ('ATF','French Southern territories','Antarctica','Antarctica',7780.00,0,0,NULL,0.00,NULL,'Terres australes franaises','Nonmetropolitan Territory of France','Jacques Chirac',NULL,'TF'); INSERT INTO t1 VALUES ('ATF','French Southern territories','Antarctica','Antarctica',7780.00,0,0,NULL,0.00,NULL,'Terres australes franaises','Nonmetropolitan Territory of France','Jacques Chirac',NULL,'TF');
......
...@@ -1731,9 +1731,9 @@ alter table t1 add b set ('Y','N') CHARACTER SET utf8 COLLATE utf8_bin; ...@@ -1731,9 +1731,9 @@ alter table t1 add b set ('Y','N') CHARACTER SET utf8 COLLATE utf8_bin;
alter table t1 add c enum ('Y','N') CHARACTER SET utf8 COLLATE utf8_bin; alter table t1 add c enum ('Y','N') CHARACTER SET utf8 COLLATE utf8_bin;
select * from t1; select * from t1;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
def test t1 t1 a a 254 3 1 Y 384 0 8 def test t1 t1 a a 254 1 1 Y 384 0 8
def test t1 t1 b b 254 9 0 Y 2176 0 8 def test t1 t1 b b 254 3 0 Y 2176 0 8
def test t1 t1 c c 254 3 0 Y 384 0 8 def test t1 t1 c c 254 1 0 Y 384 0 8
a b c a b c
Y NULL NULL Y NULL NULL
drop table t1; drop table t1;
......
...@@ -14,7 +14,7 @@ insert delayed into t1 set a = 4; ...@@ -14,7 +14,7 @@ insert delayed into t1 set a = 4;
insert delayed into t1 set a = 5, tmsp = 19711006010203; insert delayed into t1 set a = 5, tmsp = 19711006010203;
insert delayed into t1 (a, tmsp) values (6, 19711006010203); insert delayed into t1 (a, tmsp) values (6, 19711006010203);
insert delayed into t1 (a, tmsp) values (7, NULL); insert delayed into t1 (a, tmsp) values (7, NULL);
--sleep 1 --sleep 2
insert into t1 set a = 8,tmsp=19711006010203; insert into t1 set a = 8,tmsp=19711006010203;
select * from t1 where tmsp=0; select * from t1 where tmsp=0;
select * from t1 where tmsp=19711006010203; select * from t1 where tmsp=19711006010203;
......
...@@ -1378,7 +1378,7 @@ CREATE TABLE t1 ( ...@@ -1378,7 +1378,7 @@ CREATE TABLE t1 (
HeadOfState char(60) default NULL, HeadOfState char(60) default NULL,
Capital int(11) default NULL, Capital int(11) default NULL,
Code2 char(2) NOT NULL default '' Code2 char(2) NOT NULL default ''
) TYPE=MyISAM; ) ENGINE=MyISAM;
INSERT INTO t1 VALUES ('XXX','Xxxxx','Oceania','Xxxxxx',26.00,0,0,0,0,0,'Xxxxx','Xxxxx','Xxxxx',NULL,'XX'); INSERT INTO t1 VALUES ('XXX','Xxxxx','Oceania','Xxxxxx',26.00,0,0,0,0,0,'Xxxxx','Xxxxx','Xxxxx',NULL,'XX');
INSERT INTO t1 VALUES ('ASM','American Samoa','Oceania','Polynesia',199.00,0,68000,75.1,334.00,NULL,'Amerika Samoa','US Territory','George W. Bush',54,'AS'); INSERT INTO t1 VALUES ('ASM','American Samoa','Oceania','Polynesia',199.00,0,68000,75.1,334.00,NULL,'Amerika Samoa','US Territory','George W. Bush',54,'AS');
INSERT INTO t1 VALUES ('ATF','French Southern territories','Antarctica','Antarctica',7780.00,0,0,NULL,0.00,NULL,'Terres australes franaises','Nonmetropolitan Territory of France','Jacques Chirac',NULL,'TF'); INSERT INTO t1 VALUES ('ATF','French Southern territories','Antarctica','Antarctica',7780.00,0,0,NULL,0.00,NULL,'Terres australes franaises','Nonmetropolitan Territory of France','Jacques Chirac',NULL,'TF');
......
...@@ -146,7 +146,7 @@ void hash_reset(HASH *hash) ...@@ -146,7 +146,7 @@ void hash_reset(HASH *hash)
handle inline functions that are not defined as native types handle inline functions that are not defined as native types
*/ */
inline char* static inline char*
hash_key(HASH *hash,const byte *record,uint *length,my_bool first) hash_key(HASH *hash,const byte *record,uint *length,my_bool first)
{ {
if (hash->get_key) if (hash->get_key)
......
...@@ -189,7 +189,10 @@ copy_dir_files() ...@@ -189,7 +189,10 @@ copy_dir_files()
mkdir $BASE/$arg mkdir $BASE/$arg
fi fi
for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def \ for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def \
README INSTALL* LICENSE README INSTALL* LICENSE *.inc *.test *.result \
*.pem Moscow_leap des_key_file *.dat *.000001 \
*.require *.opt
do do
if [ -f $i ] if [ -f $i ]
then then
...@@ -247,7 +250,7 @@ done ...@@ -247,7 +250,7 @@ done
# Input directories to be copied recursively # Input directories to be copied recursively
# #
for i in bdb innobase for i in bdb innobase mysql-test
do do
copy_dir_dirs $i copy_dir_dirs $i
done done
......
...@@ -765,7 +765,7 @@ class Item_empty_string :public Item_string ...@@ -765,7 +765,7 @@ class Item_empty_string :public Item_string
public: public:
Item_empty_string(const char *header,uint length, CHARSET_INFO *cs= NULL) : Item_empty_string(const char *header,uint length, CHARSET_INFO *cs= NULL) :
Item_string("",0, cs ? cs : &my_charset_bin) Item_string("",0, cs ? cs : &my_charset_bin)
{ name=(char*) header; max_length=length;} { name=(char*) header; max_length= cs ? length * cs->mbmaxlen : length; }
void make_field(Send_field *field); void make_field(Send_field *field);
}; };
...@@ -983,9 +983,9 @@ class Item_null_helper :public Item_ref_null_helper ...@@ -983,9 +983,9 @@ class Item_null_helper :public Item_ref_null_helper
public: public:
Item_null_helper(Item_in_subselect* master, Item *item, Item_null_helper(Item_in_subselect* master, Item *item,
const char *table_name_par, const char *field_name_par) const char *table_name_par, const char *field_name_par)
:Item_ref_null_helper(master, &store, table_name_par, field_name_par), :Item_ref_null_helper(master, &item, table_name_par, field_name_par),
store(item) store(item)
{} { ref= &store; }
void print(String *str); void print(String *str);
}; };
......
...@@ -549,10 +549,18 @@ bool Protocol::send_fields(List<Item> *list, uint flag) ...@@ -549,10 +549,18 @@ bool Protocol::send_fields(List<Item> *list, uint flag)
pos= (char*) local_packet->ptr()+local_packet->length(); pos= (char*) local_packet->ptr()+local_packet->length();
*pos++= 12; // Length of packed fields *pos++= 12; // Length of packed fields
if (item->collation.collation == &my_charset_bin || thd_charset == NULL) if (item->collation.collation == &my_charset_bin || thd_charset == NULL)
{
/* No conversion */
int2store(pos, field.charsetnr); int2store(pos, field.charsetnr);
int4store(pos+2, field.length);
}
else else
{
/* With conversion */
int2store(pos, thd_charset->number); int2store(pos, thd_charset->number);
int4store(pos+2, field.length); uint char_len= field.length / item->collation.collation->mbmaxlen;
int4store(pos+2, char_len * thd_charset->mbmaxlen);
}
pos[6]= field.type; pos[6]= field.type;
int2store(pos+7,field.flags); int2store(pos+7,field.flags);
pos[9]= (char) field.decimals; pos[9]= (char) field.decimals;
......
...@@ -1101,7 +1101,8 @@ static void test_prepare_simple() ...@@ -1101,7 +1101,8 @@ static void test_prepare_simple()
mysql_stmt_close(stmt); mysql_stmt_close(stmt);
/* update */ /* update */
strmov(query, "UPDATE test_prepare_simple SET id=? WHERE id=? AND name= ?"); strmov(query, "UPDATE test_prepare_simple SET id=? "
"WHERE id=? AND CONVERT(name USING utf8)= ?");
stmt= mysql_simple_prepare(mysql, query); stmt= mysql_simple_prepare(mysql, query);
check_stmt(stmt); check_stmt(stmt);
...@@ -1129,7 +1130,8 @@ static void test_prepare_simple() ...@@ -1129,7 +1130,8 @@ static void test_prepare_simple()
mysql_stmt_close(stmt); mysql_stmt_close(stmt);
/* select */ /* select */
strmov(query, "SELECT * FROM test_prepare_simple WHERE id=? AND name= ?"); strmov(query, "SELECT * FROM test_prepare_simple WHERE id=? "
"AND CONVERT(name USING utf8)= ?");
stmt= mysql_simple_prepare(mysql, query); stmt= mysql_simple_prepare(mysql, query);
check_stmt(stmt); check_stmt(stmt);
...@@ -1158,7 +1160,7 @@ static void test_prepare_field_result() ...@@ -1158,7 +1160,7 @@ static void test_prepare_field_result()
rc= mysql_query(mysql, "CREATE TABLE test_prepare_field_result(int_c int, " rc= mysql_query(mysql, "CREATE TABLE test_prepare_field_result(int_c int, "
"var_c varchar(50), ts_c timestamp(14), " "var_c varchar(50), ts_c timestamp(14), "
"char_c char(3), date_c date, extra tinyint)"); "char_c char(4), date_c date, extra tinyint)");
myquery(rc); myquery(rc);
/* insert */ /* insert */
...@@ -1184,8 +1186,8 @@ static void test_prepare_field_result() ...@@ -1184,8 +1186,8 @@ static void test_prepare_field_result()
"t1", "test_prepare_field_result", current_db, 10, 0); "t1", "test_prepare_field_result", current_db, 10, 0);
verify_prepare_field(result, 3, "ts_c", "ts_c", MYSQL_TYPE_TIMESTAMP, verify_prepare_field(result, 3, "ts_c", "ts_c", MYSQL_TYPE_TIMESTAMP,
"t1", "test_prepare_field_result", current_db, 19, 0); "t1", "test_prepare_field_result", current_db, 19, 0);
verify_prepare_field(result, 4, "char_c", "char_c", MYSQL_TYPE_STRING, verify_prepare_field(result, 4, "char_c", "char_c", MYSQL_TYPE_VAR_STRING,
"t1", "test_prepare_field_result", current_db, 3, 0); "t1", "test_prepare_field_result", current_db, 4, 0);
verify_field_count(result, 5); verify_field_count(result, 5);
mysql_free_result(result); mysql_free_result(result);
...@@ -1921,7 +1923,8 @@ static void test_select() ...@@ -1921,7 +1923,8 @@ static void test_select()
rc= mysql_commit(mysql); rc= mysql_commit(mysql);
myquery(rc); myquery(rc);
strmov(query, "SELECT * FROM test_select WHERE id= ? AND name=?"); strmov(query, "SELECT * FROM test_select WHERE id= ? "
"AND CONVERT(name USING utf8) =?");
stmt= mysql_simple_prepare(mysql, query); stmt= mysql_simple_prepare(mysql, query);
check_stmt(stmt); check_stmt(stmt);
...@@ -1981,7 +1984,8 @@ static void test_ps_conj_select() ...@@ -1981,7 +1984,8 @@ static void test_ps_conj_select()
"(2, 'hh', 'hh'), (1, 'ii', 'ii'), (2, 'ii', 'ii')"); "(2, 'hh', 'hh'), (1, 'ii', 'ii'), (2, 'ii', 'ii')");
myquery(rc); myquery(rc);
strmov(query, "select id1, value1 from t1 where id1= ? or value1= ?"); strmov(query, "select id1, value1 from t1 where id1= ? or "
"CONVERT(value1 USING utf8)= ?");
stmt= mysql_simple_prepare(mysql, query); stmt= mysql_simple_prepare(mysql, query);
check_stmt(stmt); check_stmt(stmt);
...@@ -2060,7 +2064,8 @@ session_id char(9) NOT NULL, \ ...@@ -2060,7 +2064,8 @@ session_id char(9) NOT NULL, \
"(\"abx\", 1, 2, 3, 2003-08-30)"); "(\"abx\", 1, 2, 3, 2003-08-30)");
myquery(rc); myquery(rc);
strmov(query, "SELECT * FROM test_select WHERE session_id= ?"); strmov(query, "SELECT * FROM test_select WHERE "
"CONVERT(session_id USING utf8)= ?");
stmt= mysql_simple_prepare(mysql, query); stmt= mysql_simple_prepare(mysql, query);
check_stmt(stmt); check_stmt(stmt);
...@@ -2898,7 +2903,8 @@ static void test_simple_delete() ...@@ -2898,7 +2903,8 @@ static void test_simple_delete()
myquery(rc); myquery(rc);
/* insert by prepare */ /* insert by prepare */
strmov(query, "DELETE FROM test_simple_delete WHERE col1= ? AND col2= ? AND col3= 100"); strmov(query, "DELETE FROM test_simple_delete WHERE col1= ? AND "
"CONVERT(col2 USING utf8)= ? AND col3= 100");
stmt= mysql_simple_prepare(mysql, query); stmt= mysql_simple_prepare(mysql, query);
check_stmt(stmt); check_stmt(stmt);
...@@ -4866,7 +4872,8 @@ static void test_multi_stmt() ...@@ -4866,7 +4872,8 @@ static void test_multi_stmt()
/* alter the table schema now */ /* alter the table schema now */
stmt1= mysql_simple_prepare(mysql, "DELETE FROM test_multi_table " stmt1= mysql_simple_prepare(mysql, "DELETE FROM test_multi_table "
"WHERE id= ? AND name=?"); "WHERE id= ? AND "
"CONVERT(name USING utf8)=?");
check_stmt(stmt1); check_stmt(stmt1);
verify_param_count(stmt1, 2); verify_param_count(stmt1, 2);
...@@ -5629,9 +5636,6 @@ static void test_subselect() ...@@ -5629,9 +5636,6 @@ static void test_subselect()
rc= mysql_stmt_bind_param(stmt, bind); rc= mysql_stmt_bind_param(stmt, bind);
check_execute(stmt, rc); check_execute(stmt, rc);
rc= mysql_stmt_bind_result(stmt, bind);
check_execute(stmt, rc);
id= 2; id= 2;
rc= mysql_stmt_execute(stmt); rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc); check_execute(stmt, rc);
...@@ -5975,7 +5979,7 @@ static void test_pure_coverage() ...@@ -5975,7 +5979,7 @@ static void test_pure_coverage()
check_execute(stmt, rc); check_execute(stmt, rc);
rc= mysql_stmt_bind_result(stmt, (MYSQL_BIND*)0); rc= mysql_stmt_bind_result(stmt, (MYSQL_BIND*)0);
check_execute(stmt, rc); DIE_UNLESS(rc == 1);
mysql_stmt_close(stmt); mysql_stmt_close(stmt);
...@@ -6632,7 +6636,7 @@ static void test_field_misc() ...@@ -6632,7 +6636,7 @@ static void test_field_misc()
"@@table_type", "", /* field and its org name */ "@@table_type", "", /* field and its org name */
MYSQL_TYPE_STRING, /* field type */ MYSQL_TYPE_STRING, /* field type */
"", "", /* table and its org name */ "", "", /* table and its org name */
"", type_length*3, 0); /* db name, length */ "", type_length, 0); /* db name, length */
mysql_free_result(result); mysql_free_result(result);
mysql_stmt_close(stmt); mysql_stmt_close(stmt);
......
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