Commit 382cc831 authored by unknown's avatar unknown

merged


BitKeeper/etc/ignore:
  auto-union
include/my_pthread.h:
  Auto merged
innobase/os/os0file.c:
  Auto merged
scripts/mysqld_safe.sh:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  merged manually
parents 6b584127 4532a89f
......@@ -549,13 +549,67 @@ mysql-max-4.0.2-alpha-pc-linux-gnu-i686.tar.gz
mysql-test/gmon.out
mysql-test/install_test_db
mysql-test/mysql-test-run
mysql-test/mysql-test-run.log
mysql-test/mysql_test_run_new
mysql-test/ndb/ndbcluster
mysql-test/r/*.reject
mysql-test/r/alter_table.err
mysql-test/r/archive.err
mysql-test/r/bdb-alter-table-1.err
mysql-test/r/bdb-alter-table-2.err
mysql-test/r/bdb-crash.err
mysql-test/r/bdb-deadlock.err
mysql-test/r/bdb.err
mysql-test/r/bdb_cache.err
mysql-test/r/client_test.err
mysql-test/r/csv.err
mysql-test/r/ctype_ucs.err
mysql-test/r/derived.err
mysql-test/r/exampledb.err
mysql-test/r/func_encrypt.err
mysql-test/r/index_merge_load.result
mysql-test/r/isam.err
mysql-test/r/lowercase_table2.err
mysql-test/r/multi_update.err
mysql-test/r/mysql_protocols.err
mysql-test/r/mysqlbinlog.err
mysql-test/r/mysqlbinlog2.err
mysql-test/r/mysqldump.err
mysql-test/r/mysqltest.err
mysql-test/r/ndb_alter_table.err
mysql-test/r/ndb_autodiscover.err
mysql-test/r/ndb_autodiscover2.err
mysql-test/r/ndb_basic.err
mysql-test/r/ndb_blob.err
mysql-test/r/ndb_cache.err
mysql-test/r/ndb_charset.err
mysql-test/r/ndb_index.err
mysql-test/r/ndb_index_ordered.err
mysql-test/r/ndb_index_unique.err
mysql-test/r/ndb_insert.err
mysql-test/r/ndb_limit.err
mysql-test/r/ndb_lock.err
mysql-test/r/ndb_minmax.err
mysql-test/r/ndb_replace.err
mysql-test/r/ndb_subquery.err
mysql-test/r/ndb_transaction.err
mysql-test/r/ndb_truncate.err
mysql-test/r/ndb_types.err
mysql-test/r/ndb_update.err
mysql-test/r/openssl_1.err
mysql-test/r/ps_1general.err
mysql-test/r/ps_6bdb.err
mysql-test/r/ps_7ndb.err
mysql-test/r/query_cache.err
mysql-test/r/query_cache_merge.err
mysql-test/r/raid.err
mysql-test/r/repair.err
mysql-test/r/replace.err
mysql-test/r/rpl000001.err
mysql-test/r/rpl000001.eval
mysql-test/r/rpl000002.eval
mysql-test/r/rpl000014.eval
mysql-test/r/rpl000015.err
mysql-test/r/rpl000015.eval
mysql-test/r/rpl000016.eval
mysql-test/r/rpl_log.eval
......
......@@ -43,5 +43,6 @@ fi
--with-berkeley-db \
--with-innodb \
--enable-thread-safe-client \
--with-extra-charsets=complex \
--with-ndbcluster
make
......@@ -51,8 +51,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=xilink6.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 /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/mysqldump.exe" /libpath:"..\lib_release\\"
# 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 mysys.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 mysys.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\"
!ELSEIF "$(CFG)" == "mysqldump - Win32 Debug"
......@@ -76,8 +76,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=xilink6.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 /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/mysqldump.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
# 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 mysys.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 mysys.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqldump.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
!ELSEIF "$(CFG)" == "mysqldump - Win32 classic"
......@@ -103,8 +103,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=xilink6.exe
# ADD BASE 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/mysqldump.exe" /libpath:"..\lib_release\\"
# 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_classic/mysqldump.exe" /libpath:"..\lib_release\\"
# ADD BASE 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 mysys.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\"
# 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 mysys.lib /nologo /subsystem:console /machine:I386 /out:"../client_classic/mysqldump.exe" /libpath:"..\lib_release\\"
!ENDIF
......
......@@ -67,8 +67,8 @@ LINK32=link.exe
# PROP Output_Dir ".\classic"
# PROP Intermediate_Dir ".\classic"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /I "../include" /I "../" /W3 /Ob1 /G6 /D "_CONSOLE" /D "_WINDOWS" /D "LICENSE=Commercial" /D "DBUG_OFF" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\classic/mysqltest.pch" /Fo".\classic/" /Fd".\classic/" /c /GX
# ADD CPP /nologo /MT /I "../include" /I "../" /W3 /Ob1 /G6 /D "_CONSOLE" /D "_WINDOWS" /D "LICENSE=Commercial" /D "DBUG_OFF" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\classic/mysqltest.pch" /Fo".\classic/" /Fd".\classic/" /c /GX
# ADD BASE CPP /nologo /MT /I "../include" /I "../regex" /I "../" /W3 /Ob1 /G6 /D "_CONSOLE" /D "_WINDOWS" /D "LICENSE=Commercial" /D "DBUG_OFF" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\classic/mysqltest.pch" /Fo".\classic/" /Fd".\classic/" /c /GX
# ADD CPP /nologo /MT /I "../include" /I "../regex" /I "../" /W3 /Ob1 /G6 /D "_CONSOLE" /D "_WINDOWS" /D "LICENSE=Commercial" /D "DBUG_OFF" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\classic/mysqltest.pch" /Fo".\classic/" /Fd".\classic/" /c /GX
# ADD BASE MTL /nologo /tlb".\classic\mysqltest.tlb" /win32
# ADD MTL /nologo /tlb".\classic\mysqltest.tlb" /win32
# ADD BASE RSC /l 1033 /d "NDEBUG"
......@@ -77,8 +77,8 @@ 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 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 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 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_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 mysys.lib regex.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"
......@@ -92,8 +92,8 @@ LINK32=link.exe
# PROP Output_Dir ".\release"
# PROP Intermediate_Dir ".\release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_CONSOLE" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\release/mysqltest.pch" /Fo".\release/" /Fd".\release/" /c /GX
# ADD CPP /nologo /MT /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_CONSOLE" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\release/mysqltest.pch" /Fo".\release/" /Fd".\release/" /c /GX
# ADD BASE CPP /nologo /MT /I "../include" /I "../regex" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_CONSOLE" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\release/mysqltest.pch" /Fo".\release/" /Fd".\release/" /c /GX
# ADD CPP /nologo /MT /I "../include" /I "../regex" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_CONSOLE" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\release/mysqltest.pch" /Fo".\release/" /Fd".\release/" /c /GX
# ADD BASE MTL /nologo /tlb".\release\mysqltest.tlb" /win32
# ADD MTL /nologo /tlb".\release\mysqltest.tlb" /win32
# ADD BASE RSC /l 1033 /d "NDEBUG"
......@@ -102,8 +102,8 @@ 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 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 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 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_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 mysys.lib regex.lib /nologo /out:"..\client_release\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\release\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
!ENDIF
......
......@@ -76,8 +76,8 @@ 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 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 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 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: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 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:console
!ENDIF
......
......@@ -631,6 +631,7 @@ extern int pthread_dummy(int);
/* All thread specific variables are in the following struct */
#define THREAD_NAME_SIZE 10
#ifndef DEFAULT_THREAD_STACK
#if defined(__ia64__)
/*
MySQL can survive with 32K, but some glibc libraries require > 128K stack
......@@ -640,6 +641,7 @@ extern int pthread_dummy(int);
#else
#define DEFAULT_THREAD_STACK (192*1024)
#endif
#endif
struct st_my_thread_var
{
......
......@@ -1767,7 +1767,21 @@ os_file_flush(
#else
int ret;
#ifdef HAVE_FDATASYNC
#ifdef HAVE_DARWIN_THREADS
/* Apple has disabled fsync() for internal disk drives in OS X. That
caused corruption for a user when he tested a power outage. Let us in
OS X use a nonstandard flush method recommended by an Apple
engineer. */
ret = fcntl(file, F_FULLFSYNC, NULL);
if (ret) {
/* If we are not on a file system that supports this, then
fall back to a plain fsync. */
ret = fsync(file);
}
#elif HAVE_FDATASYNC
ret = fdatasync(file);
#else
/* fprintf(stderr, "Flushing to file %p\n", file); */
......
......@@ -327,7 +327,7 @@ int spawn(char *path, arg_list_t *al, int join, char *input,
int spawn(char *path, arg_list_t *al, int join, char *input,
char *output, char *error, HANDLE *pid)
{
intptr_t result;
bool result;
int i;
STARTUPINFO startup_info;
PROCESS_INFORMATION process_information;
......@@ -665,7 +665,11 @@ void del_tree(char *dir)
rmdir(dir);
#else
struct _finddata_t parent;
#if defined(_MSC_VER) && _MSC_VER > 1200
intptr_t handle;
#else
long handle;
#endif /* _MSC_VER && _MSC_VER > 1200 */
char temp[FN_REFLEN];
char mask[FN_REFLEN];
......@@ -728,7 +732,11 @@ int removef(const char *format, ...)
va_list ap;
char path[FN_REFLEN];
struct _finddata_t parent;
#if defined(_MSC_VER) && _MSC_VER > 1200
intptr_t handle;
#else
long handle;
#endif /* _MSC_VER && _MSC_VER > 1200 */
char temp[FN_REFLEN];
char *p;
......
......@@ -37,7 +37,8 @@
#include <sys/mode.h>
#endif
#ifdef __WIN__
#include <Shlwapi.h>
#include <windows.h>
#include <shlwapi.h>
#include <direct.h>
#endif
......@@ -89,15 +90,25 @@ static char master_socket[FN_REFLEN]= "./var/tmp/master.sock";
static char slave_socket[FN_REFLEN]= "./var/tmp/slave.sock";
#endif
#define MAX_COUNT_TESTES 1024
#ifdef __WIN__
# define sting_compare_func _stricmp
#else
# ifdef HAVE_STRCASECMP
# define sting_compare_func strcasecmp
# else
# define sting_compare_func strcmp
# endif
#endif
/* comma delimited list of tests to skip or empty string */
#ifndef __WIN__
static char skip_test[FN_REFLEN]= " lowercase_table3 , system_mysql_db_fix ";
#else
/*
The most ignore testes contain the calls of system command
*/
#define MAX_COUNT_TESTES 1024
/*
lowercase_table3 is disabled by Gerg
system_mysql_db_fix is disabled by Gerg
sp contains a command system
......@@ -1437,12 +1448,11 @@ 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 );
return sting_compare_func( * ( char** ) arg1, * ( char** ) arg2 );
}
#endif
/******************************************************************************
......@@ -1454,6 +1464,10 @@ int compare( const void *arg1, const void *arg2 )
int main(int argc, char **argv)
{
int is_ignore_list= 0;
char **names= 0;
char **testes= 0;
int name_index;
int index;
/* setup */
setup(argv[0]);
......@@ -1517,6 +1531,11 @@ int main(int argc, char **argv)
else
{
/* run all tests */
testes= malloc(MAX_COUNT_TESTES*sizeof(void*));
if (!testes)
die("can not allcate memory for sorting");
names= testes;
name_index= 0;
#ifndef __WIN__
struct dirent *entry;
DIR *parent;
......@@ -1534,74 +1553,79 @@ int main(int argc, char **argv)
/* find the test suffix */
if ((position= strinstr(test, TEST_SUFFIX)) != 0)
{
/* null terminate at the suffix */
*(test + position - 1)= '\0';
/* run test */
run_test(test);
if (name_index < MAX_COUNT_TESTES)
{
/* null terminate at the suffix */
*(test + position - 1)= '\0';
/* insert test */
*names= malloc(FN_REFLEN);
strcpy(*names,test);
names++;
name_index++;
}
else
die("can not sort files, array is overloaded");
}
}
closedir(parent);
}
#else
struct _finddata_t dir;
intptr_t handle;
char test[FN_LEN];
char mask[FN_REFLEN];
char *p;
int position;
char **names= 0;
char **testes= 0;
int name_index;
int index;
{
struct _finddata_t dir;
int* handle;
char test[FN_LEN];
char mask[FN_REFLEN];
char *p;
int position;
/* single test */
single_test= FALSE;
/* single test */
single_test= FALSE;
snprintf(mask,FN_REFLEN,"%s/*.test",test_dir);
snprintf(mask,FN_REFLEN,"%s/*.test",test_dir);
if ((handle=_findfirst(mask,&dir)) == -1L)
{
die("Unable to open tests directory.");
}
if ((handle=_findfirst(mask,&dir)) == -1L)
{
die("Unable to open tests directory.");
}
names= malloc(MAX_COUNT_TESTES*4);
testes= names;
name_index= 0;
do
{
if (!(dir.attrib & _A_SUBDIR))
do
{
strcpy(test, strlwr(dir.name));
/* find the test suffix */
if ((position= strinstr(test, TEST_SUFFIX)) != 0)
if (!(dir.attrib & _A_SUBDIR))
{
p= test + position - 1;
/* null terminate at the suffix */
*p= 0;
/* insert test */
*names= malloc(FN_REFLEN);
strcpy(*names,test);
names++;
name_index++;
strcpy(test, strlwr(dir.name));
/* find the test suffix */
if ((position= strinstr(test, TEST_SUFFIX)) != 0)
{
if (name_index < MAX_COUNT_TESTES)
{
/* null terminate at the suffix */
*(test + position - 1)= '\0';
/* insert test */
*names= malloc(FN_REFLEN);
strcpy(*names,test);
names++;
name_index++;
}
else
die("can not sort files, array is overloaded");
}
}
}
}while (_findnext(handle,&dir) == 0);
_findclose(handle);
}while (_findnext(handle,&dir) == 0);
_findclose(handle);
}
#endif
qsort( (void *)testes, name_index, sizeof( char * ), compare );
for (index= 0; index <= name_index; index++)
for (index= 0; index < name_index; index++)
{
run_test(testes[index]);
free(testes[index]);
}
free(testes);
#endif
}
/* stop server */
......
......@@ -235,7 +235,7 @@ static my_bool safe_hash_set(SAFE_HASH *hash, const byte *key, uint length,
if (my_hash_insert(&hash->hash, (byte*) entry))
{
/* This can only happen if hash got out of memory */
my_delete((char*) entry, MYF(0));
my_free((char*) entry, MYF(0));
error= 1;
goto end;
}
......
......@@ -23,6 +23,8 @@ void my_sleep(ulong m_seconds)
{
#ifdef __NETWARE__
delay(m_seconds/1000+1);
#elif defined(__WIN__)
Sleep(m_seconds/1000+1); /* Sleep() has millisecond arg */
#elif defined(OS2)
DosSleep(m_seconds/1000+1);
#elif defined(HAVE_SELECT)
......
......@@ -327,13 +327,13 @@ do
# but should work for the rest of the servers.
# The only thing is ps x => redhat 5 gives warnings when using ps -x.
# kill -9 is used or the process won't react on the kill.
numofproces=`ps xa | grep -v "grep" | grep "$ledir/$MYSQLD\>" | grep -c "pid-file=$pid_file"`
numofproces=`ps xaww | grep -v "grep" | grep "$ledir/$MYSQLD\>" | grep -c "pid-file=$pid_file"`
echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log
I=1
while test "$I" -le "$numofproces"
do
PROC=`ps xa | grep "$ledir/$MYSQLD\>" | grep -v "grep" | grep "pid-file=$pid_file" | sed -n '$p'`
PROC=`ps xaww | grep "$ledir/$MYSQLD\>" | grep -v "grep" | grep "pid-file=$pid_file" | sed -n '$p'`
for T in $PROC
do
......
......@@ -1039,7 +1039,7 @@ try_and_report("Automatic row id", "automatic_rowid",
["MATCH UNIQUE","match_unique",
"1 match unique (select a from crash_me)",1,0],
["MATCH","match","1 match (select a from crash_me)",1,0],
["MATCHES","matches","b matcjhes 'a*'",1,0],
["MATCHES","matches","b matches 'a*'",1,0],
["NOT BETWEEN","not_between","7 not between 4 and 6",1,0],
["NOT EXISTS","not_exists",
"not exists (select * from crash_me where a = 2)",1,0],
......
......@@ -880,7 +880,7 @@ static const char *default_options[]=
"connect-timeout", "local-infile", "disable-local-infile",
"replication-probe", "enable-reads-from-master", "repl-parse-query",
"ssl-cipher", "max-allowed-packet", "protocol", "shared-memory-base-name",
"multi-results", "multi-queries", "secure-auth",
"multi-results", "multi-statements", "multi-queries", "secure-auth",
"report-data-truncation",
NullS
};
......@@ -1087,12 +1087,13 @@ void mysql_read_default_options(struct st_mysql_options *options,
options->client_flag|= CLIENT_MULTI_RESULTS;
break;
case 31:
case 32:
options->client_flag|= CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS;
break;
case 32: /* secure-auth */
case 33: /* secure-auth */
options->secure_auth= TRUE;
break;
case 33: /* report-data-truncation */
case 34: /* report-data-truncation */
options->report_data_truncation= opt_arg ? test(atoi(opt_arg)) : 1;
break;
default:
......
......@@ -2665,7 +2665,6 @@ mysql_execute_command(THD *thd)
lex->link_first_table_back(create_table, link_to_local);
break;
create_error:
/* put tables back for PS rexecuting */
lex->link_first_table_back(create_table, link_to_local);
goto error;
......
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