@@ -1748,7 +1748,8 @@ int cat_file(DYNAMIC_STRING* ds, const char* filename)
1748
1748
len= (size_t ) my_seek (fd, 0 , SEEK_END, MYF (0 ));
1749
1749
my_seek (fd, 0 , SEEK_SET, MYF (0 ));
1750
1750
if (len == (size_t )MY_FILEPOS_ERROR ||
1751
- !(buff= (char *)my_malloc (PSI_NOT_INSTRUMENTED, len + 1 , MYF (0 ))))
1751
+ !(buff= (char *)my_malloc (PSI_NOT_INSTRUMENTED, len + 1 ,
1752
+ MYF (MY_WME|MY_FAE))))
1752
1753
{
1753
1754
my_close (fd, MYF (0 ));
1754
1755
return 1 ;
@@ -2407,7 +2408,7 @@ VAR *var_init(VAR *v, const char *name, size_t name_len, const char *val, size_t
2407
2408
val_len= 0 ;
2408
2409
val_alloc_len = val_len + 16 ; /* room to grow */
2409
2410
if (!(tmp_var=v) && !(tmp_var = (VAR*)my_malloc (PSI_NOT_INSTRUMENTED, sizeof (*tmp_var)
2410
- + name_len+2 , MYF (MY_WME))))
2411
+ + name_len+2 , MYF (MY_WME|MY_FAE ))))
2411
2412
die (" Out of memory" );
2412
2413
2413
2414
if (name != NULL )
@@ -2421,7 +2422,8 @@ VAR *var_init(VAR *v, const char *name, size_t name_len, const char *val, size_t
2421
2422
2422
2423
tmp_var->alloced = (v == 0 );
2423
2424
2424
- if (!(tmp_var->str_val = (char *)my_malloc (PSI_NOT_INSTRUMENTED, val_alloc_len+1 , MYF (MY_WME))))
2425
+ if (!(tmp_var->str_val = (char *)my_malloc (PSI_NOT_INSTRUMENTED,
2426
+ val_alloc_len+1 , MYF (MY_WME|MY_FAE))))
2425
2427
die (" Out of memory" );
2426
2428
2427
2429
if (val)
@@ -2969,8 +2971,10 @@ void var_copy(VAR *dest, VAR *src)
2969
2971
/* Alloc/realloc data for str_val in dest */
2970
2972
if (dest->alloced_len < src->alloced_len &&
2971
2973
!(dest->str_val = dest->str_val
2972
- ? (char *)my_realloc (PSI_NOT_INSTRUMENTED, dest->str_val , src->alloced_len , MYF (MY_WME))
2973
- : (char *)my_malloc (PSI_NOT_INSTRUMENTED, src->alloced_len , MYF (MY_WME))))
2974
+ ? (char *)my_realloc (PSI_NOT_INSTRUMENTED, dest->str_val , src->alloced_len ,
2975
+ MYF (MY_WME|MY_FAE))
2976
+ : (char *)my_malloc (PSI_NOT_INSTRUMENTED, src->alloced_len ,
2977
+ MYF (MY_WME|MY_FAE))))
2974
2978
die (" Out of memory" );
2975
2979
else
2976
2980
dest->alloced_len = src->alloced_len ;
@@ -3047,8 +3051,10 @@ void eval_expr(VAR *v, const char *p, const char **p_end,
3047
3051
MIN_VAR_ALLOC : new_val_len + 1 ;
3048
3052
if (!(v->str_val =
3049
3053
v->str_val ?
3050
- (char *)my_realloc (PSI_NOT_INSTRUMENTED, v->str_val , v->alloced_len +1 , MYF (MY_WME)) :
3051
- (char *)my_malloc (PSI_NOT_INSTRUMENTED, v->alloced_len +1 , MYF (MY_WME))))
3054
+ (char *)my_realloc (PSI_NOT_INSTRUMENTED, v->str_val , v->alloced_len +1 ,
3055
+ MYF (MY_WME|MY_FAE)) :
3056
+ (char *)my_malloc (PSI_NOT_INSTRUMENTED, v->alloced_len +1 ,
3057
+ MYF (MY_WME|MY_FAE))))
3052
3058
die (" Out of memory" );
3053
3059
}
3054
3060
v->str_val_len = new_val_len;
@@ -4834,7 +4840,8 @@ void do_sync_with_master(struct st_command *command)
4834
4840
p++;
4835
4841
while (*p && my_isspace (charset_info, *p))
4836
4842
p++;
4837
- start= buff= (char *)my_malloc (PSI_NOT_INSTRUMENTED, strlen (p)+1 ,MYF (MY_WME | MY_FAE));
4843
+ start= buff= (char *)my_malloc (PSI_NOT_INSTRUMENTED, strlen (p)+1 ,
4844
+ MYF (MY_WME|MY_FAE));
4838
4845
get_string (&buff, &p, command);
4839
4846
}
4840
4847
command->last_argument = p;
@@ -6987,7 +6994,7 @@ int read_command(struct st_command** command_ptr)
6987
6994
}
6988
6995
if (!(*command_ptr= command=
6989
6996
(struct st_command *) my_malloc (PSI_NOT_INSTRUMENTED, sizeof (*command),
6990
- MYF (MY_WME|MY_ZEROFILL))) ||
6997
+ MYF (MY_WME|MY_FAE| MY_ZEROFILL))) ||
6991
6998
insert_dynamic (&q_lines, &command))
6992
6999
die (" Out of memory" );
6993
7000
command->type = Q_UNKNOWN;
@@ -7695,18 +7702,19 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
7695
7702
7696
7703
/* Allocate array with bind structs, lengths and NULL flags */
7697
7704
my_bind= (MYSQL_BIND*) my_malloc (PSI_NOT_INSTRUMENTED, num_fields * sizeof (MYSQL_BIND),
7698
- MYF (MY_WME | MY_FAE | MY_ZEROFILL));
7705
+ MYF (MY_WME| MY_FAE| MY_ZEROFILL));
7699
7706
length= (ulong*) my_malloc (PSI_NOT_INSTRUMENTED, num_fields * sizeof (ulong),
7700
- MYF (MY_WME | MY_FAE));
7707
+ MYF (MY_WME| MY_FAE));
7701
7708
is_null= (my_bool*) my_malloc (PSI_NOT_INSTRUMENTED, num_fields * sizeof (my_bool),
7702
- MYF (MY_WME | MY_FAE));
7709
+ MYF (MY_WME| MY_FAE));
7703
7710
7704
7711
/* Allocate data for the result of each field */
7705
7712
for (i= 0 ; i < num_fields; i++)
7706
7713
{
7707
7714
uint max_length= fields[i].max_length + 1 ;
7708
7715
my_bind[i].buffer_type = MYSQL_TYPE_STRING;
7709
- my_bind[i].buffer = my_malloc (PSI_NOT_INSTRUMENTED, max_length, MYF (MY_WME | MY_FAE));
7716
+ my_bind[i].buffer = my_malloc (PSI_NOT_INSTRUMENTED, max_length,
7717
+ MYF (MY_WME|MY_FAE));
7710
7718
my_bind[i].buffer_length = max_length;
7711
7719
my_bind[i].is_null = &is_null[i];
7712
7720
my_bind[i].length = &length[i];
@@ -8730,7 +8738,7 @@ void run_bind_stmt(struct st_connection *cn, struct st_command *command,
8730
8738
cn->ps_params = ps_params = (MYSQL_BIND*)my_malloc (PSI_NOT_INSTRUMENTED,
8731
8739
sizeof (MYSQL_BIND) *
8732
8740
stmt->param_count ,
8733
- MYF (MY_WME));
8741
+ MYF (MY_WME|MY_FAE ));
8734
8742
bzero ((char *) ps_params, sizeof (MYSQL_BIND) * stmt->param_count );
8735
8743
8736
8744
int i=0 ;
@@ -8745,7 +8753,8 @@ void run_bind_stmt(struct st_connection *cn, struct st_command *command,
8745
8753
if (!*c)
8746
8754
{
8747
8755
ps_params[i].buffer_type = MYSQL_TYPE_LONG;
8748
- l= (long *)my_malloc (PSI_NOT_INSTRUMENTED, sizeof (long ), MYF (MY_WME));
8756
+ l= (long *)my_malloc (PSI_NOT_INSTRUMENTED, sizeof (long ),
8757
+ MYF (MY_WME|MY_FAE));
8749
8758
*l= strtol (p, &c, 10 );
8750
8759
ps_params[i].buffer = (void *)l;
8751
8760
ps_params[i].buffer_length = 8 ;
@@ -8757,15 +8766,16 @@ void run_bind_stmt(struct st_connection *cn, struct st_command *command,
8757
8766
{
8758
8767
ps_params[i].buffer_type = MYSQL_TYPE_DECIMAL;
8759
8768
d= (double *)my_malloc (PSI_NOT_INSTRUMENTED, sizeof (double ),
8760
- MYF (MY_WME));
8769
+ MYF (MY_WME|MY_FAE ));
8761
8770
*d= strtod (p, &c);
8762
8771
ps_params[i].buffer = (void *)d;
8763
8772
ps_params[i].buffer_length = 8 ;
8764
8773
}
8765
8774
else
8766
8775
{
8767
8776
ps_params[i].buffer_type = MYSQL_TYPE_STRING;
8768
- ps_params[i].buffer = my_strdup (PSI_NOT_INSTRUMENTED, p, MYF (MY_WME));
8777
+ ps_params[i].buffer = my_strdup (PSI_NOT_INSTRUMENTED, p,
8778
+ MYF (MY_WME|MY_FAE));
8769
8779
ps_params[i].buffer_length = (unsigned long )strlen (p);
8770
8780
}
8771
8781
}
@@ -9803,7 +9813,7 @@ int main(int argc, char **argv)
9803
9813
/* Init connections, allocate 1 extra as buffer + 1 for default */
9804
9814
connections= (struct st_connection *)
9805
9815
my_malloc (PSI_NOT_INSTRUMENTED, (opt_max_connections+2 ) * sizeof (struct st_connection ),
9806
- MYF (MY_WME | MY_ZEROFILL));
9816
+ MYF (MY_WME|MY_FAE| MY_ZEROFILL));
9807
9817
connections_end= connections + opt_max_connections +1 ;
9808
9818
next_con= connections + 1 ;
9809
9819
@@ -10521,7 +10531,8 @@ void do_get_replace_column(struct st_command *command)
10521
10531
die (" Missing argument in %s" , command->query );
10522
10532
10523
10533
/* Allocate a buffer for results */
10524
- start= buff= (char *)my_malloc (PSI_NOT_INSTRUMENTED, strlen (from)+1 ,MYF (MY_WME | MY_FAE));
10534
+ start= buff= (char *)my_malloc (PSI_NOT_INSTRUMENTED, strlen (from)+1 ,
10535
+ MYF (MY_WME|MY_FAE));
10525
10536
while (*from)
10526
10537
{
10527
10538
char *to;
@@ -10534,7 +10545,8 @@ void do_get_replace_column(struct st_command *command)
10534
10545
command->query );
10535
10546
to= get_string (&buff, &from, command);
10536
10547
my_free (replace_column[column_number-1 ]);
10537
- replace_column[column_number-1 ]= my_strdup (PSI_NOT_INSTRUMENTED, to, MYF (MY_WME | MY_FAE));
10548
+ replace_column[column_number-1 ]= my_strdup (PSI_NOT_INSTRUMENTED, to,
10549
+ MYF (MY_WME|MY_FAE));
10538
10550
set_if_bigger (max_replace_column, column_number);
10539
10551
}
10540
10552
my_free (start);
@@ -10601,7 +10613,8 @@ void do_get_replace(struct st_command *command)
10601
10613
bzero (&from_array,sizeof (from_array));
10602
10614
if (!*from)
10603
10615
die (" Missing argument in %s" , command->query );
10604
- start= buff= (char *)my_malloc (PSI_NOT_INSTRUMENTED, strlen (from)+1 ,MYF (MY_WME | MY_FAE));
10616
+ start= buff= (char *)my_malloc (PSI_NOT_INSTRUMENTED, strlen (from)+1 ,
10617
+ MYF (MY_WME|MY_FAE));
10605
10618
while (*from)
10606
10619
{
10607
10620
char *to= buff;
@@ -11259,7 +11272,7 @@ REPLACE *init_replace(char * *from, char * *to,uint count,
11259
11272
DBUG_RETURN (0 );
11260
11273
found_sets=0 ;
11261
11274
if (!(found_set= (FOUND_SET*) my_malloc (PSI_NOT_INSTRUMENTED, sizeof (FOUND_SET)*max_length*count,
11262
- MYF (MY_WME))))
11275
+ MYF (MY_WME|MY_FAE ))))
11263
11276
{
11264
11277
free_sets (&sets);
11265
11278
DBUG_RETURN (0 );
@@ -11269,7 +11282,7 @@ REPLACE *init_replace(char * *from, char * *to,uint count,
11269
11282
used_sets=-1 ;
11270
11283
word_states=make_new_set (&sets); /* Start of new word */
11271
11284
start_states=make_new_set (&sets); /* This is first state */
11272
- if (!(follow=(FOLLOWS*) my_malloc (PSI_NOT_INSTRUMENTED, (states+2 )*sizeof (FOLLOWS),MYF (MY_WME))))
11285
+ if (!(follow=(FOLLOWS*) my_malloc (PSI_NOT_INSTRUMENTED, (states+2 )*sizeof (FOLLOWS),MYF (MY_WME|MY_FAE ))))
11273
11286
{
11274
11287
free_sets (&sets);
11275
11288
my_free (found_set);
@@ -11436,7 +11449,7 @@ REPLACE *init_replace(char * *from, char * *to,uint count,
11436
11449
if ((replace=(REPLACE*) my_malloc (PSI_NOT_INSTRUMENTED, sizeof (REPLACE)*(sets.count )+
11437
11450
sizeof (REPLACE_STRING)*(found_sets+1 )+
11438
11451
sizeof (char *)*count+result_len,
11439
- MYF (MY_WME | MY_ZEROFILL))))
11452
+ MYF (MY_WME|MY_FAE| MY_ZEROFILL))))
11440
11453
{
11441
11454
rep_str=(REPLACE_STRING*) (replace+sets.count );
11442
11455
to_array= (char **) (rep_str+found_sets+1 );
@@ -11479,10 +11492,10 @@ int init_sets(REP_SETS *sets,uint states)
11479
11492
bzero (sets, sizeof (*sets));
11480
11493
sets->size_of_bits =((states+7 )/8 );
11481
11494
if (!(sets->set_buffer =(REP_SET*) my_malloc (PSI_NOT_INSTRUMENTED, sizeof (REP_SET)*SET_MALLOC_HUNC,
11482
- MYF (MY_WME))))
11495
+ MYF (MY_WME|MY_FAE ))))
11483
11496
return 1 ;
11484
11497
if (!(sets->bit_buffer =(uint*) my_malloc (PSI_NOT_INSTRUMENTED, sizeof (uint)*sets->size_of_bits *
11485
- SET_MALLOC_HUNC,MYF (MY_WME))))
11498
+ SET_MALLOC_HUNC,MYF (MY_WME|MY_FAE ))))
11486
11499
{
11487
11500
my_free (sets->set );
11488
11501
return 1 ;
@@ -11678,10 +11691,10 @@ int insert_pointer_name(POINTER_ARRAY *pa,char * name)
11678
11691
if (!(pa->typelib .type_names =(const char **)
11679
11692
my_malloc (PSI_NOT_INSTRUMENTED, ((PC_MALLOC-MALLOC_OVERHEAD)/
11680
11693
(sizeof (char *)+sizeof (*pa->flag ))*
11681
- (sizeof (char *)+sizeof (*pa->flag ))),MYF (MY_WME))))
11694
+ (sizeof (char *)+sizeof (*pa->flag ))),MYF (MY_WME|MY_FAE ))))
11682
11695
DBUG_RETURN (-1 );
11683
11696
if (!(pa->str = (uchar*) my_malloc (PSI_NOT_INSTRUMENTED, PS_MALLOC - MALLOC_OVERHEAD,
11684
- MYF (MY_WME))))
11697
+ MYF (MY_WME|MY_FAE ))))
11685
11698
{
11686
11699
my_free (pa->typelib .type_names );
11687
11700
DBUG_RETURN (-1 );
0 commit comments