mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01: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:
parent
effed09bd7
commit
dfc1901e80
6 changed files with 9 additions and 9 deletions
|
@ -18,7 +18,7 @@ INCLUDE(CheckCCompilerFlag)
|
|||
# Setup GCC (GNU C compiler) warning options.
|
||||
MACRO(SET_MYSQL_MAINTAINER_GNU_C_OPTIONS)
|
||||
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"
|
||||
HAVE_DECLARATION_AFTER_STATEMENT)
|
||||
IF(HAVE_DECLARATION_AFTER_STATEMENT)
|
||||
|
|
|
@ -502,9 +502,7 @@
|
|||
# define HAVE_SETENV
|
||||
#define setenv(a,b,c) _putenv_s(a,b)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define PSAPI_VERSION 1 /* for GetProcessMemoryInfo() */
|
||||
|
||||
/*
|
||||
MySQL features
|
||||
|
|
|
@ -194,7 +194,7 @@ extern void my_large_free(uchar *ptr);
|
|||
#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_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? */
|
||||
#ifdef HAVE_ERRNO_AS_DEFINE
|
||||
|
|
|
@ -355,13 +355,16 @@ void my_thread_end(void)
|
|||
PSI_server->delete_current_thread();
|
||||
#endif
|
||||
|
||||
DBUG_POP();
|
||||
|
||||
pthread_setspecific(THR_KEY_mysys,0);
|
||||
|
||||
if (tmp && tmp->init)
|
||||
{
|
||||
#if !defined(DBUG_OFF)
|
||||
/* tmp->dbug is allocated inside DBUG library */
|
||||
if (tmp->dbug)
|
||||
{
|
||||
DBUG_POP();
|
||||
free(tmp->dbug);
|
||||
tmp->dbug=0;
|
||||
}
|
||||
|
@ -384,7 +387,6 @@ void my_thread_end(void)
|
|||
TRASH(tmp, sizeof(*tmp));
|
||||
free(tmp);
|
||||
}
|
||||
pthread_setspecific(THR_KEY_mysys,0);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
const uchar *buff_end= buff + length;
|
||||
engine_option_value *end;
|
||||
engine_option_value *UNINIT_VAR(end);
|
||||
MEM_ROOT *root= &share->mem_root;
|
||||
uint count;
|
||||
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].
|
||||
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 there is no dimention part then check the presence of
|
||||
|
|
Loading…
Add table
Reference in a new issue