summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-07-15 14:45:08 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-07-15 14:45:08 -0300
commitc295e3d7b60efcf34da643745a09059ae09d3f8f (patch)
tree2c1b96fba8528b2f154fe867bd2ed49704e8d035 /sql
parent2fce37d2a9dac30c9f970899fa4239485e953775 (diff)
downloadmariadb-git-c295e3d7b60efcf34da643745a09059ae09d3f8f.tar.gz
Bug#45288: pb2 returns a lot of compilation warnings on linux
Fix compiler warnings due to: a mismatch in the prototypes for check_access and implicit conversions from double to ulonglong and vice-versa. mysys/my_getopt.c: Explicit conversion from ulonglong to double. Might need to be tweaked in the future. sql/sql_parse.h: Make prototype equal to the case when not compiling under embedded. sql/sys_vars.cc: Explicit conversion from ulonglong to double. Destination var is a ulonglong. sql/sys_vars.h: Explicit conversion from ulonglong to double. Might need to be tweaked in the future.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_parse.h5
-rw-r--r--sql/sys_vars.cc4
-rw-r--r--sql/sys_vars.h10
3 files changed, 9 insertions, 10 deletions
diff --git a/sql/sql_parse.h b/sql/sql_parse.h
index df76df72e09..475811d45b7 100644
--- a/sql/sql_parse.h
+++ b/sql/sql_parse.h
@@ -183,9 +183,8 @@ inline bool check_merge_table_access(THD *thd, char *db, TABLE_LIST *table_list)
inline bool check_some_routine_access(THD *thd, const char *db,
const char *name, bool is_proc)
{ return false; }
-inline bool check_access(THD *thd, ulong access, const char *db,
- ulong *save_priv, bool no_grant, bool no_errors,
- bool schema_db)
+inline bool check_access(THD *, ulong, const char *, ulong *save_priv,
+ GRANT_INTERNAL_INFO *, bool, bool)
{
if (save_priv)
*save_priv= GLOBAL_ACLS;
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 53b07371baa..6e95961ebb0 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -942,10 +942,10 @@ static bool update_cached_long_query_time(sys_var *self, THD *thd,
{
if (type == OPT_SESSION)
thd->variables.long_query_time=
- thd->variables.long_query_time_double * 1e6;
+ double2ulonglong(thd->variables.long_query_time_double * 1e6);
else
global_system_variables.long_query_time=
- global_system_variables.long_query_time_double * 1e6;
+ double2ulonglong(global_system_variables.long_query_time_double * 1e6);
return false;
}
diff --git a/sql/sys_vars.h b/sql/sys_vars.h
index 18c073b1e90..ca3fc99deba 100644
--- a/sql/sys_vars.h
+++ b/sql/sys_vars.h
@@ -741,13 +741,13 @@ public:
uint deprecated_version=0, const char *substitute=0,
int parse_flag= PARSE_NORMAL)
: sys_var(&all_sys_vars, name_arg, comment, flag_args, off, getopt.id,
- getopt.arg_type, SHOW_DOUBLE, def_val, lock, binlog_status_arg,
- on_check_func, on_update_func, deprecated_version, substitute,
- parse_flag)
+ getopt.arg_type, SHOW_DOUBLE, (longlong) double2ulonglong(def_val),
+ lock, binlog_status_arg, on_check_func, on_update_func,
+ deprecated_version, substitute, parse_flag)
{
option.var_type= GET_DOUBLE;
- option.min_value= min_val;
- option.max_value= max_val;
+ option.min_value= (longlong) double2ulonglong(min_val);
+ option.max_value= (longlong) double2ulonglong(max_val);
global_var(double)= (double)option.def_value;
DBUG_ASSERT(min_val < max_val);
DBUG_ASSERT(min_val <= def_val);