From e17562b55af10d9415e9dfefe7cba0ade1e49bca Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 6 Jul 2003 19:09:57 +0300 Subject: Support for variables with components Added framework to create/drop and manager buffers for multiple key caches include/my_getopt.h: Fixed prototype include/my_sys.h: Added (temporary) KEY_CACHE type include/mysqld_error.h: New error messages mysql-test/r/select_safe.result: Updated test results mysql-test/r/variables.result: Updated test results mysys/my_getopt.c: Fixed bugs with GET_ASK_ADDR sql/Makefile.am: Make sql_yacc.o depend on all header files in sql directory sql/item_func.cc: Added support for variable components sql/mysql_priv.h: Added support for variable components sql/mysqld.cc: Added support for multiple key caches sql/set_var.cc: Added support for multiple key caches sql/set_var.h: Added support for multiple key caches sql/share/czech/errmsg.txt: New error messages sql/share/danish/errmsg.txt: New error messages sql/share/dutch/errmsg.txt: New error messages sql/share/english/errmsg.txt: New error messages sql/share/estonian/errmsg.txt: New error messages sql/share/french/errmsg.txt: New error messages sql/share/german/errmsg.txt: New error messages sql/share/greek/errmsg.txt: New error messages sql/share/hungarian/errmsg.txt: New error messages sql/share/italian/errmsg.txt: New error messages sql/share/japanese/errmsg.txt: New error messages sql/share/korean/errmsg.txt: New error messages sql/share/norwegian-ny/errmsg.txt: New error messages sql/share/norwegian/errmsg.txt: New error messages sql/share/polish/errmsg.txt: New error messages sql/share/portuguese/errmsg.txt: New error messages sql/share/romanian/errmsg.txt: New error messages sql/share/russian/errmsg.txt: New error messages sql/share/serbian/errmsg.txt: New error messages sql/share/slovak/errmsg.txt: New error messages sql/share/spanish/errmsg.txt: New error messages sql/share/swedish/errmsg.txt: New error messages sql/share/ukrainian/errmsg.txt: New error messages sql/sql_lex.cc: Fixes for quoting of variables. sql/sql_parse.cc: Fix after changing prototype for get_system_var sql/sql_show.cc: Fix after introducing variable components sql/sql_yacc.yy: Support for variables with components (To support multiple key caches) --- mysql-test/t/key_cache-master.opt | 1 + mysql-test/t/key_cache.test | 42 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 mysql-test/t/key_cache-master.opt create mode 100644 mysql-test/t/key_cache.test (limited to 'mysql-test/t') diff --git a/mysql-test/t/key_cache-master.opt b/mysql-test/t/key_cache-master.opt new file mode 100644 index 00000000000..66e19c18a8a --- /dev/null +++ b/mysql-test/t/key_cache-master.opt @@ -0,0 +1 @@ +--key_buffer_size=2M --small.key_buffer_size=256K --small.key_buffer_size=128K diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test new file mode 100644 index 00000000000..2da18b68624 --- /dev/null +++ b/mysql-test/t/key_cache.test @@ -0,0 +1,42 @@ +# +# Test of key cache +# + +SET @save_key_buffer=@@key_buffer_size; + +SELECT @@key_buffer_size, @@small.key_buffer_size; + +# Change default key cache size +SET @@global.key_buffer_size=16*1024*1024; +SET @@global.default.key_buffer_size=16*1024*1024; +SET @@global.default.key_buffer_size=16*1024*1024; + +SET @@global.small.key_buffer_size=1*1024*1024; +SET @@global.medium.key_buffer_size=4*1024*1024; +# Drop buffer +SET @@global.medium.key_buffer_size=0; +# Test double drop +SET @@global.medium.key_buffer_size=0; + +# Print key buffer with different syntaxes +SHOW VARIABLES like "key_buffer_size"; +SELECT @@key_buffer_size; +SELECT @@global.key_buffer_size; +SELECT @@global.default.key_buffer_size; +SELECT @@global.default.`key_buffer_size`; +SELECT @@global.`default`.`key_buffer_size`; +SELECT @@`default`.key_buffer_size; + +SELECT @@small.key_buffer_size; +SELECT @@medium.key_buffer_size; + +SET @@global.key_buffer_size=@save_key_buffer; + +# +# Errors +# + +--error 1064 +SELECT @@default.key_buffer_size; +--error 1270 +SELECT @@skr.table_type="test"; -- cgit v1.2.1