Oracle 5.0 Reference Manual page 531

Table of Contents

Advertisement

• If a structured variable instance name is not legal as an unquoted identifier, refer to it as a quoted
identifier using backticks. For example,
• global, session, and
such as
@@global.var_name
Currently, the first two rules have no possibility of being violated because the only structured variable
type is the one for key caches. These rules will assume greater significance if some other type of
structured variable is created in the future.
With one exception, you can refer to structured variable components using compound names in any
context where simple variable names can occur. For example, you can assign a value to a structured
variable using a command-line option:
shell>
mysqld --hot_cache.key_buffer_size=64K
In an option file, use this syntax:
[mysqld]
hot_cache.key_buffer_size=64K
If you start the server with this option, it creates a key cache named
addition to the default key cache that has a default size of 8MB.
Suppose that you start the server as follows:
shell>
mysqld --key_buffer_size=256K \
--extra_cache.key_buffer_size=128K \
--extra_cache.key_cache_block_size=2048
In this case, the server sets the size of the default key cache to 256KB. (You could also have written
--default.key_buffer_size=256K.) In addition, the server creates a second key cache named
extra_cache
set to 2048 bytes.
The following example starts the server with three different key caches having sizes in a 3:1:1 ratio:
shell>
mysqld --key_buffer_size=6M \
--hot_cache.key_buffer_size=2M \
--cold_cache.key_buffer_size=2M
Structured variable values may be set and retrieved at runtime as well. For example, to set a key cache
named
hot_cache
mysql>
SET GLOBAL hot_cache.key_buffer_size = 10*1024*1024;
mysql>
SET @@global.hot_cache.key_buffer_size = 10*1024*1024;
To retrieve the cache size, do this:
mysql>
SELECT @@global.hot_cache.key_buffer_size;
However, the following statement does not work. The variable is not interpreted as a compound name,
but as a simple string for a
mysql>
SHOW GLOBAL VARIABLES LIKE 'hot_cache.key_buffer_size';
This is the exception to being able to use structured variable names anywhere a simple variable name
may occur.
5.1.5.2. Dynamic System Variables
Many server system variables are dynamic and can be set at runtime using
SESSION. You can also obtain their values using SELECT. See
Variables".
Using System Variables
are not legal instance names. This avoids a conflict with notation
local
for referring to nonstructured system variables.
that has a size of 128KB, with the size of block buffers for caching table index blocks
to a size of 10MB, use either of these statements:
[896]
LIKE
is not legal, but
hot-cache
pattern-matching operation:
511
is.
`hot-cache`
with a size of 64KB in
hot_cache
SET GLOBAL
Section 5.1.5, "Using System
or
SET

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents