Commit 5d3e6c27 authored by unknown's avatar unknown

Fixes for crashes and test failures


scripts/make_win_bin_dist:
  BitKeeper file /home/georg/work/mysql/prod/mysql-5.0-win/scripts/make_win_bin_dist
client/mysqlbinlog.cc:
  Fix for cmake build: Cmake doesn't use the VC++ files
extra/comp_err.c:
  fixed windows crash (debug): We can't call DBUG_RETURN after my_end.
include/my_dbug.h:
  added missing empty define for DBUG_LEAVE to prevent precompiler errors when
  compiling in non_debug mode
mysql-test/mysql-test-run.pl:
  Added support for new cmake release and debug paths.
mysql-test/t/system_mysql_db_fix.test:
  This test requires unix shell script mysql_fix_previleges_tables -> skip under windows
mysys/my_seek.c:
  Fix for windows debug crash. However this solution is bad: we should never
  call lseek with an invalid file pointer.
sql/ha_archive.cc:
  Fixed windows crash: We need dup in gzdopen to keep the filehandle open,
  otherwise subsequent calls to mysql_close will fail/crash.
parent cce4cc25
...@@ -1490,14 +1490,13 @@ int main(int argc, char** argv) ...@@ -1490,14 +1490,13 @@ int main(int argc, char** argv)
the server the server
*/ */
#ifdef __WIN__
#include "my_decimal.h" #include "my_decimal.h"
#include "decimal.c" #include "decimal.c"
#if defined(__WIN__) && !defined(CMAKE_BUILD)
#include "my_decimal.cpp" #include "my_decimal.cpp"
#include "log_event.cpp" #include "log_event.cpp"
#else #else
#include "my_decimal.h"
#include "decimal.c"
#include "my_decimal.cc" #include "my_decimal.cc"
#include "log_event.cc" #include "log_event.cc"
#endif #endif
......
...@@ -188,8 +188,9 @@ int main(int argc, char *argv[]) ...@@ -188,8 +188,9 @@ int main(int argc, char *argv[])
DBUG_RETURN(1); DBUG_RETURN(1);
} }
clean_up(lang_head, error_head); clean_up(lang_head, error_head);
DBUG_LEAVE; /* we can't call my_end after DBUG_RETURN */
my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0); my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
DBUG_RETURN(0); return(0);
} }
} }
......
...@@ -97,6 +97,7 @@ extern void _db_unlock_file(void); ...@@ -97,6 +97,7 @@ extern void _db_unlock_file(void);
#define DBUG_UNLOCK_FILE #define DBUG_UNLOCK_FILE
#define DBUG_OUTPUT(A) #define DBUG_OUTPUT(A)
#define DBUG_ASSERT(A) {} #define DBUG_ASSERT(A) {}
#define DBUG_LEAVE
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -1042,20 +1042,30 @@ sub executable_setup () { ...@@ -1042,20 +1042,30 @@ sub executable_setup () {
if ( $glob_win32 ) if ( $glob_win32 )
{ {
$path_client_bindir= mtr_path_exists("$glob_basedir/client_release", $path_client_bindir= mtr_path_exists("$glob_basedir/client_release",
"$glob_basedir/client_debug", "$glob_basedir/client_debug",
"$glob_basedir/client/release",
"$glob_basedir/client/debug",
"$glob_basedir/bin",); "$glob_basedir/bin",);
$exe_mysqld= mtr_exe_exists ("$path_client_bindir/mysqld-max-nt", $exe_mysqld= mtr_exe_exists ("$path_client_bindir/mysqld-max-nt",
"$path_client_bindir/mysqld-max", "$path_client_bindir/mysqld-max",
"$path_client_bindir/mysqld-nt", "$path_client_bindir/mysqld-nt",
"$path_client_bindir/mysqld", "$path_client_bindir/mysqld",
"$path_client_bindir/mysqld-debug", "$path_client_bindir/mysqld-debug",
"$path_client_bindir/mysqld-max"); "$path_client_bindir/mysqld-max",
$path_language= mtr_path_exists("$glob_basedir/share/english/"); "$glob_basedir/sql/release/mysqld",
$path_charsetsdir= mtr_path_exists("$glob_basedir/share/charsets"); "$glob_basedir/sql/debug/mysqld");
$path_language= mtr_path_exists("$glob_basedir/share/english/",
"$glob_basedir/sql/share/english/");
$path_charsetsdir= mtr_path_exists("$glob_basedir/share/charsets",
"$glob_basedir/sql/share/charsets/");
$exe_my_print_defaults= $exe_my_print_defaults=
mtr_exe_exists("$path_client_bindir/my_print_defaults"); mtr_exe_exists("$path_client_bindir/my_print_defaults",
"$glob_basedir/extra/release/my_print_defaults",
"$glob_basedir/extra/debug/my_print_defaults");
$exe_perror= $exe_perror=
mtr_exe_exists("$path_client_bindir/perror"); mtr_exe_exists("$path_client_bindir/perror",
"$glob_basedir/extra/release/perror",
"$glob_basedir/extra/debug/perror");
} }
else else
{ {
...@@ -1085,6 +1095,9 @@ sub executable_setup () { ...@@ -1085,6 +1095,9 @@ sub executable_setup () {
$exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest"); $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
$exe_mysql_client_test= $exe_mysql_client_test=
mtr_exe_exists("$glob_basedir/tests/mysql_client_test", mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
"$path_client_bindir/mysql_client_test",
"$glob_basedir/tests/release/mysql_client_test",
"$glob_basedir/tests/debug/mysql_client_test",
"$path_client_bindir/mysql_client_test", "$path_client_bindir/mysql_client_test",
"/usr/bin/false"); "/usr/bin/false");
} }
...@@ -1096,7 +1109,8 @@ sub executable_setup () { ...@@ -1096,7 +1109,8 @@ sub executable_setup () {
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin"); $exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql"); $exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
$exe_mysql_fix_system_tables= $exe_mysql_fix_system_tables=
mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables"); mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables",
"/usr/bin/false");
$path_ndb_tools_dir= mtr_path_exists("$glob_basedir/ndb/tools"); $path_ndb_tools_dir= mtr_path_exists("$glob_basedir/ndb/tools");
$exe_ndb_mgm= "$glob_basedir/ndb/src/mgmclient/ndb_mgm"; $exe_ndb_mgm= "$glob_basedir/ndb/src/mgmclient/ndb_mgm";
$lib_udf_example= $lib_udf_example=
...@@ -1114,7 +1128,8 @@ sub executable_setup () { ...@@ -1114,7 +1128,8 @@ sub executable_setup () {
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql"); $exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
$exe_mysql_fix_system_tables= $exe_mysql_fix_system_tables=
mtr_script_exists("$path_client_bindir/mysql_fix_privilege_tables", mtr_script_exists("$path_client_bindir/mysql_fix_privilege_tables",
"$glob_basedir/scripts/mysql_fix_privilege_tables"); "$glob_basedir/scripts/mysql_fix_privilege_tables",
"/usr/bin/false");
$exe_my_print_defaults= $exe_my_print_defaults=
mtr_exe_exists("$path_client_bindir/my_print_defaults"); mtr_exe_exists("$path_client_bindir/my_print_defaults");
$exe_perror= $exe_perror=
...@@ -1148,7 +1163,9 @@ sub executable_setup () { ...@@ -1148,7 +1163,9 @@ sub executable_setup () {
} }
else else
{ {
$exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest"); $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest",
"$glob_basedir/client/release/mysqltest",
"$glob_basedir/client/debug/mysqltest");
$exe_mysql_client_test= $exe_mysql_client_test=
mtr_exe_exists("$path_client_bindir/mysql_client_test", mtr_exe_exists("$path_client_bindir/mysql_client_test",
"/usr/bin/false"); # FIXME temporary "/usr/bin/false"); # FIXME temporary
......
# Embedded server doesn't support external clients # Embedded server doesn't support external clients
--source include/not_embedded.inc --source include/not_embedded.inc
# Windows doesn't support execution of shell scripts (to fix!!)
--source include/not_windows.inc
# #
# This is the test for mysql_fix_privilege_tables # This is the test for mysql_fix_privilege_tables
# #
......
...@@ -29,7 +29,8 @@ my_off_t my_seek(File fd, my_off_t pos, int whence, ...@@ -29,7 +29,8 @@ my_off_t my_seek(File fd, my_off_t pos, int whence,
whence, MyFlags)); whence, MyFlags));
DBUG_ASSERT(pos != MY_FILEPOS_ERROR); /* safety check */ DBUG_ASSERT(pos != MY_FILEPOS_ERROR); /* safety check */
newpos=lseek(fd, pos, whence); if (-1 != fd)
newpos=lseek(fd, pos, whence);
if (newpos == (os_off_t) -1) if (newpos == (os_off_t) -1)
{ {
my_errno=errno; my_errno=errno;
......
This diff is collapsed.
...@@ -614,7 +614,7 @@ int ha_archive::create(const char *name, TABLE *table_arg, ...@@ -614,7 +614,7 @@ int ha_archive::create(const char *name, TABLE *table_arg,
error= my_errno; error= my_errno;
goto error; goto error;
} }
if ((archive= gzdopen(create_file, "wb")) == NULL) if ((archive= gzdopen(dup(create_file), "wb")) == NULL)
{ {
error= errno; error= errno;
goto error2; goto error2;
......
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