diff options
author | unknown <serg@sergbook.mysql.com> | 2005-01-06 19:32:16 +0200 |
---|---|---|
committer | unknown <serg@sergbook.mysql.com> | 2005-01-06 19:32:16 +0200 |
commit | 382cc831de2ef50966fd3fd2b8157bcc5727dde3 (patch) | |
tree | bc5f2396178536c669ed27714be84b79612c0f6b | |
parent | 6b584127af84fe362539af068a505fc3f5e28925 (diff) | |
parent | 4532a89f0dc9d091dcfb408d0b225d118a9576f6 (diff) | |
download | mariadb-git-382cc831de2ef50966fd3fd2b8157bcc5727dde3.tar.gz |
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
-rw-r--r-- | .bzrignore | 54 | ||||
-rwxr-xr-x | BUILD/compile-dist | 1 | ||||
-rw-r--r-- | VC++Files/client/mysqldump.dsp | 12 | ||||
-rw-r--r-- | VC++Files/client/mysqltest.dsp | 16 | ||||
-rw-r--r-- | VC++Files/mysql-test/mysql_test_run_new.dsp | 4 | ||||
-rw-r--r-- | include/my_pthread.h | 2 | ||||
-rw-r--r-- | innobase/os/os0file.c | 16 | ||||
-rw-r--r-- | mysql-test/my_manage.c | 10 | ||||
-rw-r--r-- | mysql-test/mysql_test_run_new.c | 130 | ||||
-rw-r--r-- | mysys/mf_keycaches.c | 2 | ||||
-rw-r--r-- | mysys/my_sleep.c | 2 | ||||
-rw-r--r-- | scripts/mysqld_safe.sh | 4 | ||||
-rw-r--r-- | sql-bench/crash-me.sh | 2 | ||||
-rw-r--r-- | sql-common/client.c | 7 | ||||
-rw-r--r-- | sql/sql_parse.cc | 1 |
15 files changed, 184 insertions, 79 deletions
diff --git a/.bzrignore b/.bzrignore index 699cb75cc72..951a811f8e4 100644 --- a/.bzrignore +++ b/.bzrignore @@ -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 diff --git a/BUILD/compile-dist b/BUILD/compile-dist index f27c218747c..7c177f54258 100755 --- a/BUILD/compile-dist +++ b/BUILD/compile-dist @@ -43,5 +43,6 @@ fi --with-berkeley-db \ --with-innodb \ --enable-thread-safe-client \ + --with-extra-charsets=complex \ --with-ndbcluster make diff --git a/VC++Files/client/mysqldump.dsp b/VC++Files/client/mysqldump.dsp index a1ebdfe11a6..3c955639596 100644 --- a/VC++Files/client/mysqldump.dsp +++ b/VC++Files/client/mysqldump.dsp @@ -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 diff --git a/VC++Files/client/mysqltest.dsp b/VC++Files/client/mysqltest.dsp index 1f1613026a9..d04dc5bfce8 100644 --- a/VC++Files/client/mysqltest.dsp +++ b/VC++Files/client/mysqltest.dsp @@ -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
diff --git a/VC++Files/mysql-test/mysql_test_run_new.dsp b/VC++Files/mysql-test/mysql_test_run_new.dsp index 7e43da20b26..61392b00b94 100644 --- a/VC++Files/mysql-test/mysql_test_run_new.dsp +++ b/VC++Files/mysql-test/mysql_test_run_new.dsp @@ -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
diff --git a/include/my_pthread.h b/include/my_pthread.h index b483b68d5cb..57240788e2f 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -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 { diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index e0d822b016f..ed3c0e53c12 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -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); */ diff --git a/mysql-test/my_manage.c b/mysql-test/my_manage.c index 472b0d32683..1f006f7ab90 100644 --- a/mysql-test/my_manage.c +++ b/mysql-test/my_manage.c @@ -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; diff --git a/mysql-test/mysql_test_run_new.c b/mysql-test/mysql_test_run_new.c index fe13d71c1c2..bdebe912b97 100644 --- a/mysql-test/mysql_test_run_new.c +++ b/mysql-test/mysql_test_run_new.c @@ -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 */ diff --git a/mysys/mf_keycaches.c b/mysys/mf_keycaches.c index 8bf203e249f..fee3096de52 100644 --- a/mysys/mf_keycaches.c +++ b/mysys/mf_keycaches.c @@ -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; } diff --git a/mysys/my_sleep.c b/mysys/my_sleep.c index 3de2d2abd13..31eaf7eeb96 100644 --- a/mysys/my_sleep.c +++ b/mysys/my_sleep.c @@ -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) diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 0e18f137c5a..0b83acfa13d 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -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 diff --git a/sql-bench/crash-me.sh b/sql-bench/crash-me.sh index 8ec62442b11..a40ef8fbc7d 100644 --- a/sql-bench/crash-me.sh +++ b/sql-bench/crash-me.sh @@ -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], diff --git a/sql-common/client.c b/sql-common/client.c index 0ff98102da9..9e08e8c0f59 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -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: diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 584697dd8e8..af62a81450a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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; |