Fixes for crashes and test failures

parent 9d6471c3
......@@ -1490,14 +1490,13 @@ int main(int argc, char** argv)
the server
*/
#ifdef __WIN__
#include "my_decimal.h"
#include "decimal.c"
#if defined(__WIN__) && !defined(CMAKE_BUILD)
#include "my_decimal.cpp"
#include "log_event.cpp"
#else
#include "my_decimal.h"
#include "decimal.c"
#include "my_decimal.cc"
#include "log_event.cc"
#endif
......
......@@ -188,8 +188,9 @@ int main(int argc, char *argv[])
DBUG_RETURN(1);
}
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);
DBUG_RETURN(0);
return(0);
}
}
......
......@@ -97,6 +97,7 @@ extern void _db_unlock_file(void);
#define DBUG_UNLOCK_FILE
#define DBUG_OUTPUT(A)
#define DBUG_ASSERT(A) {}
#define DBUG_LEAVE
#endif
#ifdef __cplusplus
}
......
......@@ -1042,20 +1042,30 @@ sub executable_setup () {
if ( $glob_win32 )
{
$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",);
$exe_mysqld= mtr_exe_exists ("$path_client_bindir/mysqld-max-nt",
"$path_client_bindir/mysqld-max",
"$path_client_bindir/mysqld-nt",
"$path_client_bindir/mysqld",
"$path_client_bindir/mysqld-debug",
"$path_client_bindir/mysqld-max");
$path_language= mtr_path_exists("$glob_basedir/share/english/");
$path_charsetsdir= mtr_path_exists("$glob_basedir/share/charsets");
"$path_client_bindir/mysqld-max",
"$glob_basedir/sql/release/mysqld",
"$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=
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=
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
{
......@@ -1085,6 +1095,9 @@ sub executable_setup () {
$exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
$exe_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",
"/usr/bin/false");
}
......@@ -1096,7 +1109,8 @@ sub executable_setup () {
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
$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");
$exe_ndb_mgm= "$glob_basedir/ndb/src/mgmclient/ndb_mgm";
$lib_udf_example=
......@@ -1114,7 +1128,8 @@ sub executable_setup () {
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
$exe_mysql_fix_system_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=
mtr_exe_exists("$path_client_bindir/my_print_defaults");
$exe_perror=
......@@ -1148,7 +1163,9 @@ sub executable_setup () {
}
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=
mtr_exe_exists("$path_client_bindir/mysql_client_test",
"/usr/bin/false"); # FIXME temporary
......
# Embedded server doesn't support external clients
--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
#
......
......@@ -29,7 +29,8 @@ my_off_t my_seek(File fd, my_off_t pos, int whence,
whence, MyFlags));
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)
{
my_errno=errno;
......
This diff is collapsed.
......@@ -614,7 +614,7 @@ int ha_archive::create(const char *name, TABLE *table_arg,
error= my_errno;
goto error;
}
if ((archive= gzdopen(create_file, "wb")) == NULL)
if ((archive= gzdopen(dup(create_file), "wb")) == NULL)
{
error= errno;
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