1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt

into  mysql.com:/misc/mysql/99999/51-99999
This commit is contained in:
tnurnberg@white.intern.koehntopp.de
2008-02-24 14:23:28 +01:00
9 changed files with 176 additions and 46 deletions

View File

@@ -210,6 +210,8 @@ static void reap_plugins(void);
/* declared in set_var.cc */
extern sys_var *intern_find_sys_var(const char *str, uint length, bool no_error);
extern bool throw_bounds_warning(THD *thd, bool fixed, bool unsignd,
const char *name, longlong val);
#ifdef EMBEDDED_LIBRARY
/* declared in sql_base.cc */
@@ -1888,16 +1890,8 @@ static int check_func_int(THD *thd, struct st_mysql_sys_var *var,
else
*(int *)save= (int) getopt_ll_limit_value(tmp, &options, &fixed);
if (fixed)
{
char buf[22];
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_TRUNCATED_WRONG_VALUE,
ER(ER_TRUNCATED_WRONG_VALUE), var->name,
ullstr(tmp, buf));
}
return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) &&
(*(int *)save != (int) tmp);
return throw_bounds_warning(thd, fixed, var->flags & PLUGIN_VAR_UNSIGNED,
var->name, (longlong) tmp);
}
@@ -1916,16 +1910,8 @@ static int check_func_long(THD *thd, struct st_mysql_sys_var *var,
else
*(long *)save= (long) getopt_ll_limit_value(tmp, &options, &fixed);
if (fixed)
{
char buf[22];
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_TRUNCATED_WRONG_VALUE,
ER(ER_TRUNCATED_WRONG_VALUE), var->name,
ullstr(tmp, buf));
}
return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) &&
(*(long *)save != (long) tmp);
return throw_bounds_warning(thd, fixed, var->flags & PLUGIN_VAR_UNSIGNED,
var->name, (longlong) tmp);
}
@@ -1937,7 +1923,6 @@ static int check_func_longlong(THD *thd, struct st_mysql_sys_var *var,
struct my_option options;
value->val_int(value, &tmp);
plugin_opt_set_limits(&options, var);
*(ulonglong *)save= getopt_ull_limit_value(tmp, &options, &fixed);
if (var->flags & PLUGIN_VAR_UNSIGNED)
*(ulonglong *)save= getopt_ull_limit_value((ulonglong) tmp, &options,
@@ -1945,16 +1930,8 @@ static int check_func_longlong(THD *thd, struct st_mysql_sys_var *var,
else
*(longlong *)save= getopt_ll_limit_value(tmp, &options, &fixed);
if (fixed)
{
char buf[22];
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_TRUNCATED_WRONG_VALUE,
ER(ER_TRUNCATED_WRONG_VALUE), var->name,
ullstr(tmp, buf));
}
return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) &&
(*(long long *)save != tmp);
return throw_bounds_warning(thd, fixed, var->flags & PLUGIN_VAR_UNSIGNED,
var->name, (longlong) tmp);
}
static int check_func_str(THD *thd, struct st_mysql_sys_var *var,