@@ -156,33 +156,33 @@ static pthread_mutex_t LOCK_hostname;
156
156
my_bool metaphon_init (UDF_INIT * initid , UDF_ARGS * args , char * message );
157
157
void metaphon_deinit (UDF_INIT * initid );
158
158
char * metaphon (UDF_INIT * initid , UDF_ARGS * args , char * result ,
159
- unsigned long * length , char * is_null , char * error );
159
+ unsigned long * length , unsigned char * is_null , unsigned char * error );
160
160
my_bool myfunc_double_init (UDF_INIT * , UDF_ARGS * args , char * message );
161
- double myfunc_double (UDF_INIT * initid , UDF_ARGS * args , char * is_null ,
162
- char * error );
161
+ double myfunc_double (UDF_INIT * initid , UDF_ARGS * args , unsigned char * is_null ,
162
+ unsigned char * error );
163
163
my_bool myfunc_int_init (UDF_INIT * initid , UDF_ARGS * args , char * message );
164
- longlong myfunc_int (UDF_INIT * initid , UDF_ARGS * args , char * is_null ,
165
- char * error );
164
+ longlong myfunc_int (UDF_INIT * initid , UDF_ARGS * args , unsigned char * is_null ,
165
+ unsigned char * error );
166
166
my_bool udf_sequence_init (UDF_INIT * initid , UDF_ARGS * args , char * message );
167
167
void udf_sequence_deinit (UDF_INIT * initid );
168
- longlong udf_sequence (UDF_INIT * initid , UDF_ARGS * args , char * is_null ,
169
- char * error );
168
+ longlong udf_sequence (UDF_INIT * initid , UDF_ARGS * args , unsigned char * is_null ,
169
+ unsigned char * error );
170
170
my_bool avgcost_init ( UDF_INIT * initid , UDF_ARGS * args , char * message );
171
171
void avgcost_deinit ( UDF_INIT * initid );
172
- void avgcost_reset ( UDF_INIT * initid , UDF_ARGS * args , char * is_null , char * error );
173
- void avgcost_clear ( UDF_INIT * initid , char * is_null , char * error );
174
- void avgcost_add ( UDF_INIT * initid , UDF_ARGS * args , char * is_null , char * error );
175
- double avgcost ( UDF_INIT * initid , UDF_ARGS * args , char * is_null , char * error );
172
+ void avgcost_reset ( UDF_INIT * initid , UDF_ARGS * args , unsigned char * is_null , unsigned char * error );
173
+ void avgcost_clear ( UDF_INIT * initid , unsigned char * is_null , unsigned char * error );
174
+ void avgcost_add ( UDF_INIT * initid , UDF_ARGS * args , unsigned char * is_null , unsigned char * error );
175
+ double avgcost ( UDF_INIT * initid , UDF_ARGS * args , unsigned char * is_null , unsigned char * error );
176
176
my_bool avg2_init ( UDF_INIT * initid , UDF_ARGS * args , char * message );
177
177
void avg2_deinit ( UDF_INIT * initid );
178
- void avg2_reset ( UDF_INIT * initid , UDF_ARGS * args , char * is_null , char * error );
179
- void avg2_clear ( UDF_INIT * initid , char * is_null , char * error );
180
- void avg2_add ( UDF_INIT * initid , UDF_ARGS * args , char * is_null , char * error );
181
- void avg2_remove ( UDF_INIT * initid , UDF_ARGS * args , char * is_null , char * error );
182
- double avg2 ( UDF_INIT * initid , UDF_ARGS * args , char * is_null , char * error );
178
+ void avg2_reset ( UDF_INIT * initid , UDF_ARGS * args , unsigned char * is_null , unsigned char * error );
179
+ void avg2_clear ( UDF_INIT * initid , unsigned char * is_null , unsigned char * error );
180
+ void avg2_add ( UDF_INIT * initid , UDF_ARGS * args , unsigned char * is_null , unsigned char * error );
181
+ void avg2_remove ( UDF_INIT * initid , UDF_ARGS * args , unsigned char * is_null , unsigned char * error );
182
+ double avg2 ( UDF_INIT * initid , UDF_ARGS * args , unsigned char * is_null , unsigned char * error );
183
183
my_bool is_const_init (UDF_INIT * initid , UDF_ARGS * args , char * message );
184
184
char * is_const (UDF_INIT * initid , UDF_ARGS * args , char * result , unsigned long
185
- * length , char * is_null , char * error );
185
+ * length , unsigned char * is_null , unsigned char * error );
186
186
187
187
188
188
/*************************************************************************
@@ -292,7 +292,7 @@ static char codes[26] = {
292
292
293
293
char * metaphon (UDF_INIT * initid __attribute__((unused )),
294
294
UDF_ARGS * args , char * result , unsigned long * length ,
295
- char * is_null , char * error __attribute__((unused )))
295
+ unsigned char * is_null , unsigned char * error __attribute__((unused )))
296
296
{
297
297
const char * word = args -> args [0 ];
298
298
const char * w_end ;
@@ -568,7 +568,7 @@ my_bool myfunc_double_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
568
568
569
569
570
570
double myfunc_double (UDF_INIT * initid __attribute__((unused )), UDF_ARGS * args ,
571
- char * is_null , char * error __attribute__((unused )))
571
+ unsigned char * is_null , unsigned char * error __attribute__((unused )))
572
572
{
573
573
unsigned long val = 0 ;
574
574
unsigned long v = 0 ;
@@ -607,8 +607,8 @@ double myfunc_double(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
607
607
/* This function returns the sum of all arguments */
608
608
609
609
longlong myfunc_int (UDF_INIT * initid __attribute__((unused )), UDF_ARGS * args ,
610
- char * is_null __attribute__((unused )),
611
- char * error __attribute__((unused )))
610
+ unsigned char * is_null __attribute__((unused )),
611
+ unsigned char * error __attribute__((unused )))
612
612
{
613
613
longlong val = 0 ;
614
614
uint i ;
@@ -681,8 +681,8 @@ void udf_sequence_deinit(UDF_INIT *initid)
681
681
}
682
682
683
683
longlong udf_sequence (UDF_INIT * initid __attribute__((unused )), UDF_ARGS * args ,
684
- char * is_null __attribute__((unused )),
685
- char * error __attribute__((unused )))
684
+ unsigned char * is_null __attribute__((unused )),
685
+ unsigned char * error __attribute__((unused )))
686
686
{
687
687
ulonglong val = 0 ;
688
688
if (args -> arg_count )
@@ -712,11 +712,11 @@ longlong udf_sequence(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
712
712
my_bool lookup_init (UDF_INIT * initid , UDF_ARGS * args , char * message );
713
713
void lookup_deinit (UDF_INIT * initid );
714
714
char * lookup (UDF_INIT * initid , UDF_ARGS * args , char * result ,
715
- unsigned long * length , char * null_value , char * error );
715
+ unsigned long * length , unsigned char * null_value , unsigned char * error );
716
716
my_bool reverse_lookup_init (UDF_INIT * initid , UDF_ARGS * args , char * message );
717
717
void reverse_lookup_deinit (UDF_INIT * initid );
718
718
char * reverse_lookup (UDF_INIT * initid , UDF_ARGS * args , char * result ,
719
- unsigned long * length , char * null_value , char * error );
719
+ unsigned long * length , unsigned char * null_value , unsigned char * error );
720
720
721
721
722
722
/****************************************************************************
@@ -750,8 +750,8 @@ void lookup_deinit(UDF_INIT *initid __attribute__((unused)))
750
750
}
751
751
752
752
char * lookup (UDF_INIT * initid __attribute__((unused )), UDF_ARGS * args ,
753
- char * result , unsigned long * res_length , char * null_value ,
754
- char * error __attribute__((unused )))
753
+ char * result , unsigned long * res_length , unsigned char * null_value ,
754
+ unsigned char * error __attribute__((unused )))
755
755
{
756
756
uint length ;
757
757
char name_buff [256 ];
@@ -831,7 +831,7 @@ void reverse_lookup_deinit(UDF_INIT *initid __attribute__((unused)))
831
831
832
832
char * reverse_lookup (UDF_INIT * initid __attribute__((unused )), UDF_ARGS * args ,
833
833
char * result , unsigned long * res_length ,
834
- char * null_value , char * error __attribute__((unused )))
834
+ unsigned char * null_value , unsigned char * error __attribute__((unused )))
835
835
{
836
836
#if defined(HAVE_GETHOSTBYADDR_R ) && defined(HAVE_SOLARIS_STYLE_GETHOST )
837
837
char name_buff [256 ];
@@ -974,7 +974,7 @@ avgcost_deinit( UDF_INIT* initid )
974
974
975
975
/* This is only for MySQL 4.0 compatibility */
976
976
void
977
- avgcost_reset (UDF_INIT * initid , UDF_ARGS * args , char * is_null , char * message )
977
+ avgcost_reset (UDF_INIT * initid , UDF_ARGS * args , unsigned char * is_null , unsigned char * message )
978
978
{
979
979
avgcost_clear (initid , is_null , message );
980
980
avgcost_add (initid , args , is_null , message );
@@ -983,8 +983,8 @@ avgcost_reset(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* message)
983
983
/* This is needed to get things to work in MySQL 4.1.1 and above */
984
984
985
985
void
986
- avgcost_clear (UDF_INIT * initid , char * is_null __attribute__((unused )),
987
- char * message __attribute__((unused )))
986
+ avgcost_clear (UDF_INIT * initid , unsigned char * is_null __attribute__((unused )),
987
+ unsigned char * message __attribute__((unused )))
988
988
{
989
989
struct avgcost_data * data = (struct avgcost_data * )initid -> ptr ;
990
990
data -> totalprice = 0.0 ;
@@ -995,8 +995,8 @@ avgcost_clear(UDF_INIT* initid, char* is_null __attribute__((unused)),
995
995
996
996
void
997
997
avgcost_add (UDF_INIT * initid , UDF_ARGS * args ,
998
- char * is_null __attribute__((unused )),
999
- char * message __attribute__((unused )))
998
+ unsigned char * is_null __attribute__((unused )),
999
+ unsigned char * message __attribute__((unused )))
1000
1000
{
1001
1001
if (args -> args [0 ] && args -> args [1 ])
1002
1002
{
@@ -1043,7 +1043,7 @@ avgcost_add(UDF_INIT* initid, UDF_ARGS* args,
1043
1043
1044
1044
double
1045
1045
avgcost ( UDF_INIT * initid , UDF_ARGS * args __attribute__((unused )),
1046
- char * is_null , char * error __attribute__((unused )))
1046
+ unsigned char * is_null , unsigned char * error __attribute__((unused )))
1047
1047
{
1048
1048
struct avgcost_data * data = (struct avgcost_data * )initid -> ptr ;
1049
1049
if (!data -> count || !data -> totalquantity )
@@ -1121,7 +1121,8 @@ avg2_deinit( UDF_INIT* initid )
1121
1121
1122
1122
/* This is only for MySQL 4.0 compatibility */
1123
1123
void
1124
- avg2_reset (UDF_INIT * initid , UDF_ARGS * args , char * is_null , char * message )
1124
+ avg2_reset (UDF_INIT * initid , UDF_ARGS * args , unsigned char * is_null ,
1125
+ unsigned char * message )
1125
1126
{
1126
1127
avgcost_clear (initid , is_null , message );
1127
1128
avgcost_add (initid , args , is_null , message );
@@ -1130,8 +1131,8 @@ avg2_reset(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* message)
1130
1131
/* This is needed to get things to work in MySQL 4.1.1 and above */
1131
1132
1132
1133
void
1133
- avg2_clear (UDF_INIT * initid , char * is_null __attribute__((unused )),
1134
- char * message __attribute__((unused )))
1134
+ avg2_clear (UDF_INIT * initid , unsigned char * is_null __attribute__((unused )),
1135
+ unsigned char * message __attribute__((unused )))
1135
1136
{
1136
1137
struct avg2_data * data = (struct avg2_data * )initid -> ptr ;
1137
1138
data -> sum = 0.0 ;
@@ -1141,8 +1142,8 @@ avg2_clear(UDF_INIT* initid, char* is_null __attribute__((unused)),
1141
1142
1142
1143
void
1143
1144
avg2_add (UDF_INIT * initid , UDF_ARGS * args ,
1144
- char * is_null __attribute__((unused )),
1145
- char * message __attribute__((unused )))
1145
+ unsigned char * is_null __attribute__((unused )),
1146
+ unsigned char * message __attribute__((unused )))
1146
1147
{
1147
1148
if (args -> args [0 ] && args -> args [1 ])
1148
1149
{
@@ -1158,8 +1159,8 @@ avg2_add(UDF_INIT* initid, UDF_ARGS* args,
1158
1159
1159
1160
void
1160
1161
avg2_remove (UDF_INIT * initid , UDF_ARGS * args ,
1161
- char * is_null __attribute__((unused )),
1162
- char * message __attribute__((unused )))
1162
+ unsigned char * is_null __attribute__((unused )),
1163
+ unsigned char * message __attribute__((unused )))
1163
1164
{
1164
1165
if (args -> args [0 ] && args -> args [1 ])
1165
1166
{
@@ -1174,8 +1175,8 @@ avg2_remove(UDF_INIT* initid, UDF_ARGS* args,
1174
1175
1175
1176
1176
1177
double
1177
- avg2 ( UDF_INIT * initid , UDF_ARGS * args __attribute__((unused )),
1178
- char * is_null , char * error __attribute__((unused )))
1178
+ avg2 (UDF_INIT * initid , UDF_ARGS * args __attribute__((unused )),
1179
+ unsigned char * is_null , unsigned char * error __attribute__((unused )))
1179
1180
{
1180
1181
struct avg2_data * data = (struct avg2_data * )initid -> ptr ;
1181
1182
if (!data -> count )
@@ -1191,8 +1192,8 @@ avg2( UDF_INIT* initid, UDF_ARGS* args __attribute__((unused)),
1191
1192
my_bool myfunc_argument_name_init (UDF_INIT * initid , UDF_ARGS * args ,
1192
1193
char * message );
1193
1194
char * myfunc_argument_name (UDF_INIT * initid , UDF_ARGS * args , char * result ,
1194
- unsigned long * length , char * null_value ,
1195
- char * error );
1195
+ unsigned long * length , unsigned char * null_value ,
1196
+ unsigned char * error );
1196
1197
1197
1198
my_bool myfunc_argument_name_init (UDF_INIT * initid , UDF_ARGS * args ,
1198
1199
char * message )
@@ -1210,8 +1211,8 @@ my_bool myfunc_argument_name_init(UDF_INIT *initid, UDF_ARGS *args,
1210
1211
1211
1212
char * myfunc_argument_name (UDF_INIT * initid __attribute__((unused )),
1212
1213
UDF_ARGS * args , char * result ,
1213
- unsigned long * length , char * null_value ,
1214
- char * error __attribute__((unused )))
1214
+ unsigned long * length , unsigned char * null_value ,
1215
+ unsigned char * error __attribute__((unused )))
1215
1216
{
1216
1217
if (!args -> attributes [0 ])
1217
1218
{
@@ -1241,7 +1242,7 @@ my_bool is_const_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
1241
1242
1242
1243
char * is_const (UDF_INIT * initid , UDF_ARGS * args __attribute__((unused )),
1243
1244
char * result , unsigned long * length ,
1244
- char * is_null , char * error __attribute__((unused )))
1245
+ unsigned char * is_null ,unsigned char * error __attribute__((unused )))
1245
1246
{
1246
1247
if (initid -> ptr != 0 ) {
1247
1248
sprintf (result , "const" );
@@ -1280,7 +1281,7 @@ my_bool check_const_len_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
1280
1281
1281
1282
char * check_const_len (UDF_INIT * initid , UDF_ARGS * args __attribute__((unused )),
1282
1283
char * result , unsigned long * length ,
1283
- char * is_null , char * error __attribute__((unused )))
1284
+ unsigned char * is_null ,unsigned char * error __attribute__((unused )))
1284
1285
{
1285
1286
strmov (result , initid -> ptr );
1286
1287
* length = (uint ) strlen (result );
0 commit comments