mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
Give the user a warning if he tries to destroy the default key cache.
This commit is contained in:
parent
b76cea46e9
commit
1147e00274
4 changed files with 21 additions and 0 deletions
|
@ -289,3 +289,9 @@ check table t1;
|
|||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
set @@global.key_buffer_size=0;
|
||||
Warnings:
|
||||
Warning 1438 Cannot drop default keycache
|
||||
select @@global.key_buffer_size;
|
||||
@@global.key_buffer_size
|
||||
2097152
|
||||
|
|
|
@ -168,4 +168,11 @@ check table t1;
|
|||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
|
||||
# (One cannot drop the default key cache.)
|
||||
#
|
||||
set @@global.key_buffer_size=0;
|
||||
select @@global.key_buffer_size;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
|
|
@ -2293,7 +2293,12 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var)
|
|||
if (!tmp) // Zero size means delete
|
||||
{
|
||||
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));
|
||||
goto end; // Ignore default key cache
|
||||
}
|
||||
|
||||
if (key_cache->key_cache_inited) // If initied
|
||||
{
|
||||
|
|
|
@ -5388,3 +5388,6 @@ ER_STACK_OVERRUN_NEED_MORE
|
|||
eng "Thread stack overrun: %ld bytes used of a %ld byte stack, and %ld bytes needed. Use 'mysqld -O thread_stack=#' to specify a bigger stack."
|
||||
ER_TOO_LONG_BODY 42000 S1009
|
||||
eng "Routine body for '%-.100s' is too long"
|
||||
ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
|
||||
eng "Cannot drop default keycache"
|
||||
ger "Der Default-Keycache kann nicht gelöscht werden"
|
||||
|
|
Loading…
Add table
Reference in a new issue