mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Change some my_bool in C++ classes and a few functions to bool to detect wrong usage of bool/my_bool.
Fix some bugs where we stored values other than 0 or 1 in my_bool Fixed some compiler warnings client/mysql.cc: Changed interrupted_query from my_bool to int, as we stored 2 in it. client/mysqladmin.cc: Changed return variable type to same type as function value type client/mysqltest.cc: Changed 'found' to int as we store other values than 0 or 1 into it Changed type for parameter of set_reconnect() to match usage. extra/libevent/evbuffer.c: Added __attribute__((unused)) extra/libevent/event.c: Added __attribute__((unused)) extra/libevent/signal.c: Added __attribute__((unused)) sql/event_data_objects.h: my_bool -> bool sql/event_db_repository.cc: my_bool -> bool sql/event_db_repository.h: my_bool -> bool sql/event_parse_data.h: my_bool -> bool sql/events.cc: my_bool -> bool sql/events.h: my_bool -> bool sql/field.cc: my_bool -> bool sql/field.h: my_bool -> bool sql/hash_filo.h: my_bool -> bool sql/item.cc: my_bool -> bool sql/item.h: my_bool -> bool sql/item_cmpfunc.h: my_bool -> bool Changed result_for_null_param from my_bool to int as we stored -1 in it. sql/item_func.cc: my_bool -> bool Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s) sql/item_func.h: my_bool -> bool sql/item_subselect.h: my_bool -> bool sql/item_sum.cc: Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s) sql/parse_file.h: my_bool -> bool sql/rpl_mi.h: my_bool -> bool sql/sp_rcontext.h: my_bool -> bool sql/sql_analyse.h: my_bool -> bool sql/sql_base.cc: Change some assignments so that we don't initialize bool variables with int's. sql/sql_bitmap.h: my_bool -> bool sql/sql_cache.cc: my_bool -> bool sql/sql_cache.h: my_bool -> bool sql/sql_class.h: my_bool -> bool sql/sql_insert.cc: Change some assignments so that we don't initialize bool variables with int's. sql/sql_prepare.cc: my_bool -> bool sql/table.h: my_bool -> bool storage/maria/ma_check.c: Removed duplicate assignment strings/decimal.c: Fixed wrong variable usage. Don't do complex arithmetic on bool when simple works.
This commit is contained in:
@ -295,6 +295,9 @@ struct system_variables
|
||||
When attempting to access a dynamic variable, if the session version
|
||||
is out of date, then the session version is updated and realloced if
|
||||
neccessary and bytes copied from global to make up for missing data.
|
||||
|
||||
Note that one should use my_bool instead of bool here, as the variables
|
||||
are used with my_getopt.c
|
||||
*/
|
||||
ulong dynamic_variables_version;
|
||||
char* dynamic_variables_ptr;
|
||||
@ -1887,7 +1890,7 @@ public:
|
||||
bool no_warnings_for_error; /* no warnings on call to my_error() */
|
||||
/* set during loop of derived table processing */
|
||||
bool derived_tables_processing;
|
||||
my_bool tablespace_op; /* This is TRUE in DISCARD/IMPORT TABLESPACE */
|
||||
bool tablespace_op; /* This is TRUE in DISCARD/IMPORT TABLESPACE */
|
||||
|
||||
sp_rcontext *spcont; // SP runtime context
|
||||
sp_cache *sp_proc_cache;
|
||||
@ -2958,10 +2961,10 @@ class user_var_entry
|
||||
Item_result type;
|
||||
bool unsigned_flag;
|
||||
|
||||
double val_real(my_bool *null_value);
|
||||
longlong val_int(my_bool *null_value) const;
|
||||
String *val_str(my_bool *null_value, String *str, uint decimals);
|
||||
my_decimal *val_decimal(my_bool *null_value, my_decimal *result);
|
||||
double val_real(bool *null_value);
|
||||
longlong val_int(bool *null_value) const;
|
||||
String *val_str(bool *null_value, String *str, uint decimals);
|
||||
my_decimal *val_decimal(bool *null_value, my_decimal *result);
|
||||
DTCollation collation;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user