Corrected faulty #if tests in udf_example.cc which made udf_test crash the server on some
platforms. sql/udf_example.cc: Corrected faulty #if tests which made udf_test crash the server on some platforms.
This commit is contained in:
parent
24937ffc14
commit
fddddc2c23
@ -681,7 +681,7 @@ my_bool lookup_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
|
||||
}
|
||||
initid->max_length=11;
|
||||
initid->maybe_null=1;
|
||||
#if !defined(HAVE_GETHOSTBYADDR_R) && defined(HAVE_SOLARIS_STYLE_GETHOST)
|
||||
#if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_SOLARIS_STYLE_GETHOST)
|
||||
(void) pthread_mutex_init(&LOCK_hostname,MY_MUTEX_INIT_SLOW);
|
||||
#endif
|
||||
return 0;
|
||||
@ -689,7 +689,7 @@ my_bool lookup_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
|
||||
|
||||
void lookup_deinit(UDF_INIT *initid)
|
||||
{
|
||||
#if !defined(HAVE_GETHOSTBYADDR_R) && defined(HAVE_SOLARIS_STYLE_GETHOST)
|
||||
#if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_SOLARIS_STYLE_GETHOST)
|
||||
(void) pthread_mutex_destroy(&LOCK_hostname);
|
||||
#endif
|
||||
}
|
||||
@ -756,7 +756,7 @@ my_bool reverse_lookup_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
|
||||
}
|
||||
initid->max_length=32;
|
||||
initid->maybe_null=1;
|
||||
#if !defined(HAVE_GETHOSTBYADDR_R) && defined(HAVE_SOLARIS_STYLE_GETHOST)
|
||||
#if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_SOLARIS_STYLE_GETHOST)
|
||||
(void) pthread_mutex_init(&LOCK_hostname,MY_MUTEX_INIT_SLOW);
|
||||
#endif
|
||||
return 0;
|
||||
@ -764,7 +764,7 @@ my_bool reverse_lookup_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
|
||||
|
||||
void reverse_lookup_deinit(UDF_INIT *initid)
|
||||
{
|
||||
#if !defined(HAVE_GETHOSTBYADDR_R) && defined(HAVE_SOLARIS_STYLE_GETHOST)
|
||||
#if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_SOLARIS_STYLE_GETHOST)
|
||||
(void) pthread_mutex_destroy(&LOCK_hostname);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user