MySQL 5.0 FAQ: Stored Procedures and Functions
2870
•
B.3.1: [2870]
What are server SQL modes?
•
B.3.2: [2870]
How many server SQL modes are there?
•
B.3.3: [2870]
How do you determine the server SQL mode?
•
B.3.4: [2870]
Is the mode dependent on the database or connection?
•
B.3.5: [2870]
Can the rules for strict mode be extended?
•
B.3.6: [2870]
Does strict mode impact performance?
•
B.3.7: [2870]
What is the default server SQL mode when My SQL 5.0 is installed?
Questions and Answers
B.3.1: What are server SQL modes?
Server SQL modes define what SQL syntax MySQL should support and what kind of data validation
checks it should perform. This makes it easier to use MySQL in different environments and to use
MySQL together with other database servers. The MySQL Server apply these modes individually to
different clients. For more information, see
Section 5.1.7, “Server SQL Modes”
.
B.3.2: How many server SQL modes are there?
Each mode can be independently switched on and off. See
Section 5.1.7, “Server SQL Modes”
, for a
complete list of available modes.
B.3.3: How do you determine the server SQL mode?
You can set the default SQL mode (for
mysqld
startup) with the
--sql-mode
[422]
option. Using the
statement
SET [GLOBAL|SESSION] sql_mode='modes'
, you can change the settings from within
a connection, either locally to the connection, or to take effect globally. You can retrieve the current
mode by issuing a
SELECT @@sql_mode
statement.
B.3.4: Is the mode dependent on the database or connection?
A mode is not linked to a particular database. Modes can be set locally to the session (connection),
or globally for the server. you can change these settings using
SET [GLOBAL|SESSION]
sql_mode='modes'
.
B.3.5: Can the rules for strict mode be extended?
When we refer to strict mode, we mean a mode where at least one of the modes
TRADITIONAL
[540]
,
STRICT_TRANS_TABLES
[539]
, or
STRICT_ALL_TABLES
[539]
is enabled. Options can be combined,
so you can add restrictions to a mode. See
Section 5.1.7, “Server SQL Modes”
, for more information.
B.3.6: Does strict mode impact performance?
The intensive validation of input data that some settings requires more time than if the validation is not
done. While the performance impact is not that great, if you do not require such validation (perhaps
your application already handles all of this), then MySQL gives you the option of leaving strict mode
disabled. However—if you do require it—strict mode can provide such validation.
B.3.7: What is the default server SQL mode when My SQL 5.0 is installed?
By default, no special modes are enabled. See
Section 5.1.7, “Server SQL Modes”
, for information
about all available modes and MySQL's default behavior.
B.4. MySQL 5.0 FAQ: Stored Procedures and Functions
Questions
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...