mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed compiler and valgrind warnings
mysql-test/valgrind.supp: Added suppression for memory leak in dlsym() on work-amd64 plugin/auth/auth_socket.c: Fixed compiler warning (wrong macro usage) storage/example/ha_example.cc: Fixed compiler warnings storage/sphinx/ha_sphinx.cc: Fixed compiler warnings
This commit is contained in:
@ -539,6 +539,15 @@
|
||||
fun:_Unwind_ForcedUnwind
|
||||
}
|
||||
|
||||
{
|
||||
dlsym memory loss from plugin
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
fun:_dl_signal_error
|
||||
fun:_dl_signal_error
|
||||
fun:_dl_lookup_symbol_x
|
||||
}
|
||||
|
||||
#
|
||||
# Reading wrong addresses on SuSe Linux 10.3 32 bit
|
||||
#
|
||||
|
@ -115,5 +115,5 @@ maria_declare_plugin(socket_auth)
|
||||
"1.0",
|
||||
MariaDB_PLUGIN_MATURITY_BETA
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
maria_declare_plugin_end;
|
||||
|
||||
|
@ -162,7 +162,9 @@ static LEX_STRING old_password_plugin_name= {
|
||||
LEX_STRING *default_auth_plugin_name= &native_password_plugin_name;
|
||||
|
||||
static plugin_ref native_password_plugin;
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
static plugin_ref old_password_plugin;
|
||||
#endif
|
||||
|
||||
/* Classes */
|
||||
|
||||
|
@ -367,8 +367,10 @@ int ha_example::open(const char *name, int mode, uint test_if_locked)
|
||||
DBUG_RETURN(1);
|
||||
thr_lock_data_init(&share->lock,&lock,NULL);
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
example_table_options_struct *options=
|
||||
(example_table_options_struct *)table->s->option_struct;
|
||||
#endif
|
||||
|
||||
DBUG_ASSERT(options);
|
||||
DBUG_PRINT("info", ("strparam: '%-.64s' ullparam: %llu enumparam: %u "\
|
||||
@ -896,6 +898,7 @@ ha_rows ha_example::records_in_range(uint inx, key_range *min_key,
|
||||
int ha_example::create(const char *name, TABLE *table_arg,
|
||||
HA_CREATE_INFO *create_info)
|
||||
{
|
||||
#ifndef DBUG_OFF
|
||||
example_table_options_struct *options=
|
||||
(example_table_options_struct *)table_arg->s->option_struct;
|
||||
DBUG_ENTER("ha_example::create");
|
||||
@ -918,10 +921,10 @@ int ha_example::create(const char *name, TABLE *table_arg,
|
||||
(field_options->compex_param_to_parse_it_in_engine ?
|
||||
field_options->compex_param_to_parse_it_in_engine :
|
||||
"<NULL>")));
|
||||
|
||||
}
|
||||
|
||||
DBUG_RETURN(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -972,8 +972,8 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate )
|
||||
}
|
||||
|
||||
char * sScheme = NULL;
|
||||
char * sHost = SPHINXSE_DEFAULT_HOST;
|
||||
char * sIndex = SPHINXSE_DEFAULT_INDEX;
|
||||
char * sHost = (char*) SPHINXSE_DEFAULT_HOST;
|
||||
char * sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
|
||||
int iPort = SPHINXSE_DEFAULT_PORT;
|
||||
|
||||
bool bOk = true;
|
||||
@ -993,12 +993,12 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate )
|
||||
// unix-domain socket
|
||||
iPort = 0;
|
||||
if (!( sIndex = strrchr ( sHost, ':' ) ))
|
||||
sIndex = SPHINXSE_DEFAULT_INDEX;
|
||||
sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
|
||||
else
|
||||
{
|
||||
*sIndex++ = '\0';
|
||||
if ( !*sIndex )
|
||||
sIndex = SPHINXSE_DEFAULT_INDEX;
|
||||
sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
|
||||
}
|
||||
bOk = true;
|
||||
break;
|
||||
@ -1018,7 +1018,7 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate )
|
||||
if ( sIndex )
|
||||
*sIndex++ = '\0';
|
||||
else
|
||||
sIndex = SPHINXSE_DEFAULT_INDEX;
|
||||
sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
|
||||
|
||||
iPort = atoi(sPort);
|
||||
if ( !iPort )
|
||||
@ -1030,7 +1030,7 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate )
|
||||
if ( sIndex )
|
||||
*sIndex++ = '\0';
|
||||
else
|
||||
sIndex = SPHINXSE_DEFAULT_INDEX;
|
||||
sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
|
||||
}
|
||||
|
||||
bOk = true;
|
||||
@ -1150,37 +1150,37 @@ static handler * sphinx_create_handler ( handlerton * hton, TABLE_SHARE * table,
|
||||
CSphSEQuery::CSphSEQuery ( const char * sQuery, int iLength, const char * sIndex )
|
||||
: m_sHost ( "" )
|
||||
, m_iPort ( 0 )
|
||||
, m_sIndex ( sIndex ? sIndex : "*" )
|
||||
, m_sIndex ( sIndex ? sIndex : (char*) "*" )
|
||||
, m_iOffset ( 0 )
|
||||
, m_iLimit ( 20 )
|
||||
, m_bQuery ( false )
|
||||
, m_sQuery ( "" )
|
||||
, m_sQuery ( (char*) "" )
|
||||
, m_pWeights ( NULL )
|
||||
, m_iWeights ( 0 )
|
||||
, m_eMode ( SPH_MATCH_ALL )
|
||||
, m_eRanker ( SPH_RANK_PROXIMITY_BM25 )
|
||||
, m_eSort ( SPH_SORT_RELEVANCE )
|
||||
, m_sSortBy ( "" )
|
||||
, m_sSortBy ( (char*) "" )
|
||||
, m_iMaxMatches ( 1000 )
|
||||
, m_iMaxQueryTime ( 0 )
|
||||
, m_iMinID ( 0 )
|
||||
, m_iMaxID ( 0 )
|
||||
, m_iFilters ( 0 )
|
||||
, m_eGroupFunc ( SPH_GROUPBY_DAY )
|
||||
, m_sGroupBy ( "" )
|
||||
, m_sGroupSortBy ( "@group desc" )
|
||||
, m_sGroupBy ( (char*) "" )
|
||||
, m_sGroupSortBy ( (char*) "@group desc" )
|
||||
, m_iCutoff ( 0 )
|
||||
, m_iRetryCount ( 0 )
|
||||
, m_iRetryDelay ( 0 )
|
||||
, m_sGroupDistinct ( "" )
|
||||
, m_sGroupDistinct ( (char*) "" )
|
||||
, m_iIndexWeights ( 0 )
|
||||
, m_iFieldWeights ( 0 )
|
||||
, m_bGeoAnchor ( false )
|
||||
, m_sGeoLatAttr ( "" )
|
||||
, m_sGeoLongAttr ( "" )
|
||||
, m_sGeoLatAttr ( (char*) "" )
|
||||
, m_sGeoLongAttr ( (char*) "" )
|
||||
, m_fGeoLatitude ( 0.0f )
|
||||
, m_fGeoLongitude ( 0.0f )
|
||||
, m_sComment ( "" )
|
||||
, m_sComment ( (char*) "" )
|
||||
|
||||
, m_pBuf ( NULL )
|
||||
, m_pCur ( NULL )
|
||||
@ -1622,7 +1622,7 @@ bool CSphSEQuery::ParseField ( char * sField )
|
||||
{ "float", SPH_ATTR_FLOAT },
|
||||
{ "bigint", SPH_ATTR_BIGINT }
|
||||
};
|
||||
for ( int i=0; i<sizeof(dAttrTypes)/sizeof(*dAttrTypes); i++ )
|
||||
for ( uint i=0; i<sizeof(dAttrTypes)/sizeof(*dAttrTypes); i++ )
|
||||
if ( !strncmp( sType, dAttrTypes[i].m_sName, sRest - sType ) )
|
||||
{
|
||||
iType = dAttrTypes[i].m_iType;
|
||||
|
Reference in New Issue
Block a user