Server SQL Modes
537
•
NO_BACKSLASH_ESCAPES
[537]
Disable the use of the backslash character (“
\
”) as an escape character within strings. With this
mode enabled, backslash becomes an ordinary character like any other. (Implemented in MySQL
5.0.1)
•
NO_DIR_IN_CREATE
[537]
When creating a table, ignore all
INDEX DIRECTORY
and
DATA DIRECTORY
directives. This option
is useful on slave replication servers.
•
NO_ENGINE_SUBSTITUTION
[537]
Control automatic substitution of the default storage engine when a statement such as
CREATE
TABLE
or
ALTER TABLE
specifies a storage engine that is disabled or not compiled in. (Implemented
in MySQL 5.0.8)
With
NO_ENGINE_SUBSTITUTION
[537]
disabled, the default engine is used and a warning occurs
if the desired engine is known but disabled or not compiled in. If the desired engine is invalid (not a
known engine name), an error occurs and the table is not created or altered.
With
NO_ENGINE_SUBSTITUTION
[537]
enabled, an error occurs and the table is not created or
altered if the desired engine is unavailable for any reason (whether disabled or invalid).
•
NO_FIELD_OPTIONS
[537]
Do not print MySQL-specific column options in the output of
SHOW CREATE TABLE
. This mode is
used by
mysqldump
in portability mode.
•
NO_KEY_OPTIONS
[537]
Do not print MySQL-specific index options in the output of
SHOW CREATE TABLE
. This mode is used
by
mysqldump
in portability mode.
•
NO_TABLE_OPTIONS
[537]
Do not print MySQL-specific table options (such as
ENGINE
) in the output of
SHOW CREATE TABLE
.
This mode is used by
mysqldump
in portability mode.
•
NO_UNSIGNED_SUBTRACTION
[537]
By default, subtraction between integer operands produces an
UNSIGNED
result if any operand
is
UNSIGNED
. When
NO_UNSIGNED_SUBTRACTION
[537]
is enabled, the subtraction result is
signed, even if any operand is unsigned. For example, compare the type of column
c2
in table
t1
with that of column
c2
in table
t2
:
mysql>
SET sql_mode='';
mysql>
CREATE TABLE test (c1 BIGINT UNSIGNED NOT NULL);
mysql>
CREATE TABLE t1 SELECT c1 - 1 AS c2 FROM test;
mysql>
DESCRIBE t1;
+-------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------------+------+-----+---------+-------+
| c2 | bigint(21) unsigned | | | 0 | |
+-------+---------------------+------+-----+---------+-------+
mysql>
SET sql_mode='NO_UNSIGNED_SUBTRACTION';
mysql>
CREATE TABLE t2 SELECT c1 - 1 AS c2 FROM test;
mysql>
DESCRIBE t2;
+-------+------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------------+------+-----+---------+-------+
| c2 | bigint(21) | | | 0 | |
+-------+------------+------+-----+---------+-------+
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...