diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2010-11-25 03:11:05 +0000 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2010-11-25 03:11:05 +0000 |
commit | 7336ac45b77bb8f794de3c37d6aa4864c02c6c57 (patch) | |
tree | f70ac0f818d16f63f5455f8abb9c33c4cbffddbf /sql/set_var.cc | |
parent | 161d4eea58c0a509b058e31a681b35f04c5e63a7 (diff) | |
download | mariadb-git-7336ac45b77bb8f794de3c37d6aa4864c02c6c57.tar.gz |
Assorted post-merge fixes, clean-up, integration, compat with 5.6.
43233/55794.
mysql-test/r/change_user.result:
Don't use -1 integer wrap around. It used to work, but now we do what's
actually in the documentation. In tests, we now use DEFAULT or the
numeral equivalent (as we do in the 5.6 tests).
mysql-test/r/key_cache.result:
Can't drop default key case is an error now, not a warning, for compatibility
with 5.6.
mysql-test/r/variables.result:
Can't drop default key case is an error now, not a warning, for compatibility
with 5.6.
mysql-test/t/change_user.test:
Don't use -1 integer wrap around. It used to work, but now we do what's
actually in the documentation. In tests, we now use DEFAULT or the
numeral equivalent (as we do in the 5.6 tests).
mysql-test/t/key_cache.test:
Can't drop default key case is an error now, not a warning, for compatibility
with 5.6.
mysql-test/t/variables.test:
Can't drop default key case is an error now, not a warning, for compatibility
with 5.6.
sql/mysqld.cc:
0 is a legal (albeit magic) value: "drop key cache."
sql/set_var.cc:
bound_unsigned() can go now, it was just a kludge until things are done
The Right Way, which they are now.
Can't drop default key case is an error now, not a warning, for compatibility
with 5.6.
tests/mysql_client_test.c:
Don't use -1 integer wrap around. It used to work, but now we do what's
actually in the documentation. In tests, we now use DEFAULT or the
numeral equivalent (as we do in the 5.6 tests).
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index 2621c8457bc..26f97d46d52 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1424,44 +1424,6 @@ bool throw_bounds_warning(THD *thd, bool fixed, bool unsignd, /** - check an unsigned user-supplied value for a systemvariable against bounds. - - TODO: This is a wrapper function to call clipping from within an update() - function. Calling bounds from within update() is fair game in theory, - but we can only send warnings from in there, not errors, and besides, - it violates our model of separating check from update phase. - To avoid breaking out of the server with an ASSERT() in strict mode, - we pretend we're not in strict mode when we go through here. Bug#43233 - was opened to remind us to replace this kludge with The Right Thing, - which of course is to do the check in the actual check phase, and then - throw an error or warning accordingly. - - @param thd thread handle - @param num the value to limit - @param option_limits the bounds-record, or NULL if none - */ -static void bound_unsigned(THD *thd, ulonglong *num, - const struct my_option *option_limits) -{ - if (option_limits) - { - my_bool fixed = FALSE; - ulonglong unadjusted= *num; - - *num= getopt_ull_limit_value(unadjusted, option_limits, &fixed); - - if (fixed) - { - ulong ssm= thd->variables.sql_mode; - thd->variables.sql_mode&= ~MODE_STRICT_ALL_TABLES; - throw_bounds_warning(thd, fixed, TRUE, option_limits->name, unadjusted); - thd->variables.sql_mode= ssm; - } - } -} - - -/** Get unsigned system-variable. Negative value does not wrap around, but becomes zero. Check user-supplied value for a systemvariable against bounds. @@ -2359,9 +2321,8 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var) { if (key_cache == dflt_key_cache) { - push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_WARN_CANT_DROP_DEFAULT_KEYCACHE, - ER(ER_WARN_CANT_DROP_DEFAULT_KEYCACHE)); + error= 1; + my_error(ER_WARN_CANT_DROP_DEFAULT_KEYCACHE, MYF(0)); goto end; // Ignore default key cache } |