無料PHPプログラム

MySQL 5.1 リファレンスマニュアル :: A Frequently Asked Questions About MySQL 5.1 :: A.3 MySQL 5.1 FAQ ? Server SQL Mode
« A.2 MySQL 5.1 FAQ ? Storage Engines

A.4 MySQL 5.1 FAQ ? Stored Procedures »
Section Navigation      [Toggle]
  • A Frequently Asked Questions About MySQL 5.1
  • A.1 MySQL 5.1 FAQ ? General
  • A.2 MySQL 5.1 FAQ ? Storage Engines
  • A.3 MySQL 5.1 FAQ ? Server SQL Mode
  • A.4 MySQL 5.1 FAQ ? Stored Procedures
  • A.5 MySQL 5.1 FAQ ? Triggers
  • A.6 MySQL 5.1 FAQ ? Stored Routines, Triggers, and Replication
  • A.7 MySQL 5.1 FAQ ? Views
  • A.8 MySQL 5.0 FAQ ? INFORMATION_SCHEMA
  • A.9 MySQL 5.1 FAQ ? Migration
  • A.10 MySQL 5.1 FAQ ? Security
  • A.11 MySQL 5.1 FAQ ? MySQL Cluster
  • A.12 MySQL 5.1 FAQ ? MySQL Chinese, Japanese, and Korean Character Sets
  • A.13 MySQL 5.1 FAQ ? Connectors & APIs

A.3. MySQL 5.1 FAQ ? Server SQL Mode

Questions

  • 26.3.1: What are server SQL modes?

  • 26.3.2: How many server SQL modes are there?

  • 26.3.3: How do you determine the server SQL mode?

  • 26.3.4: Is the mode dependent on the database or connection?

  • 26.3.5: Can the rules for strict mode be extended?

  • 26.3.6: Does strict mode impact performance?

  • 26.3.7: What is the default server SQL mode when My SQL 5.1 is installed?

Questions and Answers

26.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 項4.2.6. 「SQL モード」.

26.3.2: How many server SQL modes are there?

Each mode can be independently switched on and off. See 項4.2.6. 「SQL モード」, for a complete list of available modes.

26.3.3: How do you determine the server SQL mode?

You can set the default SQL mode (for mysqld startup) with the --sql-mode option. Using the statement SET [SESSION|GLOBAL] 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.

26.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 [SESSION|GLOBAL] sql_mode='modes'.

26.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, STRICT_TRANS_TABLES, or STRICT_ALL_TABLES is enabled. Options can be combined, so you can add additional restrictions to a mode. See 項4.2.6. 「SQL モード」, for more information.

26.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.

26.3.7: What is the default server SQL mode when My SQL 5.1 is installed?

By default, no special modes are enabled. See 項4.2.6. 「SQL モード」, for information about all available modes and MySQL's default behavior.

Copyright c 1997, 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices
Top / Previous / Next / Up / Table of Contents
© 2010, Oracle Corporation and/or its affiliates

無料CGI PHPスクリプト | 新着情報スクリプト | 営業日カレンダー | PHPマニュアル | MySQLマニュアル | PEARマニュアル

Copyright (c) 2010 jmcodex.com All rights reserved.