Commit 9ace4da5 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

merge

parents 8a314700 7aba87b7
set @@global.innodb_fast_shutdown=0;
CREATE TABLE t(a INT)ENGINE=InnoDB; CREATE TABLE t(a INT)ENGINE=InnoDB;
RENAME TABLE t TO u; RENAME TABLE t TO u;
DROP TABLE u; DROP TABLE u;
......
...@@ -5,11 +5,10 @@ ...@@ -5,11 +5,10 @@
-- source include/not_embedded.inc -- source include/not_embedded.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
if (`SELECT @@innodb_fast_shutdown != 0`) #
# This test will not work if we don't do full shutdown of innodb
{ #
skip Need innodb_fast_shutdown=0; set @@global.innodb_fast_shutdown=0;
}
CREATE TABLE t(a INT)ENGINE=InnoDB; CREATE TABLE t(a INT)ENGINE=InnoDB;
RENAME TABLE t TO u; RENAME TABLE t TO u;
......
set @@global.innodb_fast_shutdown=0;
CREATE TABLE t(a INT)ENGINE=InnoDB; CREATE TABLE t(a INT)ENGINE=InnoDB;
RENAME TABLE t TO u; RENAME TABLE t TO u;
DROP TABLE u; DROP TABLE u;
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
-- source include/not_embedded.inc -- source include/not_embedded.inc
-- source include/have_innodb_plugin.inc -- source include/have_innodb_plugin.inc
# This test will not work if we don't do full shutdown of innodb
#
set @@global.innodb_fast_shutdown=0;
CREATE TABLE t(a INT)ENGINE=InnoDB; CREATE TABLE t(a INT)ENGINE=InnoDB;
RENAME TABLE t TO u; RENAME TABLE t TO u;
DROP TABLE u; DROP TABLE u;
......
...@@ -179,11 +179,22 @@ sub new ...@@ -179,11 +179,22 @@ sub new
{ {
$limits{'working_blobs'} = 0; # HEAP tables can't handle BLOB's $limits{'working_blobs'} = 0; # HEAP tables can't handle BLOB's
} }
# HEAP is deprecated in favor of MEMORY
if (defined($main::opt_create_options) &&
$main::opt_create_options =~ /engine=memory/i)
{
$limits{'working_blobs'} = 0; # MEMORY tables can't handle BLOB's
}
if (defined($main::opt_create_options) && if (defined($main::opt_create_options) &&
$main::opt_create_options =~ /engine=innodb/i) $main::opt_create_options =~ /engine=innodb/i)
{ {
$self->{'transactions'} = 1; # Transactions enabled $self->{'transactions'} = 1; # Transactions enabled
} }
if (defined($main::opt_create_options) &&
$main::opt_create_options =~ /engine=pbxt/i)
{
$self->{'transactions'} = 1; # Transactions enabled
}
if (defined($main::opt_create_options) && if (defined($main::opt_create_options) &&
$main::opt_create_options =~ /engine=ndb/i) $main::opt_create_options =~ /engine=ndb/i)
{ {
......
...@@ -5818,7 +5818,21 @@ static bool test_if_number(register const char *str, ...@@ -5818,7 +5818,21 @@ static bool test_if_number(register const char *str,
void sql_perror(const char *message) void sql_perror(const char *message)
{ {
#ifdef HAVE_STRERROR #if defined(_WIN32)
char* buf;
DWORD dw= GetLastError();
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dw,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&buf, 0, NULL ) > 0)
{
sql_print_error("%s: %s",message, buf);
LocalFree((HLOCAL)buf);
}
else
{
sql_print_error("%s", message);
}
#elif defined(HAVE_STRERROR)
sql_print_error("%s: %s",message, strerror(errno)); sql_print_error("%s: %s",message, strerror(errno));
#else #else
perror(message); perror(message);
......
...@@ -4037,6 +4037,32 @@ static void end_ssl() ...@@ -4037,6 +4037,32 @@ static void end_ssl()
#endif /* EMBEDDED_LIBRARY */ #endif /* EMBEDDED_LIBRARY */
#ifdef _WIN32
/**
Registers a file to be collected when Windows Error Reporting creates a crash
report.
@note only works on Vista and later, since WerRegisterFile() is not available
on earlier Windows.
*/
#include <werapi.h>
static void add_file_to_crash_report(char *file)
{
/* Load WerRegisterFile function dynamically.*/
HRESULT (WINAPI *pWerRegisterFile)(PCWSTR, WER_REGISTER_FILE_TYPE, DWORD)
=(HRESULT (WINAPI *) (PCWSTR, WER_REGISTER_FILE_TYPE, DWORD))
GetProcAddress(GetModuleHandle("kernel32"),"WerRegisterFile");
if (pWerRegisterFile)
{
wchar_t wfile[MAX_PATH+1]= {0};
if (mbstowcs(wfile, file, MAX_PATH) != (size_t)-1)
{
pWerRegisterFile(wfile, WerRegFileTypeOther, WER_FILE_ANONYMOUS_DATA);
}
}
}
#endif
static int init_server_components() static int init_server_components()
{ {
...@@ -4089,6 +4115,11 @@ static int init_server_components() ...@@ -4089,6 +4115,11 @@ static int init_server_components()
if (!res) if (!res)
setbuf(stderr, NULL); setbuf(stderr, NULL);
#ifdef _WIN32
/* Add error log to windows crash reporting. */
add_file_to_crash_report(log_error_file);
#endif
} }
} }
...@@ -8994,7 +9025,7 @@ mysqld_get_one_option(int optid, ...@@ -8994,7 +9025,7 @@ mysqld_get_one_option(int optid,
} }
case OPT_EVENT_SCHEDULER: case OPT_EVENT_SCHEDULER:
#ifndef HAVE_EVENT_SCHEDULER #ifndef HAVE_EVENT_SCHEDULER
sql_perror("Event scheduler is not supported in embedded build."); sql_print_error("Event scheduler is not supported in embedded build.");
#else #else
if (Events::set_opt_event_scheduler(argument)) if (Events::set_opt_event_scheduler(argument))
return 1; return 1;
......
...@@ -214,7 +214,7 @@ tz_load(const char *name, TIME_ZONE_INFO *sp, MEM_ROOT *storage) ...@@ -214,7 +214,7 @@ tz_load(const char *name, TIME_ZONE_INFO *sp, MEM_ROOT *storage)
ALIGN_SIZE(sp->typecnt * ALIGN_SIZE(sp->typecnt *
sizeof(TRAN_TYPE_INFO)) + sizeof(TRAN_TYPE_INFO)) +
#ifdef ABBR_ARE_USED #ifdef ABBR_ARE_USED
ALIGN_SIZE(sp->charcnt) + ALIGN_SIZE(sp->charcnt+1) +
#endif #endif
sp->leapcnt * sizeof(LS_INFO)))) sp->leapcnt * sizeof(LS_INFO))))
return 1; return 1;
...@@ -227,7 +227,7 @@ tz_load(const char *name, TIME_ZONE_INFO *sp, MEM_ROOT *storage) ...@@ -227,7 +227,7 @@ tz_load(const char *name, TIME_ZONE_INFO *sp, MEM_ROOT *storage)
tzinfo_buf+= ALIGN_SIZE(sp->typecnt * sizeof(TRAN_TYPE_INFO)); tzinfo_buf+= ALIGN_SIZE(sp->typecnt * sizeof(TRAN_TYPE_INFO));
#ifdef ABBR_ARE_USED #ifdef ABBR_ARE_USED
sp->chars= tzinfo_buf; sp->chars= tzinfo_buf;
tzinfo_buf+= ALIGN_SIZE(sp->charcnt); tzinfo_buf+= ALIGN_SIZE(sp->charcnt+1);
#endif #endif
sp->lsis= (LS_INFO *)tzinfo_buf; sp->lsis= (LS_INFO *)tzinfo_buf;
......
...@@ -558,8 +558,10 @@ xtPublic int xt_p_set_low_priority(pthread_t thr) ...@@ -558,8 +558,10 @@ xtPublic int xt_p_set_low_priority(pthread_t thr)
*/ */
/* -20 = highest, 20 = lowest */ /* -20 = highest, 20 = lowest */
#ifdef SET_GLOBAL_PRIORITY
if (setpriority(PRIO_PROCESS, getpid(), 20) == -1) if (setpriority(PRIO_PROCESS, getpid(), 20) == -1)
return errno; return errno;
#endif
return 0; return 0;
} }
return pth_set_priority(thr, pth_min_priority); return pth_set_priority(thr, pth_min_priority);
......
...@@ -304,20 +304,24 @@ ENDFUNCTION() ...@@ -304,20 +304,24 @@ ENDFUNCTION()
FUNCTION(TRAVERSE_DIRECTORIES dir topdir file prefix) FUNCTION(TRAVERSE_DIRECTORIES dir topdir file prefix)
FILE(RELATIVE_PATH rel ${topdir} ${dir}) FILE(RELATIVE_PATH rel ${topdir} ${dir})
IF(rel AND IS_DIRECTORY "${f}") IF(rel)
IF (IS_DIRECTORY "${f}")
MAKE_WIX_IDENTIFIER("${rel}" id) MAKE_WIX_IDENTIFIER("${rel}" id)
GET_FILENAME_COMPONENT(name ${dir} NAME) GET_FILENAME_COMPONENT(name ${dir} NAME)
FILE(APPEND ${file} "${prefix}<Directory Id='D.${id}' Name='${name}'>\n") FILE(APPEND ${file} "${prefix}<Directory Id='D.${id}' Name='${name}'>\n")
ENDIF() ENDIF()
ENDIF()
FILE(GLOB all_files ${dir}/*) FILE(GLOB all_files ${dir}/*)
FOREACH(f ${all_files}) FOREACH(f ${all_files})
IF(IS_DIRECTORY ${f}) IF(IS_DIRECTORY ${f})
TRAVERSE_DIRECTORIES(${f} ${topdir} ${file} "${prefix} ") TRAVERSE_DIRECTORIES(${f} ${topdir} ${file} "${prefix} ")
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
IF(rel AND IS_DIRECTORY "${f}") IF(rel)
IF(IS_DIRECTORY "${f}")
FILE(APPEND ${file} "${prefix}</Directory>\n") FILE(APPEND ${file} "${prefix}</Directory>\n")
ENDIF() ENDIF()
ENDIF()
ENDFUNCTION() ENDFUNCTION()
SET(CPACK_WIX_COMPONENTS) SET(CPACK_WIX_COMPONENTS)
......
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