Skip to content

Commit 44157eb

Browse files
convert my_bool data type to bool for MySQL v8 compatibility (https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html#mysqld-8-0-1-compiling)
1 parent 5ebc1bc commit 44157eb

8 files changed

+21
-21
lines changed

Diff for: lib_mysqludf_preg_capture.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
/*
121121
* Public function declarations:
122122
*/
123-
my_bool preg_capture_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
123+
bool preg_capture_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
124124
char *preg_capture( UDF_INIT *initid __attribute__((unused)),
125125
UDF_ARGS *args, char *result, unsigned long *length,
126126
char *is_null __attribute__((unused)),
@@ -129,7 +129,7 @@ void preg_capture_deinit( UDF_INIT* initid );
129129

130130

131131
/**
132-
* @fn my_bool preg_capture_init(UDF_INIT *initid, UDF_ARGS *args,
132+
* @fn bool preg_capture_init(UDF_INIT *initid, UDF_ARGS *args,
133133
* char *message)
134134
*
135135
* @brief
@@ -150,7 +150,7 @@ void preg_capture_deinit( UDF_INIT* initid );
150150
* It also checks to make sure there are at least arguments, and checks
151151
* the type of the 'group' and 'occurence' arguments.
152152
*/
153-
my_bool preg_capture_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
153+
bool preg_capture_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
154154
{
155155
if (args->arg_count < 2)
156156
{

Diff for: lib_mysqludf_preg_check.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
/**
8888
* Public function declarations:
8989
*/
90-
my_bool preg_check_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
90+
bool preg_check_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
9191
longlong preg_check(UDF_INIT *initid __attribute__((unused)),
9292
UDF_ARGS *args,
9393
char *is_null __attribute__((unused)),
@@ -100,7 +100,7 @@ void preg_check_deinit( UDF_INIT* initid );
100100
*/
101101

102102
/**
103-
* @fn my_bool preg_check_init(UDF_INIT *initid, UDF_ARGS *args,
103+
* @fn bool preg_check_init(UDF_INIT *initid, UDF_ARGS *args,
104104
* char *message)
105105
*
106106
* @brief
@@ -120,7 +120,7 @@ void preg_check_deinit( UDF_INIT* initid );
120120
* @details This function checks to make sure there is 1 argument. It
121121
* then call pregInit to perform the common initializations.
122122
*/
123-
my_bool preg_check_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
123+
bool preg_check_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
124124
{
125125
if (args->arg_count != 1)
126126
{

Diff for: lib_mysqludf_preg_info.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
/**
6565
* Public function declarations:
6666
*/
67-
my_bool lib_mysqludf_preg_info_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
67+
bool lib_mysqludf_preg_info_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
6868
char *lib_mysqludf_preg_info(UDF_INIT *initid __attribute__((unused)),
6969
UDF_ARGS *args,
7070
char *result, unsigned long *length,
@@ -79,7 +79,7 @@ void lib_mysqludf_info_deinit( UDF_INIT* initid );
7979

8080

8181
/**
82-
* @fn my_bool lib_mysqludf_preg_info_init(UDF_INIT *initid, UDF_ARGS *args,
82+
* @fn bool lib_mysqludf_preg_info_init(UDF_INIT *initid, UDF_ARGS *args,
8383
* char *message)
8484
*
8585
* @brief
@@ -98,7 +98,7 @@ void lib_mysqludf_info_deinit( UDF_INIT* initid );
9898
*
9999
* @details This function checks to make sure there are no arguments.
100100
*/
101-
my_bool lib_mysqludf_preg_info_init(UDF_INIT *initid, UDF_ARGS *args,
101+
bool lib_mysqludf_preg_info_init(UDF_INIT *initid, UDF_ARGS *args,
102102
char *message)
103103
{
104104
if (args->arg_count != 0)

Diff for: lib_mysqludf_preg_position.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
/*
110110
* Public function declarations:
111111
*/
112-
my_bool preg_position_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
112+
bool preg_position_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
113113
longlong preg_position(UDF_INIT *initid __attribute__((unused)),
114114
UDF_ARGS *args,
115115
char *is_null __attribute__((unused)),
@@ -118,7 +118,7 @@ void preg_position_deinit( UDF_INIT* initid );
118118

119119

120120
/**
121-
* @fn my_bool preg_position_init(UDF_INIT *initid, UDF_ARGS *args,
121+
* @fn bool preg_position_init(UDF_INIT *initid, UDF_ARGS *args,
122122
* char *message)
123123
*
124124
* @brief
@@ -139,7 +139,7 @@ void preg_position_deinit( UDF_INIT* initid );
139139
* It also checks to make sure there are at least arguments, and checks
140140
* the type of the 'group' and 'occurence' arguments.
141141
*/
142-
my_bool preg_position_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
142+
bool preg_position_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
143143
{
144144
if (args->arg_count < 2)
145145
{

Diff for: lib_mysqludf_preg_replace.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
/*
100100
* Public function declarations:
101101
*/
102-
my_bool preg_replace_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
102+
bool preg_replace_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
103103
char *preg_replace( UDF_INIT *initid __attribute__((unused)),
104104
UDF_ARGS *args, char *result, unsigned long *length,
105105
char *is_null __attribute__((unused)),
@@ -108,7 +108,7 @@ void preg_replace_deinit( UDF_INIT* initid );
108108

109109

110110
/**
111-
* @fn my_bool preg_replace_init(UDF_INIT *initid, UDF_ARGS *args,
111+
* @fn bool preg_replace_init(UDF_INIT *initid, UDF_ARGS *args,
112112
* char *message)
113113
*
114114
* @brief
@@ -130,7 +130,7 @@ void preg_replace_deinit( UDF_INIT* initid );
130130
* Then it checks to make sure there are 3 arguments. The 4th argument
131131
* must be a number.
132132
*/
133-
my_bool preg_replace_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
133+
bool preg_replace_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
134134
{
135135
if (args->arg_count < 3)
136136
{

Diff for: lib_mysqludf_preg_rlike.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
/**
8888
* Public function declarations:
8989
*/
90-
my_bool preg_rlike_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
90+
bool preg_rlike_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
9191
longlong preg_rlike(UDF_INIT *initid __attribute__((unused)),
9292
UDF_ARGS *args,
9393
char *is_null __attribute__((unused)),
@@ -100,7 +100,7 @@ void preg_rlike_deinit( UDF_INIT* initid );
100100
*/
101101

102102
/**
103-
* @fn my_bool preg_rlike_init(UDF_INIT *initid, UDF_ARGS *args,
103+
* @fn bool preg_rlike_init(UDF_INIT *initid, UDF_ARGS *args,
104104
* char *message)
105105
*
106106
* @brief
@@ -120,7 +120,7 @@ void preg_rlike_deinit( UDF_INIT* initid );
120120
* @details This function checks to make sure there are 2 arguments. It
121121
* then call pregInit to perform the common initializations.
122122
*/
123-
my_bool preg_rlike_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
123+
bool preg_rlike_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
124124
{
125125
if (args->arg_count != 2)
126126
{

Diff for: preg.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void pregDeInit(UDF_INIT *initid)
319319

320320

321321
/**
322-
* @fn my_bool pregInit(UDF_INIT *initid, UDF_ARGS *args, char *message)
322+
* @fn bool pregInit(UDF_INIT *initid, UDF_ARGS *args, char *message)
323323
*
324324
* @brief
325325
* Perform the init stuff common to all preg routines
@@ -341,7 +341,7 @@ void pregDeInit(UDF_INIT *initid)
341341
* and compiling the first argument (the pattern) if it
342342
* is a constant.
343343
*/
344-
my_bool pregInit(UDF_INIT *initid, UDF_ARGS *args, char *message)
344+
bool pregInit(UDF_INIT *initid, UDF_ARGS *args, char *message)
345345
{
346346
struct preg_s *ptr; /* temp holder of initid->ptr */
347347
int i ;

Diff for: preg.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ char *pregReplace(pcre *re , pcre_extra *extra ,
6363
// preg.c
6464
void destroyPtrInfo( struct preg_s *ghptr );
6565
int initPtrInfo( struct preg_s *ghptr , UDF_ARGS *args,char*msg );
66-
my_bool pregInit(UDF_INIT *initid, UDF_ARGS *args, char *message);
66+
bool pregInit(UDF_INIT *initid, UDF_ARGS *args, char *message);
6767
pcre *pregCompileRegexArg( UDF_ARGS *args , char *msg , int msglen ) ;
6868
int pregCopyToReturnBuffer( struct preg_s *ptr , char *s , int l );
6969
void pregDeInit(UDF_INIT *initid) ;

0 commit comments

Comments
 (0)