diff options
author | monty@mashka.mysql.fi <> | 2003-07-08 23:54:48 +0300 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2003-07-08 23:54:48 +0300 |
commit | 39e7db9f51fb9f78d7c3846ad11afd1f13778593 (patch) | |
tree | 6605f287527ecbfa819a64516db88bfd63ff07ea /mysql-test | |
parent | a4ad9b4ae6a5d7b5529f1ffff94d092110cb6a32 (diff) | |
parent | 8b54bff34cbdff9f3f27224ccd7a4c36d128ea43 (diff) | |
download | mariadb-git-39e7db9f51fb9f78d7c3846ad11afd1f13778593.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mashka.mysql.fi:/home/my/mysql-4.1
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/key_cache.result | 43 | ||||
-rw-r--r-- | mysql-test/r/select_safe.result | 2 | ||||
-rw-r--r-- | mysql-test/r/variables.result | 2 | ||||
-rw-r--r-- | mysql-test/t/key_cache-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/key_cache.test | 42 |
5 files changed, 88 insertions, 2 deletions
diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result new file mode 100644 index 00000000000..8ec507b2a3f --- /dev/null +++ b/mysql-test/r/key_cache.result @@ -0,0 +1,43 @@ +SET @save_key_buffer=@@key_buffer_size; +SELECT @@key_buffer_size, @@small.key_buffer_size; +@@key_buffer_size @@small.key_buffer_size +2097152 131072 +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; +SET @@global.medium.key_buffer_size=0; +SET @@global.medium.key_buffer_size=0; +SHOW VARIABLES like "key_buffer_size"; +Variable_name Value +key_buffer_size 16777216 +SELECT @@key_buffer_size; +@@key_buffer_size +16777216 +SELECT @@global.key_buffer_size; +@@global.key_buffer_size +16777216 +SELECT @@global.default.key_buffer_size; +@@global.default.key_buffer_size +16777216 +SELECT @@global.default.`key_buffer_size`; +@@global.default.key_buffer_size +16777216 +SELECT @@global.`default`.`key_buffer_size`; +@@global.default.key_buffer_size +16777216 +SELECT @@`default`.key_buffer_size; +@@default.key_buffer_size +16777216 +SELECT @@small.key_buffer_size; +@@small.key_buffer_size +1048576 +SELECT @@medium.key_buffer_size; +@@medium.key_buffer_size +4194304 +SET @@global.key_buffer_size=@save_key_buffer; +SELECT @@default.key_buffer_size; +ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'default.key_buffer_size' at line 1 +SELECT @@skr.table_type="test"; +ERROR HY000: Variable 'table_type' is not a variable component (Can't be used as XXXX.variable_name) diff --git a/mysql-test/r/select_safe.result b/mysql-test/r/select_safe.result index e73161996b8..0f2a781d073 100644 --- a/mysql-test/r/select_safe.result +++ b/mysql-test/r/select_safe.result @@ -37,7 +37,7 @@ delete from t1 where b="test" limit 1; delete from t1 where a+0=1 limit 2; SET MAX_JOIN_SIZE=2; SELECT @@MAX_JOIN_SIZE, @@SQL_BIG_SELECTS; -@@max_join_size @@sql_big_selects +@@MAX_JOIN_SIZE @@SQL_BIG_SELECTS 2 0 insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"); SELECT * from t1; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 1a773acd23e..4db791c993e 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -77,7 +77,7 @@ select last_insert_id(345); last_insert_id(345) 345 select @@IDENTITY,last_insert_id(), @@identity; -@@identity last_insert_id() @@identity +@@IDENTITY last_insert_id() @@identity 345 345 345 set big_tables=OFF, big_tables=ON, big_tables=0, big_tables=1, big_tables="OFF", big_tables="ON"; set global concurrent_insert=ON; 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"; |