mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
compilation fixes
cmake/maintainer.cmake: don't do -Werror just yet config.h.cmake: according to MSDN PSAPI_VERSION should be 1 in a portable application mysys/my_thr_init.c: first, reset THR_KEY_mysys, and then free dbug data, because dbug data are automacially created on the next dbug call, unless THR_KEY_mysys is null.
This commit is contained in:
@ -18,7 +18,7 @@ INCLUDE(CheckCCompilerFlag)
|
|||||||
# Setup GCC (GNU C compiler) warning options.
|
# Setup GCC (GNU C compiler) warning options.
|
||||||
MACRO(SET_MYSQL_MAINTAINER_GNU_C_OPTIONS)
|
MACRO(SET_MYSQL_MAINTAINER_GNU_C_OPTIONS)
|
||||||
SET(MY_MAINTAINER_WARNINGS
|
SET(MY_MAINTAINER_WARNINGS
|
||||||
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror")
|
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing")
|
||||||
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement"
|
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement"
|
||||||
HAVE_DECLARATION_AFTER_STATEMENT)
|
HAVE_DECLARATION_AFTER_STATEMENT)
|
||||||
IF(HAVE_DECLARATION_AFTER_STATEMENT)
|
IF(HAVE_DECLARATION_AFTER_STATEMENT)
|
||||||
|
@ -502,9 +502,7 @@
|
|||||||
# define HAVE_SETENV
|
# define HAVE_SETENV
|
||||||
#define setenv(a,b,c) _putenv_s(a,b)
|
#define setenv(a,b,c) _putenv_s(a,b)
|
||||||
#endif
|
#endif
|
||||||
|
#define PSAPI_VERSION 1 /* for GetProcessMemoryInfo() */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
MySQL features
|
MySQL features
|
||||||
|
@ -194,7 +194,7 @@ extern void my_large_free(uchar *ptr);
|
|||||||
#endif /* HAVE_ALLOCA */
|
#endif /* HAVE_ALLOCA */
|
||||||
|
|
||||||
#define my_safe_alloca(size, min_length) ((size <= min_length) ? my_alloca(size) : my_malloc(size,MYF(MY_FAE)))
|
#define my_safe_alloca(size, min_length) ((size <= min_length) ? my_alloca(size) : my_malloc(size,MYF(MY_FAE)))
|
||||||
#define my_safe_afree(ptr, size, min_length) ((size <= min_length) ? (void)0 : my_free(ptr))
|
#define my_safe_afree(ptr, size, min_length) ((size <= min_length) ? my_afree(ptr) : my_free(ptr))
|
||||||
|
|
||||||
#ifndef errno /* did we already get it? */
|
#ifndef errno /* did we already get it? */
|
||||||
#ifdef HAVE_ERRNO_AS_DEFINE
|
#ifdef HAVE_ERRNO_AS_DEFINE
|
||||||
|
@ -355,13 +355,16 @@ void my_thread_end(void)
|
|||||||
PSI_server->delete_current_thread();
|
PSI_server->delete_current_thread();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
DBUG_POP();
|
||||||
|
|
||||||
|
pthread_setspecific(THR_KEY_mysys,0);
|
||||||
|
|
||||||
if (tmp && tmp->init)
|
if (tmp && tmp->init)
|
||||||
{
|
{
|
||||||
#if !defined(DBUG_OFF)
|
#if !defined(DBUG_OFF)
|
||||||
/* tmp->dbug is allocated inside DBUG library */
|
/* tmp->dbug is allocated inside DBUG library */
|
||||||
if (tmp->dbug)
|
if (tmp->dbug)
|
||||||
{
|
{
|
||||||
DBUG_POP();
|
|
||||||
free(tmp->dbug);
|
free(tmp->dbug);
|
||||||
tmp->dbug=0;
|
tmp->dbug=0;
|
||||||
}
|
}
|
||||||
@ -384,7 +387,6 @@ void my_thread_end(void)
|
|||||||
TRASH(tmp, sizeof(*tmp));
|
TRASH(tmp, sizeof(*tmp));
|
||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
pthread_setspecific(THR_KEY_mysys,0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct st_my_thread_var *_my_thread_var(void)
|
struct st_my_thread_var *_my_thread_var(void)
|
||||||
|
@ -547,7 +547,7 @@ my_bool engine_table_options_frm_read(const uchar *buff, uint length,
|
|||||||
TABLE_SHARE *share)
|
TABLE_SHARE *share)
|
||||||
{
|
{
|
||||||
const uchar *buff_end= buff + length;
|
const uchar *buff_end= buff + length;
|
||||||
engine_option_value *end;
|
engine_option_value *UNINIT_VAR(end);
|
||||||
MEM_ROOT *root= &share->mem_root;
|
MEM_ROOT *root= &share->mem_root;
|
||||||
uint count;
|
uint count;
|
||||||
DBUG_ENTER("engine_table_options_frm_read");
|
DBUG_ENTER("engine_table_options_frm_read");
|
||||||
|
@ -4620,7 +4620,7 @@ static void store_column_type(TABLE *table, Field *field, CHARSET_INFO *cs,
|
|||||||
base_type [(dimension)] [unsigned] [zerofill].
|
base_type [(dimension)] [unsigned] [zerofill].
|
||||||
For DATA_TYPE column we extract only base type.
|
For DATA_TYPE column we extract only base type.
|
||||||
*/
|
*/
|
||||||
tmp_buff= strchr(column_type.ptr(), '(');
|
tmp_buff= strchr(column_type.c_ptr_safe(), '(');
|
||||||
if (!tmp_buff)
|
if (!tmp_buff)
|
||||||
/*
|
/*
|
||||||
if there is no dimention part then check the presence of
|
if there is no dimention part then check the presence of
|
||||||
|
Reference in New Issue
Block a user