Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > 3f284ad159764cba3dedf5c92c7ab124 > files > 277

mysql-doc-5.1.40-1mdv2010.0.x86_64.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Chapter 1. General Information</title><link rel="stylesheet" href="mysql-html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"><link rel="start" href="index.html" title="MySQL 5.1 Reference Manual"><link rel="up" href="index.html" title="MySQL 5.1 Reference Manual"><link rel="prev" href="preface.html" title="Preface, Notes, Licenses"><link rel="next" href="installing.html" title="Chapter 2. Installing and Upgrading MySQL"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 1. General Information</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="preface.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="installing.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="introduction"></a>Chapter 1. General Information</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="introduction.html#manual-info">1.1. About This Manual</a></span></dt><dt><span class="section"><a href="introduction.html#manual-conventions">1.2. Typographical and Syntax Conventions</a></span></dt><dt><span class="section"><a href="introduction.html#what-is">1.3. Overview of the MySQL Database Management System</a></span></dt><dd><dl><dt><span class="section"><a href="introduction.html#what-is-mysql">1.3.1. What is MySQL?</a></span></dt><dt><span class="section"><a href="introduction.html#history">1.3.2. History of MySQL</a></span></dt><dt><span class="section"><a href="introduction.html#features">1.3.3. The Main Features of MySQL</a></span></dt></dl></dd><dt><span class="section"><a href="introduction.html#roadmap">1.4. MySQL Development Roadmap</a></span></dt><dd><dl><dt><span class="section"><a href="introduction.html#mysql-nutshell">1.4.1. What Is New in MySQL 5.1</a></span></dt><dt><span class="section"><a href="introduction.html#mysql-next-series-plans">1.4.2. What Is Planned for MySQL 5.4</a></span></dt></dl></dd><dt><span class="section"><a href="introduction.html#information-sources">1.5. MySQL Information Sources</a></span></dt><dd><dl><dt><span class="section"><a href="introduction.html#mailing-lists">1.5.1. MySQL Mailing Lists</a></span></dt><dt><span class="section"><a href="introduction.html#forums">1.5.2. MySQL Community Support at the MySQL Forums</a></span></dt><dt><span class="section"><a href="introduction.html#irc">1.5.3. MySQL Community Support on Internet Relay Chat (IRC)</a></span></dt><dt><span class="section"><a href="introduction.html#mysql-enterprise-information">1.5.4. MySQL Enterprise</a></span></dt></dl></dd><dt><span class="section"><a href="introduction.html#bug-reports">1.6. How to Report Bugs or Problems</a></span></dt><dt><span class="section"><a href="introduction.html#compatibility">1.7. MySQL Standards Compliance</a></span></dt><dd><dl><dt><span class="section"><a href="introduction.html#standards">1.7.1. What Standards MySQL Follows</a></span></dt><dt><span class="section"><a href="introduction.html#sql-mode">1.7.2. Selecting SQL Modes</a></span></dt><dt><span class="section"><a href="introduction.html#ansi-mode">1.7.3. Running MySQL in ANSI Mode</a></span></dt><dt><span class="section"><a href="introduction.html#extensions-to-ansi">1.7.4. MySQL Extensions to Standard SQL</a></span></dt><dt><span class="section"><a href="introduction.html#differences-from-ansi">1.7.5. MySQL Differences from Standard SQL</a></span></dt><dt><span class="section"><a href="introduction.html#constraints">1.7.6. How MySQL Deals with Constraints</a></span></dt></dl></dd><dt><span class="section"><a href="introduction.html#credits">1.8. Credits</a></span></dt><dd><dl><dt><span class="section"><a href="introduction.html#contributors">1.8.1. Contributors to MySQL</a></span></dt><dt><span class="section"><a href="introduction.html#documenters-translators">1.8.2. Documenters and translators</a></span></dt><dt><span class="section"><a href="introduction.html#packages">1.8.3. Packages that support MySQL</a></span></dt><dt><span class="section"><a href="introduction.html#tools-used-to-create-mysql">1.8.4. Tools that were used to create MySQL</a></span></dt><dt><span class="section"><a href="introduction.html#supporters">1.8.5. Supporters of MySQL</a></span></dt></dl></dd></dl></div><a class="indexterm" name="id3982354"></a><a class="indexterm" name="id3982363"></a><p>
    The MySQL™ software delivers a very fast, multi-threaded,
    multi-user, and robust SQL (Structured Query Language) database
    server. MySQL Server is intended for mission-critical, heavy-load
    production systems as well as for embedding into mass-deployed
    software. MySQL is a registered trademark of Sun Microsystems, Inc.
  </p><p>
    The MySQL software is Dual Licensed. Users can choose to use the
    MySQL software as an Open Source product under the terms of the GNU
    General Public License (<a href="http://www.fsf.org/licenses/" target="_top">http://www.fsf.org/licenses/</a>)
    or can purchase a standard commercial license from Sun Microsystems,
    Inc. See
    <a href="http://www.mysql.com/company/legal/licensing/" target="_top">http://www.mysql.com/company/legal/licensing/</a> for
    more information on our licensing policies.
  </p><p>
    The following list describes some sections of particular interest in
    this manual:
  </p><div class="itemizedlist"><ul type="disc"><li><p>
        For a discussion about the capabilities of the MySQL Database
        Server, see <a href="introduction.html#features" title="1.3.3. The Main Features of MySQL">Section 1.3.3, “The Main Features of MySQL”</a>.
      </p></li><li><p>
        For future plans, see <a href="introduction.html#roadmap" title="1.4. MySQL Development Roadmap">Section 1.4, “MySQL Development Roadmap”</a>.
      </p></li><li><p>
        For installation instructions, see <a href="installing.html" title="Chapter 2. Installing and Upgrading MySQL">Chapter 2, <i>Installing and Upgrading MySQL</i></a>.
        For information about upgrading MySQL, see
        <a href="installing.html#upgrade" title="2.4.1. Upgrading MySQL">Section 2.4.1, “Upgrading MySQL”</a>, and the change notes at
        <a href="news.html" title="Appendix C. MySQL Change History">Appendix C, <i>MySQL Change History</i></a>.
      </p></li><li><p>
        For a tutorial introduction to the MySQL Database Server, see
        <a href="tutorial.html" title="Chapter 3. Tutorial">Chapter 3, <i>Tutorial</i></a>.
      </p></li><li><p>
        For information about configuring and administering MySQL
        Server, see <a href="server-administration.html" title="Chapter 5. MySQL Server Administration">Chapter 5, <i>MySQL Server Administration</i></a>.
      </p></li><li><p>
        For information about setting up replication servers, see
        <a href="replication.html" title="Chapter 16. Replication">Chapter 16, <i>Replication</i></a>.
      </p></li><li><p>
        For answers to a number of questions that are often asked
        concerning the MySQL Database Server and its capabilities, see
        <a href="faqs.html" title="Appendix A. MySQL 5.1 Frequently Asked Questions">Appendix A, <i>MySQL 5.1 Frequently Asked Questions</i></a>.
      </p></li><li><p>
        For a list of currently known bugs and misfeatures, see
        <a href="error-handling.html#bugs" title="B.1.8. Known Issues in MySQL">Section B.1.8, “Known Issues in MySQL”</a>.
      </p></li><li><p>
        For a list of all the contributors to this project, see
        <a href="introduction.html#credits" title="1.8. Credits">Section 1.8, “Credits”</a>.
      </p></li><li><p>
        For a history of new features and bugfixes, see
        <a href="news.html" title="Appendix C. MySQL Change History">Appendix C, <i>MySQL Change History</i></a>.
      </p></li><li><p>
        For tips on porting the MySQL Database Software to new
        architectures or operating systems, see
        <a href="http://forge.mysql.com/wiki/MySQL_Internals_Porting" target="_top">MySQL
        Internals: Porting</a>.
      </p></li><li><p>
        For benchmarking information, see the
        <code class="filename">sql-bench</code> benchmarking directory in your
        MySQL distribution.
      </p></li></ul></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p>
      To report errors (often called “<span class="quote">bugs</span>”), please use
      the instructions at <a href="introduction.html#bug-reports" title="1.6. How to Report Bugs or Problems">Section 1.6, “How to Report Bugs or Problems”</a>.
    </p><p>
      If you have found a sensitive security bug in MySQL Server, please
      let us know immediately by sending an email message to
      <code class="email">&lt;<a href="mailto:security@mysql.com">security@mysql.com</a>&gt;</code>.
    </p></div><a class="indexterm" name="id3982572"></a><a class="indexterm" name="id3982584"></a><a class="indexterm" name="id3982595"></a><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual-info"></a>1.1. About This Manual</h2></div></div></div><a class="indexterm" name="id3982611"></a><a class="indexterm" name="id3982619"></a><p>
      This is the Reference Manual for the MySQL Database System,
      version 5.1, through release 5.1.41. It is
      not intended for use with older versions of the MySQL software due
      to the many functional and other differences between MySQL
      5.1 and previous versions. If you are using an
      earlier release of the MySQL software, please refer to the
      <a href="http://dev.mysql.com/doc/refman/5.0/en/" target="_top"><em class="citetitle">MySQL 5.0 Reference Manual</em></a>,
      which covers the 5.0 series of MySQL software
      releases, or to
      <a href="http://dev.mysql.com/doc/refman/4.1/en/" target="_top"><em class="citetitle">MySQL 3.23, 4.0,
      4.1 Reference Manual</em></a>, which covers the 3.23,
      4.0, and 4.1 series of MySQL software releases. Differences
      between minor versions of MySQL 5.1 are noted in the
      present text with reference to release numbers
      (5.1.<em class="replaceable"><code>x</code></em>).
    </p><p>
      Because this manual serves as a reference, it does not provide
      general instruction on SQL or relational database concepts. It
      also does not teach you how to use your operating system or
      command-line interpreter.
    </p><p>
      The MySQL Database Software is under constant development, and the
      Reference Manual is updated frequently as well. The most recent
      version of the manual is available online in searchable form at
      <a href="http://dev.mysql.com/doc/" target="_top">http://dev.mysql.com/doc/</a>. Other formats also are available
      there, including HTML, PDF, and Windows CHM versions.
    </p><a class="indexterm" name="id3982678"></a><a class="indexterm" name="id3982689"></a><p>
      The Reference Manual source files are written in DocBook XML
      format. The HTML version and other formats are produced
      automatically, primarily using the DocBook XSL stylesheets. For
      information about DocBook, see <a href="http://docbook.org/" target="_top">http://docbook.org/</a>
    </p><p>
      The DocBook XML sources of this manual are available from
      <a href="http://dev.mysql.com/tech-resources/sources.html" target="_top">http://dev.mysql.com/tech-resources/sources.html</a>.
      You can check out a copy of the documentation repository with this
      command:
    </p><pre class="programlisting">svn checkout http://svn.mysql.com/svnpublic/mysqldoc/
</pre><p>
      If you have questions about using MySQL, you can ask them using
      our mailing lists or forums. See <a href="introduction.html#mailing-lists" title="1.5.1. MySQL Mailing Lists">Section 1.5.1, “MySQL Mailing Lists”</a>,
      and <a href="introduction.html#forums" title="1.5.2. MySQL Community Support at the MySQL Forums">Section 1.5.2, “MySQL Community Support at the MySQL Forums”</a>. If you have suggestions concerning
      additions or corrections to the manual itself, please send them to
      the
      <a href="http://www.mysql.com/company/contact/" target="_top">Documentation
      Team</a>.
    </p><p>
      This manual was originally written by David Axmark and Michael
      “<span class="quote">Monty</span>” Widenius. It is maintained by the MySQL
      Documentation Team, consisting of Paul DuBois, Stefan Hinz, Jon
      Stephens, Martin MC Brown, and Tony Bedford.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual-conventions"></a>1.2. Typographical and Syntax Conventions</h2></div></div></div><p>
    This manual uses certain typographical conventions:
  </p><a class="indexterm" name="id3982768"></a><a class="indexterm" name="id3982780"></a><a class="indexterm" name="id3982788"></a><a class="indexterm" name="id3982800"></a><a class="indexterm" name="id3982811"></a><a class="indexterm" name="id3982820"></a><div class="itemizedlist"><ul type="disc"><li><p>
        <code class="literal">Text in this style</code> is used for SQL
        statements; database, table, and column names; program listings
        and source code; and environment variables. Example: “<span class="quote">To
        reload the grant tables, use the
        <a href="sql-syntax.html#flush" title="12.5.6.3. FLUSH Syntax"><code class="literal">FLUSH
        PRIVILEGES</code></a> statement.</span>”
      </p></li><li><p>
        <strong class="userinput"><code>Text in this style</code></strong> indicates input that
        you type in examples.
      </p></li><li><p>
        <span><strong class="command">Text in this style</strong></span> indicates the names of
        executable programs and scripts, examples being
        <a href="programs.html#mysql" title="4.5.1. mysql — The MySQL Command-Line Tool"><span><strong class="command">mysql</strong></span></a> (the MySQL command line client program)
        and <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a> (the MySQL server executable).
      </p></li><li><p>
        <em class="replaceable"><code>Text in this style</code></em> is used for
        variable input for which you should substitute a value of your
        own choosing.
      </p></li><li><p>
        <span class="emphasis"><em>Text in this style</em></span> is used for emphasis.
      </p></li><li><p>
        <span class="bold"><strong>Text in this style</strong></span> is used in
        table headings and to convey especially strong emphasis.
      </p></li><li><p>
        File names and directory names are written like this: “<span class="quote">The
        global <code class="filename">my.cnf</code> file is located in the
        <code class="filename">/etc</code> directory.</span>”
      </p></li><li><p>
        Character sequences are written like this: “<span class="quote">To specify a
        wildcard, use the ‘<span class="quote"><code class="literal">%</code></span>’
        character.</span>”
      </p></li></ul></div><p>
    When commands are shown that are meant to be executed from within a
    particular program, the prompt shown preceding the command indicates
    which command to use. For example, <code class="literal">shell&gt;</code>
    indicates a command that you execute from your login shell,
    <code class="literal">root-shell&gt;</code> is similar but should be executed
    as <code class="literal">root</code>, and <code class="literal">mysql&gt;</code>
    indicates a statement that you execute from the
    <a href="programs.html#mysql" title="4.5.1. mysql — The MySQL Command-Line Tool"><span><strong class="command">mysql</strong></span></a> client program:
  </p><pre class="programlisting">shell&gt; <strong class="userinput"><code>type a shell command here</code></strong>
root-shell&gt; <strong class="userinput"><code>type a shell command as <em class="replaceable"><code>root</code></em> here</code></strong>
mysql&gt; <strong class="userinput"><code>type a mysql statement here</code></strong>
</pre><p>
    In some areas different systems may be distinguished from each other
    to show that commands should be executed in two different
    environments. For example, while working with replication the
    commands might be prefixed with <code class="literal">master</code> and
    <code class="literal">slave</code>:
  </p><pre class="programlisting">master&gt; <strong class="userinput"><code>type a mysql command on the replication master here</code></strong>
slave&gt; <strong class="userinput"><code>type a mysql command on the replication slave here</code></strong>
</pre><p>
    The “<span class="quote">shell</span>” is your command interpreter. On Unix, this
    is typically a program such as <span><strong class="command">sh</strong></span>,
    <span><strong class="command">csh</strong></span>, or <span><strong class="command">bash</strong></span>. On Windows, the
    equivalent program is <span><strong class="command">command.com</strong></span> or
    <span><strong class="command">cmd.exe</strong></span>, typically run in a console window.
  </p><p>
    When you enter a command or statement shown in an example, do not
    type the prompt shown in the example.
  </p><p>
    Database, table, and column names must often be substituted into
    statements. To indicate that such substitution is necessary, this
    manual uses <em class="replaceable"><code>db_name</code></em>,
    <em class="replaceable"><code>tbl_name</code></em>, and
    <em class="replaceable"><code>col_name</code></em>. For example, you might see a
    statement like this:
  </p><pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT <em class="replaceable"><code>col_name</code></em> FROM <em class="replaceable"><code>db_name</code></em>.<em class="replaceable"><code>tbl_name</code></em>;</code></strong>
</pre><p>
    This means that if you were to enter a similar statement, you would
    supply your own database, table, and column names, perhaps like
    this:
  </p><pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT author_name FROM biblio_db.author_list;</code></strong>
</pre><p>
    SQL keywords are not case sensitive and may be written in any
    lettercase. This manual uses uppercase.
  </p><p>
    In syntax descriptions, square brackets
    (“<span class="quote"><code class="literal">[</code></span>” and
    “<span class="quote"><code class="literal">]</code></span>”) indicate optional words or
    clauses. For example, in the following statement, <code class="literal">IF
    EXISTS</code> is optional:
  </p><pre class="programlisting">DROP TABLE [IF EXISTS] <em class="replaceable"><code>tbl_name</code></em>
</pre><p>
    When a syntax element consists of a number of alternatives, the
    alternatives are separated by vertical bars
    (“<span class="quote"><code class="literal">|</code></span>”). When one member from a set of
    choices <span class="emphasis"><em>may</em></span> be chosen, the alternatives are
    listed within square brackets (“<span class="quote"><code class="literal">[</code></span>”
    and “<span class="quote"><code class="literal">]</code></span>”):
  </p><pre class="programlisting">TRIM([[BOTH | LEADING | TRAILING] [<em class="replaceable"><code>remstr</code></em>] FROM] <em class="replaceable"><code>str</code></em>)
</pre><p>
    When one member from a set of choices <span class="emphasis"><em>must</em></span> be
    chosen, the alternatives are listed within braces
    (“<span class="quote"><code class="literal">{</code></span>” and
    “<span class="quote"><code class="literal">}</code></span>”):
  </p><pre class="programlisting">{DESCRIBE | DESC} <em class="replaceable"><code>tbl_name</code></em> [<em class="replaceable"><code>col_name</code></em> | <em class="replaceable"><code>wild</code></em>]
</pre><p>
    An ellipsis (<code class="literal">...</code>) indicates the omission of a
    section of a statement, typically to provide a shorter version of
    more complex syntax. For example,
    <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT ... INTO
    OUTFILE</code></a> is shorthand for the form of
    <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT</code></a> statement that has an
    <code class="literal">INTO OUTFILE</code> clause following other parts of the
    statement.
  </p><p>
    An ellipsis can also indicate that the preceding syntax element of a
    statement may be repeated. In the following example, multiple
    <em class="replaceable"><code>reset_option</code></em> values may be given, with
    each of those after the first preceded by commas:
  </p><pre class="programlisting">RESET <em class="replaceable"><code>reset_option</code></em> [,<em class="replaceable"><code>reset_option</code></em>] ...
</pre><p>
    Commands for setting shell variables are shown using Bourne shell
    syntax. For example, the sequence to set the <code class="literal">CC</code>
    environment variable and run the <span><strong class="command">configure</strong></span>
    command looks like this in Bourne shell syntax:
  </p><pre class="programlisting">shell&gt; <strong class="userinput"><code>CC=gcc ./configure</code></strong>
</pre><a class="indexterm" name="id3983354"></a><a class="indexterm" name="id3983363"></a><p>
    If you are using <span><strong class="command">csh</strong></span> or <span><strong class="command">tcsh</strong></span>,
    you must issue commands somewhat differently:
  </p><pre class="programlisting">shell&gt; <strong class="userinput"><code>setenv CC gcc</code></strong>
shell&gt; <strong class="userinput"><code>./configure</code></strong>
</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="what-is"></a>1.3. Overview of the MySQL Database Management System</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="introduction.html#what-is-mysql">1.3.1. What is MySQL?</a></span></dt><dt><span class="section"><a href="introduction.html#history">1.3.2. History of MySQL</a></span></dt><dt><span class="section"><a href="introduction.html#features">1.3.3. The Main Features of MySQL</a></span></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="what-is-mysql"></a>1.3.1. What is MySQL?</h3></div></div></div><a class="indexterm" name="id3983424"></a><a class="indexterm" name="id3983437"></a><p>
      MySQL, the most popular Open Source SQL database management
      system, is developed, distributed, and supported by Sun
      Microsystems, Inc.
    </p><p>
      The MySQL Web site (<a href="http://www.mysql.com/" target="_top">http://www.mysql.com/</a>) provides
      the latest information about MySQL software.
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          MySQL is a database management system.
        </p><p>
          A database is a structured collection of data. It may be
          anything from a simple shopping list to a picture gallery or
          the vast amounts of information in a corporate network. To
          add, access, and process data stored in a computer database,
          you need a database management system such as MySQL Server.
          Since computers are very good at handling large amounts of
          data, database management systems play a central role in
          computing, as standalone utilities, or as parts of other
          applications.
        </p></li><li><p>
          MySQL is a relational database management system.
        </p><p>
          <a class="indexterm" name="id3983488"></a>

          A relational database stores data in separate tables rather
          than putting all the data in one big storeroom. This adds
          speed and flexibility. The SQL part of “<span class="quote">MySQL</span>”
          stands for “<span class="quote">Structured Query Language.</span>” SQL is
          the most common standardized language used to access databases
          and is defined by the ANSI/ISO SQL Standard. The SQL standard
          has been evolving since 1986 and several versions exist. In
          this manual, “<span class="quote">SQL-92</span>” refers to the standard
          released in 1992, “<span class="quote">SQL:1999</span>” refers to the
          standard released in 1999, and “<span class="quote">SQL:2003</span>” refers
          to the current version of the standard. We use the phrase
          “<span class="quote">the SQL standard</span>” to mean the current version of
          the SQL Standard at any time.
        </p></li><li><p>
          MySQL software is Open Source.
        </p><p>
          <a class="indexterm" name="id3983716"></a>

          <a class="indexterm" name="id3983728"></a>

          <a class="indexterm" name="id3983740"></a>

          <a class="indexterm" name="id3983752"></a>

          Open Source means that it is possible for anyone to use and
          modify the software. Anybody can download the MySQL software
          from the Internet and use it without paying anything. If you
          wish, you may study the source code and change it to suit your
          needs. The MySQL software uses the GPL (GNU General Public
          License), <a href="http://www.fsf.org/licenses/" target="_top">http://www.fsf.org/licenses/</a>, to
          define what you may and may not do with the software in
          different situations. If you feel uncomfortable with the GPL
          or need to embed MySQL code into a commercial application, you
          can buy a commercially licensed version from us. See the MySQL
          Licensing Overview for more information
          (<a href="http://www.mysql.com/company/legal/licensing/" target="_top">http://www.mysql.com/company/legal/licensing/</a>).
        </p></li><li><p>
          The MySQL Database Server is very fast, reliable, and easy to
          use.
        </p><p>
          If that is what you are looking for, you should give it a try.
          MySQL Server also has a practical set of features developed in
          close cooperation with our users. You can find a performance
          comparison of MySQL Server with other database managers on our
          benchmark page. See <a href="optimization.html#mysql-benchmarks" title="7.1.4. The MySQL Benchmark Suite">Section 7.1.4, “The MySQL Benchmark Suite”</a>.
        </p><p>
          MySQL Server was originally developed to handle large
          databases much faster than existing solutions and has been
          successfully used in highly demanding production environments
          for several years. Although under constant development, MySQL
          Server today offers a rich and useful set of functions. Its
          connectivity, speed, and security make MySQL Server highly
          suited for accessing databases on the Internet.
        </p></li><li><p>
          MySQL Server works in client/server or embedded systems.
        </p><p>
          The MySQL Database Software is a client/server system that
          consists of a multi-threaded SQL server that supports
          different backends, several different client programs and
          libraries, administrative tools, and a wide range of
          application programming interfaces (APIs).
        </p><p>
          We also provide MySQL Server as an embedded multi-threaded
          library that you can link into your application to get a
          smaller, faster, easier-to-manage standalone product.
        </p></li><li><p>
          A large amount of contributed MySQL software is available.
        </p><p>
          It is very likely that your favorite application or language
          supports the MySQL Database Server.
        </p></li></ul></div><a class="indexterm" name="id3983835"></a><a class="indexterm" name="id3983847"></a><a class="indexterm" name="id3983860"></a><p>
      The official way to pronounce “<span class="quote">MySQL</span>” is “<span class="quote">My
      Ess Que Ell</span>” (not “<span class="quote">my sequel</span>”), but we do not
      mind if you pronounce it as “<span class="quote">my sequel</span>” or in some
      other localized way.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="history"></a>1.3.2. History of MySQL</h3></div></div></div><a class="indexterm" name="id3983896"></a><a class="indexterm" name="id3983905"></a><a class="indexterm" name="id3983914"></a><a class="indexterm" name="id3983923"></a><a class="indexterm" name="id3983935"></a><a class="indexterm" name="id3983944"></a><p>
      We started out with the intention of using the
      <code class="literal">mSQL</code> database system to connect to our tables
      using our own fast low-level (ISAM) routines. However, after some
      testing, we came to the conclusion that <code class="literal">mSQL</code>
      was not fast enough or flexible enough for our needs. This
      resulted in a new SQL interface to our database but with almost
      the same API interface as <code class="literal">mSQL</code>. This API was
      designed to allow third-party code that was written for use with
      <code class="literal">mSQL</code> to be ported easily for use with MySQL.
    </p><p>
      MySQL is named after co-founder Monty Widenius's daughter, My.
    </p><p>
      The name of the MySQL Dolphin (our logo) is “<span class="quote">Sakila,</span>”
      which was chosen from a huge list of names suggested by users in
      our “<span class="quote">Name the Dolphin</span>” contest. The winning name was
      submitted by Ambrose Twebaze, an Open Source software developer
      from Swaziland, Africa. According to Ambrose, the feminine name
      Sakila has its roots in SiSwati, the local language of Swaziland.
      Sakila is also the name of a town in Arusha, Tanzania, near
      Ambrose's country of origin, Uganda.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="features"></a>1.3.3. The Main Features of MySQL</h3></div></div></div><a class="indexterm" name="id3984011"></a><a class="indexterm" name="id3984020"></a><p>
      This section describes some of the important characteristics of
      the MySQL Database Software. See also <a href="introduction.html#roadmap" title="1.4. MySQL Development Roadmap">Section 1.4, “MySQL Development Roadmap”</a>,
      for more information about current and upcoming features. In most
      respects, the roadmap applies to all versions of MySQL. For
      information about features as they are introduced into MySQL on a
      series-specific basis, see the “<span class="quote">In a Nutshell</span>”
      section of the appropriate Manual:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          MySQL 4.0: <a href="http://dev.mysql.com/doc/refman/4.1/en/mysql-4-0-nutshell.html" target="_top">MySQL 4.0 in a
          Nutshell</a>
        </p></li><li><p>
          MySQL 4.1: <a href="http://dev.mysql.com/doc/refman/4.1/en/mysql-nutshell.html" target="_top">MySQL 4.1
          in a Nutshell</a>
        </p></li><li><p>
          MySQL 5.0: <a href="http://dev.mysql.com/doc/refman/5.0/en/mysql-nutshell.html" target="_top">MySQL 5.0
          in a Nutshell</a>
        </p></li><li><p>
          MySQL 5.1: <a href="introduction.html#mysql-nutshell" title="1.4.1. What Is New in MySQL 5.1">MySQL 5.1
          in a Nutshell</a>
        </p></li><li><p>
          MySQL 5.4: <a href="http://dev.mysql.com/doc/refman/5.4/en/mysql-nutshell.html" target="_top">MySQL 5.4
          in a Nutshell</a>
        </p></li></ul></div><p>
      Internals and Portability:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          Written in C and C++.
        </p></li><li><p>
          Tested with a broad range of different compilers.
        </p></li><li><p>
          Works on many different platforms. See
          <a href="http://dev.mysql.com/doc/refman/5.4/en/which-os.html" target="_top">Operating Systems Supported by MySQL Community Server</a>.
        </p></li><li><p>
          Uses GNU Automake, Autoconf, and Libtool for portability.
        </p></li><li><p>
          Tested with Purify (a commercial memory leakage detector) as
          well as with Valgrind, a GPL tool
          (<a href="http://developer.kde.org/~sewardj/" target="_top">http://developer.kde.org/~sewardj/</a>).
        </p></li><li><p>
          Uses multi-layered server design with independent modules.
        </p></li><li><p>
          Designed to be fully multi-threaded using kernel threads, to
          easily use multiple CPUs if they are available.
        </p></li><li><p>
          Provides transactional and nontransactional storage engines.
        </p></li><li><p>
          Uses very fast B-tree disk tables (<code class="literal">MyISAM</code>)
          with index compression.
        </p></li><li><p>
          Designed to make it relatively easy to add other storage
          engines. This is useful if you want to provide an SQL
          interface for an in-house database.
        </p></li><li><p>
          Uses a very fast thread-based memory allocation system.
        </p></li><li><p>
          Executes very fast joins using an optimized one-sweep
          multi-join.
        </p></li><li><p>
          Implements in-memory hash tables, which are used as temporary
          tables.
        </p></li><li><p>
          Implements SQL functions using a highly optimized class
          library that should be as fast as possible. Usually there is
          no memory allocation at all after query initialization.
        </p></li><li><p>
          Provides the server as a separate program for use in a
          client/server networked environment, and as a library that can
          be embedded (linked) into standalone applications. Such
          applications can be used in isolation or in environments where
          no network is available.
        </p></li></ul></div><p>
      Data Types:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          Many data types: signed/unsigned integers 1, 2, 3, 4, and 8
          bytes long, <a href="data-types.html#numeric-types" title="10.2. Numeric Types"><code class="literal">FLOAT</code></a>,
          <a href="data-types.html#numeric-types" title="10.2. Numeric Types"><code class="literal">DOUBLE</code></a>,
          <a href="data-types.html#char" title="10.4.1. The CHAR and
        VARCHAR Types"><code class="literal">CHAR</code></a>,
          <a href="data-types.html#char" title="10.4.1. The CHAR and
        VARCHAR Types"><code class="literal">VARCHAR</code></a>,
          <a href="data-types.html#binary-varbinary" title="10.4.2. The BINARY and
        VARBINARY Types"><code class="literal">BINARY</code></a>,
          <a href="data-types.html#binary-varbinary" title="10.4.2. The BINARY and
        VARBINARY Types"><code class="literal">VARBINARY</code></a>,
          <a href="data-types.html#blob" title="10.4.3. The BLOB and
        TEXT Types"><code class="literal">TEXT</code></a>,
          <a href="data-types.html#blob" title="10.4.3. The BLOB and
        TEXT Types"><code class="literal">BLOB</code></a>,
          <a href="data-types.html#datetime" title="10.3.1. The DATETIME,
        DATE, and
        TIMESTAMP Types"><code class="literal">DATE</code></a>,
          <a href="data-types.html#time" title="10.3.2. The TIME Type"><code class="literal">TIME</code></a>,
          <a href="data-types.html#datetime" title="10.3.1. The DATETIME,
        DATE, and
        TIMESTAMP Types"><code class="literal">DATETIME</code></a>,
          <a href="data-types.html#datetime" title="10.3.1. The DATETIME,
        DATE, and
        TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a>,
          <a href="data-types.html#year" title="10.3.3. The YEAR Type"><code class="literal">YEAR</code></a>,
          <a href="data-types.html#set" title="10.4.5. The SET Type"><code class="literal">SET</code></a>,
          <a href="data-types.html#enum" title="10.4.4. The ENUM Type"><code class="literal">ENUM</code></a>, and OpenGIS spatial
          types. See <a href="data-types.html" title="Chapter 10. Data Types">Chapter 10, <i>Data Types</i></a>.
        </p></li><li><p>
          Fixed-length and variable-length string types.
        </p></li></ul></div><p>
      Statements and Functions:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          Full operator and function support in the
          <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT</code></a> list and
          <code class="literal">WHERE</code> clause of queries. For example:
        </p><pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT CONCAT(first_name, ' ', last_name)</code></strong>
    -&gt; <strong class="userinput"><code>FROM citizen</code></strong>
    -&gt; <strong class="userinput"><code>WHERE income/dependents &gt; 10000 AND age &gt; 30;</code></strong>
</pre></li><li><p>
          Full support for SQL <code class="literal">GROUP BY</code> and
          <code class="literal">ORDER BY</code> clauses. Support for group
          functions (<a href="functions.html#function_count"><code class="literal">COUNT()</code></a>,
          <a href="functions.html#function_avg"><code class="literal">AVG()</code></a>,
          <a href="functions.html#function_std"><code class="literal">STD()</code></a>,
          <a href="functions.html#function_sum"><code class="literal">SUM()</code></a>,
          <a href="functions.html#function_max"><code class="literal">MAX()</code></a>,
          <a href="functions.html#function_min"><code class="literal">MIN()</code></a>, and
          <a href="functions.html#function_group-concat"><code class="literal">GROUP_CONCAT()</code></a>).
        </p></li><li><p>
          Support for <code class="literal">LEFT OUTER JOIN</code> and
          <code class="literal">RIGHT OUTER JOIN</code> with both standard SQL and
          ODBC syntax.
        </p></li><li><p>
          Support for aliases on tables and columns as required by
          standard SQL.
        </p></li><li><p>
          Support for <a href="sql-syntax.html#delete" title="12.2.2. DELETE Syntax"><code class="literal">DELETE</code></a>,
          <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT</code></a>,
          <a href="sql-syntax.html#replace" title="12.2.7. REPLACE Syntax"><code class="literal">REPLACE</code></a>, and
          <a href="sql-syntax.html#update" title="12.2.11. UPDATE Syntax"><code class="literal">UPDATE</code></a> to return the number of
          rows that were changed (affected), or to return the number of
          rows matched instead by setting a flag when connecting to the
          server.
        </p></li><li><p>
          Support for MySQL-specific <a href="sql-syntax.html#show" title="12.5.5. SHOW Syntax"><code class="literal">SHOW</code></a>
          statements that retrieve information about databases, storage
          engines, tables, and indexes. MySQL 5.0 adds support for the
          <code class="literal">INFORMATION_SCHEMA</code> database, implemented
          according to standard SQL.
        </p></li><li><p>
          An <a href="sql-syntax.html#explain" title="12.3.2. EXPLAIN Syntax"><code class="literal">EXPLAIN</code></a> statement to show
          how the optimizer resolves a query.
        </p></li><li><p>
          Independence of function names from table or column names. For
          example, <code class="literal">ABS</code> is a valid column name. The
          only restriction is that for a function call, no spaces are
          allowed between the function name and the
          “<span class="quote"><code class="literal">(</code></span>” that follows it. See
          <a href="language-structure.html#reserved-words" title="8.3. Reserved Words">Section 8.3, “Reserved Words”</a>.
        </p></li><li><p>
          You can refer to tables from different databases in the same
          statement.
        </p></li></ul></div><p>
      Security:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          A privilege and password system that is very flexible and
          secure, and that allows host-based verification.
        </p></li><li><p>
          Password security by encryption of all password traffic when
          you connect to a server.
        </p></li></ul></div><p>
      Scalability and Limits:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          Support for large databases. We use MySQL Server with
          databases that contain 50 million records. We also know of
          users who use MySQL Server with 200,000 tables and about
          5,000,000,000 rows.
        </p></li><li><p>
          Support for up to 64 indexes per table (32 before MySQL
          4.1.2). Each index may consist of 1 to 16 columns or parts of
          columns. The maximum index width is 1000 bytes (767 for
          <code class="literal">InnoDB</code>); before MySQL 4.1.2, the limit is
          500 bytes. An index may use a prefix of a column for
          <a href="data-types.html#char" title="10.4.1. The CHAR and
        VARCHAR Types"><code class="literal">CHAR</code></a>,
          <a href="data-types.html#char" title="10.4.1. The CHAR and
        VARCHAR Types"><code class="literal">VARCHAR</code></a>,
          <a href="data-types.html#blob" title="10.4.3. The BLOB and
        TEXT Types"><code class="literal">BLOB</code></a>, or
          <a href="data-types.html#blob" title="10.4.3. The BLOB and
        TEXT Types"><code class="literal">TEXT</code></a> column types.
        </p></li></ul></div><p>
      Connectivity:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          Clients can connect to MySQL Server using several protocols:
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Clients can connect using TCP/IP sockets on any platform.
            </p></li><li><p>
              On Windows systems in the NT family (NT, 2000, XP, 2003,
              or Vista), clients can connect using named pipes if the
              server is started with the
              <a href="server-administration.html#option_mysqld_enable-named-pipe"><code class="option">--enable-named-pipe</code></a> option.
              In MySQL 4.1 and higher, Windows servers also support
              shared-memory connections if started with the
              <a href="server-administration.html#option_mysqld_shared-memory"><code class="option">--shared-memory</code></a> option.
              Clients can connect through shared memory by using the
              <code class="option">--protocol=memory</code> option.
            </p></li><li><p>
              On Unix systems, clients can connect using Unix domain
              socket files.
            </p></li></ul></div></li><li><p>
          MySQL client programs can be written in many languages. A
          client library written in C is available for clients written
          in C or C++, or for any language that provides C bindings.
        </p></li><li><p>
          APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and
          Tcl are available, allowing MySQL clients to be written in
          many languages. See <a href="connectors-apis.html" title="Chapter 21. Connectors and APIs">Chapter 21, <i>Connectors and APIs</i></a>.
        </p></li><li><p>
          The Connector/ODBC (MyODBC) interface provides MySQL support
          for client programs that use ODBC (Open Database Connectivity)
          connections. For example, you can use MS Access to connect to
          your MySQL server. Clients can be run on Windows or Unix.
          MyODBC source is available. All ODBC 2.5 functions are
          supported, as are many others. See
          <a href="connectors-apis.html#connector-odbc" title="21.1. MySQL Connector/ODBC">Section 21.1, “MySQL Connector/ODBC”</a>.
        </p></li><li><p>
          The Connector/J interface provides MySQL support for Java
          client programs that use JDBC connections. Clients can be run
          on Windows or Unix. Connector/J source is available. See
          <a href="connectors-apis.html#connector-j" title="21.3. MySQL Connector/J">Section 21.3, “MySQL Connector/J”</a>.
        </p></li><li><p>
          MySQL Connector/NET enables developers to easily create .NET
          applications that require secure, high-performance data
          connectivity with MySQL. It implements the required ADO.NET
          interfaces and integrates into ADO.NET aware tools. Developers
          can build applications using their choice of .NET languages.
          MySQL Connector/NET is a fully managed ADO.NET driver written
          in 100% pure C#. See <a href="connectors-apis.html#connector-net" title="21.2. MySQL Connector/NET">Section 21.2, “MySQL Connector/NET”</a>.
        </p></li></ul></div><p>
      Localization:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          The server can provide error messages to clients in many
          languages. See <a href="internationalization-localization.html#error-message-language" title="9.3. Setting the Error Message Language">Section 9.3, “Setting the Error Message Language”</a>.
        </p></li><li><p>
          Full support for several different character sets, including
          <code class="literal">latin1</code> (cp1252), <code class="literal">german</code>,
          <code class="literal">big5</code>, <code class="literal">ujis</code>, and more.
          For example, the Scandinavian characters
          “<span class="quote"><code class="literal">å</code></span>”,
          “<span class="quote"><code class="literal">ä</code></span>” and
          “<span class="quote"><code class="literal">ö</code></span>” are allowed in table and
          column names. Unicode support is available as of MySQL 4.1.
        </p></li><li><p>
          All data is saved in the chosen character set.
        </p></li><li><p>
          Sorting and comparisons are done according to the chosen
          character set and collation (using <code class="literal">latin1</code>
          and Swedish collation by default). It is possible to change
          this when the MySQL server is started. To see an example of
          very advanced sorting, look at the Czech sorting code. MySQL
          Server supports many different character sets that can be
          specified at compile time and runtime.
        </p></li><li><p>
          As of MySQL 4.1, the server time zone can be changed
          dynamically, and individual clients can specify their own time
          zone. <a href="internationalization-localization.html#time-zone-support" title="9.7. MySQL Server Time Zone Support">Section 9.7, “MySQL Server Time Zone Support”</a>.
        </p></li></ul></div><p class="mnmas"><b>MySQL Enterprise</b>
        For assistance in getting optimal performance from your MySQL
        server subscribe to MySQL Enterprise. For more information, see
        <a href="http://www.mysql.com/products/enterprise/" target="_top">http://www.mysql.com/products/enterprise/</a>.
      </p><p>
      Clients and Tools:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          MySQL includes several client and utility programs. These
          include both command-line programs such as
          <a href="programs.html#mysqldump" title="4.5.4. mysqldump — A Database Backup Program"><span><strong class="command">mysqldump</strong></span></a> and
          <a href="programs.html#mysqladmin" title="4.5.2. mysqladmin — Client for Administering a MySQL Server"><span><strong class="command">mysqladmin</strong></span></a>, and graphical programs such as
          MySQL Administrator and MySQL Query Browser.
        </p></li><li><p>
          MySQL Server has built-in support for SQL statements to check,
          optimize, and repair tables. These statements are available
          from the command line through the
          <a href="programs.html#mysqlcheck" title="4.5.3. mysqlcheck — A Table Maintenance Program"><span><strong class="command">mysqlcheck</strong></span></a> client. MySQL also includes
          <a href="programs.html#myisamchk" title="4.6.3. myisamchk — MyISAM Table-Maintenance Utility"><span><strong class="command">myisamchk</strong></span></a>, a very fast command-line utility
          for performing these operations on <code class="literal">MyISAM</code>
          tables. See <a href="programs.html" title="Chapter 4. MySQL Programs">Chapter 4, <i>MySQL Programs</i></a>.
        </p></li><li><p>
          MySQL programs can be invoked with the <code class="option">--help</code>
          or <code class="option">-?</code> option to obtain online assistance.
        </p></li></ul></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="roadmap"></a>1.4. MySQL Development Roadmap</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="introduction.html#mysql-nutshell">1.4.1. What Is New in MySQL 5.1</a></span></dt><dt><span class="section"><a href="introduction.html#mysql-next-series-plans">1.4.2. What Is Planned for MySQL 5.4</a></span></dt></dl></div><p>
      This section describes the general MySQL development roadmap,
      provides an overview about features that have been implemented in
      previous series and that are new in MySQL 5.1, the
      release series covered in this manual. The maturity level this
      release series is general availability. Information about maturity
      levels can be found in <a href="installing.html#choosing-version" title="2.1.2.1. Choosing Which Version of MySQL to Install">Section 2.1.2.1, “Choosing Which Version of MySQL to Install”</a>. This
      section also provides an overview about upcoming additions or
      changes in the next release series (5.4).
    </p><p>
      Before upgrading from one release series to the next, please see
      the notes in <a href="installing.html#upgrade" title="2.4.1. Upgrading MySQL">Section 2.4.1, “Upgrading MySQL”</a>.
    </p><p>
      The most requested features and the versions in which they were
      implemented or are scheduled for implementation are summarized in
      the following table.
    </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Feature</strong></span></td><td><span class="bold"><strong>MySQL Series</strong></span></td></tr><tr><td>Unions</td><td>4.0</td></tr><tr><td>Subqueries</td><td>4.1</td></tr><tr><td>R-trees</td><td>4.1 (for the <code class="literal">MyISAM</code> storage engine)</td></tr><tr><td>Stored procedures and functions</td><td>5.0</td></tr><tr><td>Views</td><td>5.0</td></tr><tr><td>Cursors</td><td>5.0</td></tr><tr><td>XA transactions</td><td>5.0</td></tr><tr><td>Triggers</td><td>5.0 and 5.1</td></tr><tr><td>Event scheduler</td><td>5.1</td></tr><tr><td>Partitioning</td><td>5.1</td></tr><tr><td>Pluggable storage engine API</td><td>5.1</td></tr><tr><td>Plugin API</td><td>5.1</td></tr><tr><td>Row-based replication</td><td>5.1</td></tr><tr><td>Server log tables</td><td>5.1</td></tr><tr><td>Foreign keys</td><td>6.x (implemented in 3.23 for <code class="literal">InnoDB</code>)</td></tr></tbody></table></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-nutshell"></a>1.4.1. What Is New in MySQL 5.1</h3></div></div></div><p>
        The following features have been added to MySQL 5.1.
      </p><div class="itemizedlist"><ul type="disc"><li><p><b>Partitioning. </b>
              This capability enables distributing portions of
              individual tables across a file system, according to rules
              which can be set when the table is created. In effect,
              different portions of a table are stored as separate
              tables in different locations, but from the user point of
              view, the partitioned table is still a single table.
              Syntactically, this implements a number of new extensions
              to the <a href="sql-syntax.html#create-table" title="12.1.17. CREATE TABLE Syntax"><code class="literal">CREATE TABLE</code></a>,
              <a href="sql-syntax.html#alter-table" title="12.1.7. ALTER TABLE Syntax"><code class="literal">ALTER TABLE</code></a>, and
              <code class="literal">EXPLAIN ... SELECT</code> statements. As of
              MySQL 5.1.6, queries against partitioned tables can take
              advantage of <span class="emphasis"><em>partition pruning</em></span>. In
              some cases, this can result in query execution that is an
              order of magnitude faster than the same query against a
              nonpartitioned version of the same table. See
              <a href="partitioning.html" title="Chapter 18. Partitioning">Chapter 18, <i>Partitioning</i></a>, for further information on
              this functionality. (Author: Mikael Ronström)
            </p></li><li><p><b>Row-based replication. </b>
              Replication capabilities in MySQL originally were based on
              propagation of SQL statements from master to slave. This
              is called <span class="emphasis"><em>statement-based
              replication</em></span>. As of MySQL 5.1.5, another basis
              for replication is available. This is called
              <span class="emphasis"><em>row-based replication</em></span>. Instead of
              sending SQL statements to the slave, the master writes
              events to its binary log that indicate how individual
              table rows are effected. As of MySQL 5.1.8, a third option
              is available: <span class="emphasis"><em>mixed</em></span>. This will use
              statement-based replication by default, and only switch to
              row-based replication in particular cases. See
              <a href="replication.html#replication-formats" title="16.1.2. Replication Formats">Section 16.1.2, “Replication Formats”</a>. (Authors: Lars
              Thalmann, Guilhem Bichot, Mats Kindahl)
            </p></li><li><p><b>Plugin API. </b>
              MySQL 5.1 adds support for a very flexible plugin API that
              enables loading and unloading of various components at
              runtime, without restarting the server. Although the work
              on this is not finished yet, <span class="emphasis"><em>plugin full-text
              parsers</em></span> are a first step in this direction.
              This allows users to implement their own input filter on
              the indexed text, enabling full-text search capability on
              arbitrary data such as PDF files or other document
              formats. A pre-parser full-text plugin performs the actual
              parsing and extraction of the text and hands it over to
              the built-in MySQL full-text search. See
              <a href="extending-mysql.html#plugin-api" title="22.2. The MySQL Plugin Interface">Section 22.2, “The MySQL Plugin Interface”</a>. (Author: Sergey Vojtovich)
            </p></li><li><p><b>Event scheduler. </b>
              MySQL Events are tasks that run according to a schedule.
              When you create an event, you are creating a named
              database object containing one or more SQL statements to
              be executed at one or more regular intervals, beginning
              and ending at a specific date and time. Conceptually, this
              is similar to the idea of the Unix
              <code class="literal">crontab</code> (also known as a “<span class="quote">cron
              job</span>”) or the Windows Task Scheduler. See
              <a href="stored-programs-views.html#events" title="19.4. Using the Event Scheduler">Section 19.4, “Using the Event Scheduler”</a>. (Author: Andrey Hristov)
            </p></li><li><p><b>Server log tables. </b>
              Before MySQL 5.1, the server writes general query log and
              slow query log entries to log files. As of MySQL 5.1, the
              server's logging capabilities for these logs are more
              flexible. Log entries can be written to log files (as
              before) or to the
              <a href="server-administration.html#sysvar_general_log"><code class="literal">general_log</code></a> and
              <code class="literal">slow_log</code> tables in the
              <code class="literal">mysql</code> database. If logging is enabled,
              either or both destinations can be selected. The
              <a href="server-administration.html#option_mysqld_log-output"><code class="option">--log-output</code></a> option
              controls the destination or destinations of log output.
              See <a href="server-administration.html#log-tables" title="5.2.1. Selecting General Query and Slow Query Log Output Destinations">Section 5.2.1, “Selecting General Query and Slow Query Log Output Destinations”</a>. (Author: Petr Chardin)
            </p></li><li><p><b>Upgrade program. </b>
              The <a href="programs.html#mysql-upgrade" title="4.4.8. mysql_upgrade — Check Tables for MySQL Upgrade"><span><strong class="command">mysql_upgrade</strong></span></a> program (available as
              of MySQL 5.1.7) checks all existing tables for
              incompatibilities with the current version of MySQL Server
              and repairs them if necessary. This program should be run
              for each MySQL upgrade. See
              <a href="programs.html#mysql-upgrade" title="4.4.8. mysql_upgrade — Check Tables for MySQL Upgrade">Section 4.4.8, “<span><strong class="command">mysql_upgrade</strong></span> — Check Tables for MySQL Upgrade”</a>. (Authors: Alexey
              Botchkov, Mikael Widenius)
            </p></li><li><p><b>MySQL Cluster. </b>
              MySQL Cluster is now released as a separate product, based
              on MySQL 5.1 but with the addition of the
              <code class="literal">NDBCLUSTER</code> storage engine.
              Clustering support is no longer available in mainline
              MySQL 5.1 releases. MySQL Cluster releases are identified
              by a 3-part NDB version number; currently, the MySQL
              Cluster NDB 6.2 and MySQL Cluster NDB 6.3 release series
              are available for production use.
            </p><p>
            Some of the changes in MySQL Cluster since MySQL 5.0 are
            listed here:

            </p><div class="itemizedlist"><ul type="circle"><li><p><b>MySQL Cluster replication. </b>
                    Replication between MySQL Clusters is now supported.
                    It is now also possible to replicate between a MySQL
                    Cluster and a noncluster database. See
                    <a href="mysql-cluster.html#mysql-cluster-replication" title="17.6. MySQL Cluster Replication">Section 17.6, “MySQL Cluster Replication”</a>.
                  </p></li><li><p><b>MySQL Cluster disk data storage. </b>
                    Formerly, the
                    <code class="literal">NDBCLUSTER</code> storage
                    engine was strictly in-memory; now, it is possible
                    to store Cluster data (but not indexes) on disk.
                    This allows MySQL Cluster to scale upward with fewer
                    hardware (RAM) requirements than previously. In
                    addition, the Disk Data implementation includes a
                    new “<span class="quote">no-steal</span>” restoration algorithm
                    for fast node restarts when storing very large
                    amounts of data (terabyte range). See
                    <a href="mysql-cluster.html#mysql-cluster-disk-data" title="17.5.9. MySQL Cluster Disk Data Tables">Section 17.5.9, “MySQL Cluster Disk Data Tables”</a>, for more
                    information.
                  </p></li><li><p><b>Improved backups for MySQL Cluster. </b>
                    A fault arising in a single data node during a
                    Cluster backup no longer causes the entire backup to
                    be aborted, as occurred in previous versions of
                    MySQL Cluster.
                  </p></li></ul></div><p>
          </p><p>
            Many other new features and improvements have been made to
            the <code class="literal">NDBCLUSTER</code> storage engine
            in MySQL Cluster NDB 6.2 and MySQL Cluster NDB 6.3; for more
            information about these, see
            <a href="mysql-cluster.html#mysql-cluster-roadmap" title="17.1.4. MySQL Cluster Development Roadmap">Section 17.1.4, “MySQL Cluster Development Roadmap”</a>.
          </p></li><li><p><b>Backup of tablespaces. </b>
              The <a href="programs.html#mysqldump" title="4.5.4. mysqldump — A Database Backup Program"><span><strong class="command">mysqldump</strong></span></a> utility now supports an
              option for dumping tablespaces. Use <code class="option">-Y</code> or
              <a href="programs.html#option_mysqldump_all-tablespaces"><code class="option">--all-tablespaces</code></a> to
              enable this functionality.
            </p></li><li><p><b>Improvements to <code class="literal">INFORMATION_SCHEMA</code>. </b>
              MySQL 5.1 provides much more information in its metadata
              database than was available in MySQL 5.0. New tables in
              the <code class="literal">INFORMATION_SCHEMA</code> database include
              <a href="information-schema.html#files-table" title="20.21. The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a>,
              <a href="information-schema.html#events-table" title="20.20. The INFORMATION_SCHEMA EVENTS Table"><code class="literal">EVENTS</code></a>,
              <a href="information-schema.html#partitions-table" title="20.19. The INFORMATION_SCHEMA PARTITIONS Table"><code class="literal">PARTITIONS</code></a>,
              <a href="information-schema.html#processlist-table" title="20.22. The INFORMATION_SCHEMA PROCESSLIST Table"><code class="literal">PROCESSLIST</code></a>,
              <a href="information-schema.html#engines-table" title="20.18. The INFORMATION_SCHEMA ENGINES Table"><code class="literal">ENGINES</code></a>, and
              <a href="information-schema.html#plugins-table" title="20.17. The INFORMATION_SCHEMA PLUGINS Table"><code class="literal">PLUGINS</code></a>.
            </p></li><li><p><b>XML functions with XPath support. </b>
              <a href="functions.html#function_extractvalue"><code class="literal">ExtractValue()</code></a> returns the
              content of a fragment of XML matching a given XPath
              expression. <a href="functions.html#function_updatexml"><code class="literal">UpdateXML()</code></a>
              replaces the element selected from a fragment of XML by an
              XPath expression supplied by the user with a second XML
              fragment (also user-supplied), and returns the modified
              XML. See <a href="functions.html#xml-functions" title="11.10. XML Functions">Section 11.10, “XML Functions”</a>. (Author:
              Alexander Barkov)
            </p></li><li><p><b>Load emulator. </b>
              The <a href="programs.html#mysqlslap" title="4.5.7. mysqlslap — Load Emulation Client"><span><strong class="command">mysqlslap</strong></span></a> program is designed to
              emulate client load for a MySQL server and report the
              timing of each stage. It works as if multiple clients were
              accessing the server. See <a href="programs.html#mysqlslap" title="4.5.7. mysqlslap — Load Emulation Client">Section 4.5.7, “<span><strong class="command">mysqlslap</strong></span> — Load Emulation Client”</a>.
              (Authors: Patrick Galbraith, Brian Aker)
            </p></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-next-series-plans"></a>1.4.2. What Is Planned for MySQL 5.4</h3></div></div></div><p>
        The following features are expected to be added to MySQL 5.4:
      </p><div class="itemizedlist"><ul type="disc"><li><p>
            Scalability improvements to improve scalability on
            multi-core CPUs.
          </p></li><li><p>
            <code class="literal">InnoDB</code> I/O subsystem changes to enable
            more effective use of available I/O capacity.
          </p></li><li><p>
            Several modifications to improve operation of MySQL Server
            on Solaris.
          </p></li><li><p>
            Diagnostic and monitoring capability improvements for better
            access to execution and performance information.
          </p></li><li><p>
            Changes to “<span class="quote">out of box</span>” configuration to
            provide better choices of default option and system variable
            values for MySQL operation on up to 16-way x86 servers and
            64-way CMT servers with 4GB or more memory.
          </p></li></ul></div><p>
        The following constructs are deprecated and will be removed in a
        future MySQL release. Where alternatives are shown, applications
        should be updated to use them.
      </p><div class="itemizedlist"><ul type="disc"><li><p>
            The <a href="server-administration.html#sysvar_table_type"><code class="literal">table_type</code></a> system
            variable (use
            <a href="server-administration.html#sysvar_storage_engine"><code class="literal">storage_engine</code></a>).
          </p><p>
            The <code class="literal">TYPE</code> table option to specify the
            storage engine for <a href="sql-syntax.html#create-table" title="12.1.17. CREATE TABLE Syntax"><code class="literal">CREATE
            TABLE</code></a> or <a href="sql-syntax.html#alter-table" title="12.1.7. ALTER TABLE Syntax"><code class="literal">ALTER
            TABLE</code></a> (use <code class="literal">ENGINE</code>).
          </p><p>
            The <code class="literal">SHOW TABLE TYPES</code> SQL statement (use
            <a href="sql-syntax.html#show-engines" title="12.5.5.17. SHOW ENGINES Syntax"><code class="literal">SHOW ENGINES</code></a>).
          </p></li><li><p>
            The <code class="literal">log_bin_trust_routine_creators</code>
            variable (use
            <a href="server-administration.html#sysvar_log_bin_trust_function_creators"><code class="literal">log_bin_trust_function_creators</code></a>).
          </p></li><li><p>
            <a href="data-types.html#datetime" title="10.3.1. The DATETIME,
        DATE, and
        TIMESTAMP Types"><code class="literal">TIMESTAMP(<em class="replaceable"><code>N</code></em>)</code></a>:
            The ability to specify a display width of
            <em class="replaceable"><code>N</code></em> (use without
            <em class="replaceable"><code>N</code></em>).
          </p></li><li><p>
            The <a href="sql-syntax.html#show-innodb-status" title="12.5.5.24. SHOW INNODB STATUS Syntax"><code class="literal">SHOW INNODB STATUS</code></a> and
            <code class="literal">SHOW MUTEX STATUS</code> SQL statements (use
            <a href="sql-syntax.html#show-engine" title="12.5.5.16. SHOW ENGINE Syntax"><code class="literal">SHOW ENGINE
            INNODB STATUS</code></a> for both of these).
          </p></li><li><p>
            The <code class="literal">LOAD TABLE ... FROM MASTER</code> and
            <code class="literal">LOAD DATA FROM MASTER</code> SQL statements.
          </p></li><li><p>
            The <code class="literal">SHOW PLUGIN</code> SQL statement (use
            <a href="sql-syntax.html#show-plugins" title="12.5.5.27. SHOW PLUGINS Syntax"><code class="literal">SHOW PLUGINS</code></a>).
          </p></li><li><p>
            The <code class="option">--master-<em class="replaceable"><code>xxx</code></em></code>
            server options to set replication parameters (use the
            <a href="sql-syntax.html#change-master-to" title="12.6.2.1. CHANGE MASTER TO Syntax"><code class="literal">CHANGE MASTER TO</code></a> statement
            instead): <code class="option">--master-host</code>,
            <code class="option">--master-user</code>, <code class="option">--master-password
            </code>, <code class="option">--master-port</code>,
            <code class="option">--master-connect-retry</code>,
            <code class="option">--master-ssl</code>,
            <code class="option">--master-ssl-ca</code>,
            <code class="option">--master-ssl-capath</code>,
            <code class="option">--master-ssl-cert</code>,
            <code class="option">--master-ssl-cipher</code>,
            <code class="option">--master-ssl-key</code>.
          </p></li></ul></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="information-sources"></a>1.5. MySQL Information Sources</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="introduction.html#mailing-lists">1.5.1. MySQL Mailing Lists</a></span></dt><dt><span class="section"><a href="introduction.html#forums">1.5.2. MySQL Community Support at the MySQL Forums</a></span></dt><dt><span class="section"><a href="introduction.html#irc">1.5.3. MySQL Community Support on Internet Relay Chat (IRC)</a></span></dt><dt><span class="section"><a href="introduction.html#mysql-enterprise-information">1.5.4. MySQL Enterprise</a></span></dt></dl></div><p>
    This section lists sources of additional information that you may
    find helpful, such as the MySQL mailing lists and user forums, and
    Internet Relay Chat.
  </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mailing-lists"></a>1.5.1. MySQL Mailing Lists</h3></div></div></div><div class="toc"><dl><dt><span class="section"><a href="introduction.html#mailing-list-use">1.5.1.1. Guidelines for Using the Mailing Lists</a></span></dt></dl></div><a class="indexterm" name="id3986133"></a><a class="indexterm" name="id3986142"></a><a class="indexterm" name="id3986151"></a><a class="indexterm" name="id3986160"></a><p>
      This section introduces the MySQL mailing lists and provides
      guidelines as to how the lists should be used. When you subscribe
      to a mailing list, you receive all postings to the list as email
      messages. You can also send your own questions and answers to the
      list.
    </p><p>
      To subscribe to or unsubscribe from any of the mailing lists
      described in this section, visit
      <a href="http://lists.mysql.com/" target="_top">http://lists.mysql.com/</a>. For most of them, you can
      select the regular version of the list where you get individual
      messages, or a digest version where you get one large message per
      day.
    </p><p>
      Please <span class="emphasis"><em>do not</em></span> send messages about subscribing
      or unsubscribing to any of the mailing lists, because such
      messages are distributed automatically to thousands of other
      users.
    </p><p>
      Your local site may have many subscribers to a MySQL mailing list.
      If so, the site may have a local mailing list, so that messages
      sent from <code class="literal">lists.mysql.com</code> to your site are
      propagated to the local list. In such cases, please contact your
      system administrator to be added to or dropped from the local
      MySQL list.
    </p><p>
      If you wish to have traffic for a mailing list go to a separate
      mailbox in your mail program, set up a filter based on the message
      headers. You can use either the <code class="literal">List-ID:</code> or
      <code class="literal">Delivered-To:</code> headers to identify list
      messages.
    </p><p>
      The MySQL mailing lists are as follows:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          <code class="literal">announce</code>
        </p><p>
          The list for announcements of new versions of MySQL and
          related programs. This is a low-volume list to which all MySQL
          users should subscribe.
        </p></li><li><p>
          <code class="literal">mysql</code>
        </p><p>
          The main list for general MySQL discussion. Please note that
          some topics are better discussed on the more-specialized
          lists. If you post to the wrong list, you may not get an
          answer.
        </p></li><li><p>
          <code class="literal">bugs</code>
        </p><p>
          The list for people who want to stay informed about issues
          reported since the last release of MySQL or who want to be
          actively involved in the process of bug hunting and fixing.
          See <a href="introduction.html#bug-reports" title="1.6. How to Report Bugs or Problems">Section 1.6, “How to Report Bugs or Problems”</a>.
        </p></li><li><p>
          <code class="literal">internals</code>
        </p><p>
          The list for people who work on the MySQL code. This is also
          the forum for discussions on MySQL development and for posting
          patches.
        </p></li><li><p>
          <code class="literal">mysqldoc</code>
        </p><p>
          The list for people who work on the MySQL documentation:
          people from Sun Microsystems, Inc., translators, and other
          community members.
        </p></li><li><p>
          <code class="literal">benchmarks</code>
        </p><p>
          The list for anyone interested in performance issues.
          Discussions concentrate on database performance (not limited
          to MySQL), but also include broader categories such as
          performance of the kernel, file system, disk system, and so
          on.
        </p></li><li><p>
          <code class="literal">packagers</code>
        </p><p>
          The list for discussions on packaging and distributing MySQL.
          This is the forum used by distribution maintainers to exchange
          ideas on packaging MySQL and on ensuring that MySQL looks and
          feels as similar as possible on all supported platforms and
          operating systems.
        </p></li><li><p>
          <code class="literal">java</code>
        </p><p>
          The list for discussions about the MySQL server and Java. It
          is mostly used to discuss JDBC drivers such as MySQL
          Connector/J.
        </p></li><li><p>
          <code class="literal">win32</code>
        </p><p>
          The list for all topics concerning the MySQL software on
          Microsoft operating systems, such as Windows 9x, Me, NT, 2000,
          XP, and 2003.
        </p></li><li><p>
          <code class="literal">myodbc</code>
        </p><p>
          The list for all topics concerning connecting to the MySQL
          server with ODBC.
        </p></li><li><p>
          <code class="literal">gui-tools</code>
        </p><p>
          The list for all topics concerning MySQL graphical user
          interface tools such as <code class="literal">MySQL Administrator</code>
          and <code class="literal">MySQL Query Browser</code>.
        </p></li><li><p>
          <code class="literal">cluster</code>
        </p><p>
          The list for discussion of MySQL Cluster.
        </p></li><li><p>
          <code class="literal">dotnet</code>
        </p><p>
          The list for discussion of the MySQL server and the .NET
          platform. It is mostly related to MySQL Connector/Net.
        </p></li><li><p>
          <code class="literal">plusplus</code>
        </p><p>
          The list for all topics concerning programming with the C++
          API for MySQL.
        </p></li><li><p>
          <code class="literal">perl</code>
        </p><p>
          The list for all topics concerning Perl support for MySQL with
          <code class="literal">DBD::mysql</code>.
        </p></li></ul></div><p>
      If you're unable to get an answer to your questions from a MySQL
      mailing list or forum, one option is to purchase support from Sun
      Microsystems, Inc. This puts you in direct contact with MySQL
      developers.
    </p><p>
      The following table shows some MySQL mailing lists in languages
      other than English. These lists are not operated by Sun
      Microsystems, Inc.
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          <code class="literal"><code class="email">&lt;<a href="mailto:mysql-france-subscribe@yahoogroups.com">mysql-france-subscribe@yahoogroups.com</a>&gt;</code></code>
        </p><p>
          A French mailing list.
        </p></li><li><p>
          <code class="literal"><code class="email">&lt;<a href="mailto:list@tinc.net">list@tinc.net</a>&gt;</code></code>
        </p><p>
          A Korean mailing list. To subscribe, email <code class="literal">subscribe
          mysql your@email.address</code> to this list.
        </p></li><li><p>
          <code class="literal"><code class="email">&lt;<a href="mailto:mysql-de-request@lists.4t2.com">mysql-de-request@lists.4t2.com</a>&gt;</code></code>
        </p><p>
          A German mailing list. To subscribe, email <code class="literal">subscribe
          mysql-de your@email.address</code> to this list. You can
          find information about this mailing list at
          <a href="http://www.4t2.com/mysql/" target="_top">http://www.4t2.com/mysql/</a>.
        </p></li><li><p>
          <code class="literal"><code class="email">&lt;<a href="mailto:mysql-br-request@listas.linkway.com.br">mysql-br-request@listas.linkway.com.br</a>&gt;</code></code>
        </p><p>
          A Portuguese mailing list. To subscribe, email
          <code class="literal">subscribe mysql-br your@email.address</code> to
          this list.
        </p></li><li><p>
          <code class="literal"><code class="email">&lt;<a href="mailto:mysql-alta@elistas.net">mysql-alta@elistas.net</a>&gt;</code></code>
        </p><p>
          A Spanish mailing list. To subscribe, email <code class="literal">subscribe
          mysql your@email.address</code> to this list.
        </p></li></ul></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="mailing-list-use"></a>1.5.1.1. Guidelines for Using the Mailing Lists</h4></div></div></div><a class="indexterm" name="id3986646"></a><a class="indexterm" name="id3986655"></a><a class="indexterm" name="id3986667"></a><a class="indexterm" name="id3986680"></a><p>
        Please do not post mail messages from your browser with HTML
        mode turned on. Many users do not read mail with a browser.
      </p><p>
        When you answer a question sent to a mailing list, if you
        consider your answer to have broad interest, you may want to
        post it to the list instead of replying directly to the
        individual who asked. Try to make your answer general enough
        that people other than the original poster may benefit from it.
        When you post to the list, please make sure that your answer is
        not a duplication of a previous answer.
      </p><p>
        Try to summarize the essential part of the question in your
        reply. Do not feel obliged to quote the entire original message.
      </p><p>
        When answers are sent to you individually and not to the mailing
        list, it is considered good etiquette to summarize the answers
        and send the summary to the mailing list so that others may have
        the benefit of responses you received that helped you solve your
        problem.
      </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="forums"></a>1.5.2. MySQL Community Support at the MySQL Forums</h3></div></div></div><a class="indexterm" name="id3986724"></a><p>
      The forums at <a href="http://forums.mysql.com" target="_top">http://forums.mysql.com</a> are an
      important community resource. Many forums are available, grouped
      into these general categories:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          Migration
        </p></li><li><p>
          MySQL Usage
        </p></li><li><p>
          MySQL Connectors
        </p></li><li><p>
          Programming Languages
        </p></li><li><p>
          Tools
        </p></li><li><p>
          3rd-Party Applications
        </p></li><li><p>
          Storage Engines
        </p></li><li><p>
          MySQL Technology
        </p></li><li><p>
          SQL Standards
        </p></li><li><p>
          Business
        </p></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="irc"></a>1.5.3. MySQL Community Support on Internet Relay Chat (IRC)</h3></div></div></div><a class="indexterm" name="id3986823"></a><a class="indexterm" name="id3986832"></a><p>
      In addition to the various MySQL mailing lists and forums, you can
      find experienced community people on Internet Relay Chat (IRC).
      These are the best networks/channels currently known to us:
    </p><p>
      <span class="bold"><strong>freenode</strong></span> (see
      <a href="http://www.freenode.net/" target="_top">http://www.freenode.net/</a> for servers)
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          <code class="literal">#mysql</code> is primarily for MySQL questions,
          but other database and general SQL questions are welcome.
          Questions about PHP, Perl, or C in combination with MySQL are
          also common.
        </p></li></ul></div><p>
      If you are looking for IRC client software to connect to an IRC
      network, take a look at <code class="literal">xChat</code>
      (<a href="http://www.xchat.org/" target="_top">http://www.xchat.org/</a>). X-Chat (GPL licensed) is
      available for Unix as well as for Windows platforms (a free
      Windows build of X-Chat is available at
      <a href="http://www.silverex.org/download/" target="_top">http://www.silverex.org/download/</a>).
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-enterprise-information"></a>1.5.4. MySQL Enterprise</h3></div></div></div><p>
      Sun Microsystems, Inc. offers technical support in the form of
      MySQL Enterprise. For organizations that rely on the MySQL DBMS
      for business-critical production applications, MySQL Enterprise is
      a commercial subscription offering which includes:

      </p><div class="itemizedlist"><ul type="disc"><li><p>
            MySQL Enterprise Server
          </p></li><li><p>
            MySQL Enterprise Monitor
          </p></li><li><p>
            Monthly Rapid Updates and Quarterly Service Packs
          </p></li><li><p>
            MySQL Knowledge Base
          </p></li><li><p>
            24x7 Technical and Consultative Support
          </p></li></ul></div><p>

      MySQL Enterprise is available in multiple tiers, giving you the
      flexibility to choose the level of service that best matches your
      needs. For more information, see
      <a href="http://www.mysql.com/products/enterprise/" target="_top">MySQL Enterprise</a>.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="bug-reports"></a>1.6. How to Report Bugs or Problems</h2></div></div></div><a class="indexterm" name="id3986971"></a><a class="indexterm" name="id3986984"></a><a class="indexterm" name="id3986996"></a><a class="indexterm" name="id3987008"></a><a class="indexterm" name="id3987021"></a><a class="indexterm" name="id3987033"></a><a class="indexterm" name="id3987046"></a><a class="indexterm" name="id3987058"></a><a class="indexterm" name="id3987070"></a><a class="indexterm" name="id3987083"></a><a class="indexterm" name="id3987092"></a><p>
    Before posting a bug report about a problem, please try to verify
    that it is a bug and that it has not been reported already:
  </p><div class="itemizedlist"><ul type="disc"><li><p>
        Start by searching the MySQL online manual at
        <a href="http://dev.mysql.com/doc/" target="_top">http://dev.mysql.com/doc/</a>. We try to keep the manual up to
        date by updating it frequently with solutions to newly found
        problems. The change history
        (<a href="http://dev.mysql.com/doc/mysql/en/news.html" target="_top">http://dev.mysql.com/doc/mysql/en/news.html</a>) can be
        particularly useful since it is quite possible that a newer
        version contains a solution to your problem.
      </p></li><li><p>
        If you get a parse error for an SQL statement, please check your
        syntax closely. If you cannot find something wrong with it, it
        is extremely likely that your current version of MySQL Server
        doesn't support the syntax you are using. If you are using the
        current version and the manual doesn't cover the syntax that you
        are using, MySQL Server doesn't support your statement. In this
        case, your options are to implement the syntax yourself or email
        <code class="email">&lt;<a href="mailto:licensing@mysql.com">licensing@mysql.com</a>&gt;</code> and ask for an offer to
        implement it.
      </p><p>
        If the manual covers the syntax you are using, but you have an
        older version of MySQL Server, you should check the MySQL change
        history to see when the syntax was implemented. In this case,
        you have the option of upgrading to a newer version of MySQL
        Server.
      </p></li><li><p>
        For solutions to some common problems, see
        <a href="error-handling.html#problems" title="B.1. Problems and Common Errors">Section B.1, “Problems and Common Errors”</a>.
      </p></li><li><p>
        Search the bugs database at
        <a href="http://bugs.mysql.com/" target="_top">http://bugs.mysql.com/</a> to see whether the bug has
        been reported and fixed.
      </p></li><li><p>
        Search the MySQL mailing list archives at
        <a href="http://lists.mysql.com/" target="_top">http://lists.mysql.com/</a>. See
        <a href="introduction.html#mailing-lists" title="1.5.1. MySQL Mailing Lists">Section 1.5.1, “MySQL Mailing Lists”</a>.
      </p></li><li><p>
        You can also use <a href="http://www.mysql.com/search/" target="_top">http://www.mysql.com/search/</a> to
        search all the Web pages (including the manual) that are located
        at the MySQL Web site.
      </p></li></ul></div><p>
    If you cannot find an answer in the manual, the bugs database, or
    the mailing list archives, check with your local MySQL expert. If
    you still cannot find an answer to your question, please use the
    following guidelines for reporting the bug.
  </p><p>
    The normal way to report bugs is to visit
    <a href="http://bugs.mysql.com/" target="_top">http://bugs.mysql.com/</a>, which is the address for our
    bugs database. This database is public and can be browsed and
    searched by anyone. If you log in to the system, you can enter new
    reports. If you have no Web access, you can generate a bug report by
    using the <a href="programs.html#mysqlbug" title="4.4.3. mysqlbug — Generate Bug Report"><span><strong class="command">mysqlbug</strong></span></a> script described at the end of
    this section.
  </p><p>
    Bugs posted in the bugs database at
    <a href="http://bugs.mysql.com/" target="_top">http://bugs.mysql.com/</a> that are corrected for a given
    release are noted in the change history.
  </p><p>
    If you have found a sensitive security bug in MySQL, you can send
    email to <code class="email">&lt;<a href="mailto:security@mysql.com">security@mysql.com</a>&gt;</code>.
  </p><p>
    To discuss problems with other users, you can use one of the MySQL
    mailing lists. <a href="introduction.html#mailing-lists" title="1.5.1. MySQL Mailing Lists">Section 1.5.1, “MySQL Mailing Lists”</a>.
  </p><p>
    Writing a good bug report takes patience, but doing it right the
    first time saves time both for us and for yourself. A good bug
    report, containing a full test case for the bug, makes it very
    likely that we will fix the bug in the next release. This section
    helps you write your report correctly so that you do not waste your
    time doing things that may not help us much or at all. Please read
    this section carefully and make sure that all the information
    described here is included in your report.
  </p><p>
    Preferably, you should test the problem using the latest production
    or development version of MySQL Server before posting. Anyone should
    be able to repeat the bug by just using <code class="literal">mysql test &lt;
    script_file</code> on your test case or by running the shell or
    Perl script that you include in the bug report. Any bug that we are
    able to repeat has a high chance of being fixed in the next MySQL
    release.
  </p><p>
    It is most helpful when a good description of the problem is
    included in the bug report. That is, give a good example of
    everything you did that led to the problem and describe, in exact
    detail, the problem itself. The best reports are those that include
    a full example showing how to reproduce the bug or problem. See
    <a href="http://forge.mysql.com/wiki/MySQL_Internals_Porting" target="_top">MySQL
    Internals: Porting</a>.
  </p><p>
    Remember that it is possible for us to respond to a report
    containing too much information, but not to one containing too
    little. People often omit facts because they think they know the
    cause of a problem and assume that some details do not matter. A
    good principle to follow is that if you are in doubt about stating
    something, state it. It is faster and less troublesome to write a
    couple more lines in your report than to wait longer for the answer
    if we must ask you to provide information that was missing from the
    initial report.
  </p><p>
    The most common errors made in bug reports are (a) not including the
    version number of the MySQL distribution that you use, and (b) not
    fully describing the platform on which the MySQL server is installed
    (including the platform type and version number). These are highly
    relevant pieces of information, and in 99 cases out of 100, the bug
    report is useless without them. Very often we get questions like,
    “<span class="quote">Why doesn't this work for me?</span>” Then we find that the
    feature requested wasn't implemented in that MySQL version, or that
    a bug described in a report has been fixed in newer MySQL versions.
    Errors often are platform-dependent. In such cases, it is next to
    impossible for us to fix anything without knowing the operating
    system and the version number of the platform.
  </p><p>
    If you compiled MySQL from source, remember also to provide
    information about your compiler if it is related to the problem.
    Often people find bugs in compilers and think the problem is
    MySQL-related. Most compilers are under development all the time and
    become better version by version. To determine whether your problem
    depends on your compiler, we need to know what compiler you used.
    Note that every compiling problem should be regarded as a bug and
    reported accordingly.
  </p><p>
    If a program produces an error message, it is very important to
    include the message in your report. If we try to search for
    something from the archives, it is better that the error message
    reported exactly matches the one that the program produces. (Even
    the lettercase should be observed.) It is best to copy and paste the
    entire error message into your report. You should never try to
    reproduce the message from memory.
  </p><p>
    If you have a problem with Connector/ODBC (MyODBC), please try to
    generate a trace file and send it with your report. See the MyODBC
    section of <a href="connectors-apis.html" title="Chapter 21. Connectors and APIs">Chapter 21, <i>Connectors and APIs</i></a>.
  </p><p>
    If your report includes long query output lines from test cases that
    you run with the <a href="programs.html#mysql" title="4.5.1. mysql — The MySQL Command-Line Tool"><span><strong class="command">mysql</strong></span></a> command-line tool, you can
    make the output more readable by using the
    <a href="programs.html#option_mysql_vertical"><code class="option">--vertical</code></a> option or the
    <code class="literal">\G</code> statement terminator. The
    <a href="sql-syntax.html#explain" title="12.3.2. EXPLAIN Syntax"><code class="literal">EXPLAIN SELECT</code></a>
    example later in this section demonstrates the use of
    <code class="literal">\G</code>.
  </p><p>
    Please include the following information in your report:
  </p><div class="itemizedlist"><ul type="disc"><li><p>
        The version number of the MySQL distribution you are using (for
        example, MySQL 5.0.19). You can find out which version you are
        running by executing <a href="programs.html#mysqladmin" title="4.5.2. mysqladmin — Client for Administering a MySQL Server"><span><strong class="command">mysqladmin version</strong></span></a>. The
        <a href="programs.html#mysqladmin" title="4.5.2. mysqladmin — Client for Administering a MySQL Server"><span><strong class="command">mysqladmin</strong></span></a> program can be found in the
        <code class="filename">bin</code> directory under your MySQL installation
        directory.
      </p></li><li><p>
        The manufacturer and model of the machine on which you
        experience the problem.
      </p></li><li><p>
        The operating system name and version. If you work with Windows,
        you can usually get the name and version number by
        double-clicking your My Computer icon and pulling down the
        “<span class="quote">Help/About Windows</span>” menu. For most Unix-like
        operating systems, you can get this information by executing the
        command <code class="literal">uname -a</code>.
      </p></li><li><p>
        Sometimes the amount of memory (real and virtual) is relevant.
        If in doubt, include these values.
      </p></li><li><p>
        If you are using a source distribution of the MySQL software,
        include the name and version number of the compiler that you
        used. If you have a binary distribution, include the
        distribution name.
      </p></li><li><p>
        If the problem occurs during compilation, include the exact
        error messages and also a few lines of context around the
        offending code in the file where the error occurs.
      </p></li><li><p>
        If <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a> died, you should also report the
        statement that crashed <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a>. You can
        usually get this information by running
        <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a> with query logging enabled, and then
        looking in the log after <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a> crashes. See
        <a href="http://forge.mysql.com/wiki/MySQL_Internals_Porting" target="_top">MySQL
        Internals: Porting</a>.
      </p></li><li><p>
        If a database table is related to the problem, include the
        output from the <code class="literal">SHOW CREATE TABLE
        <em class="replaceable"><code>db_name</code></em>.<em class="replaceable"><code>tbl_name</code></em></code>
        statement in the bug report. This is a very easy way to get the
        definition of any table in a database. The information helps us
        create a situation matching the one that you have experienced.
      </p></li><li><p>
        The SQL mode in effect when the problem occurred can be
        significant, so please report the value of the
        <a href="server-administration.html#sysvar_sql_mode"><code class="literal">sql_mode</code></a> system variable. For
        stored procedure, stored function, and trigger objects, the
        relevant <a href="server-administration.html#sysvar_sql_mode"><code class="literal">sql_mode</code></a> value is the
        one in effect when the object was created. For a stored
        procedure or function, the <a href="sql-syntax.html#show-create-procedure" title="12.5.5.11. SHOW CREATE PROCEDURE Syntax"><code class="literal">SHOW CREATE
        PROCEDURE</code></a> or <a href="sql-syntax.html#show-create-function" title="12.5.5.10. SHOW CREATE FUNCTION Syntax"><code class="literal">SHOW CREATE
        FUNCTION</code></a> statement shows the relevant SQL mode, or you
        can query <code class="literal">INFORMATION_SCHEMA</code> for the
        information:
      </p><pre class="programlisting">SELECT ROUTINE_SCHEMA, ROUTINE_NAME, SQL_MODE
FROM INFORMATION_SCHEMA.ROUTINES;
</pre><p>
        For triggers, you can use this statement:
      </p><pre class="programlisting">SELECT EVENT_OBJECT_SCHEMA, EVENT_OBJECT_TABLE, TRIGGER_NAME, SQL_MODE
FROM INFORMATION_SCHEMA.TRIGGERS;
</pre></li><li><p>
        For performance-related bugs or problems with
        <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT</code></a> statements, you should
        always include the output of <code class="literal">EXPLAIN SELECT
        ...</code>, and at least the number of rows that the
        <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT</code></a> statement produces. You
        should also include the output from <code class="literal">SHOW CREATE TABLE
        <em class="replaceable"><code>tbl_name</code></em></code> for each table
        that is involved. The more information you provide about your
        situation, the more likely it is that someone can help you.
      </p><p>
        The following is an example of a very good bug report. The
        statements are run using the <a href="programs.html#mysql" title="4.5.1. mysql — The MySQL Command-Line Tool"><span><strong class="command">mysql</strong></span></a>
        command-line tool. Note the use of the <code class="literal">\G</code>
        statement terminator for statements that would otherwise provide
        very long output lines that are difficult to read.
      </p><pre class="programlisting">mysql&gt; <strong class="userinput"><code>SHOW VARIABLES;</code></strong>
mysql&gt; <strong class="userinput"><code>SHOW COLUMNS FROM ...\G</code></strong>
       <em class="replaceable"><code>&lt;output from SHOW COLUMNS&gt;</code></em>
mysql&gt; <strong class="userinput"><code>EXPLAIN SELECT ...\G</code></strong>
       <em class="replaceable"><code>&lt;output from EXPLAIN&gt;</code></em>
mysql&gt; <strong class="userinput"><code>FLUSH STATUS;</code></strong>
mysql&gt; <strong class="userinput"><code>SELECT ...;</code></strong>
       <em class="replaceable"><code>&lt;A short version of the output from SELECT,
       including the time taken to run the query&gt;</code></em>
mysql&gt; <strong class="userinput"><code>SHOW STATUS;</code></strong>
       <em class="replaceable"><code>&lt;output from SHOW STATUS&gt;</code></em>
</pre></li><li><p>
        If a bug or problem occurs while running
        <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a>, try to provide an input script that
        reproduces the anomaly. This script should include any necessary
        source files. The more closely the script can reproduce your
        situation, the better. If you can make a reproducible test case,
        you should upload it to be attached to the bug report.
      </p><p>
        If you cannot provide a script, you should at least include the
        output from <a href="programs.html#mysqladmin" title="4.5.2. mysqladmin — Client for Administering a MySQL Server"><span><strong class="command">mysqladmin variables extended-status
        processlist</strong></span></a> in your report to provide some information
        on how your system is performing.
      </p></li><li><p>
        If you cannot produce a test case with only a few rows, or if
        the test table is too big to be included in the bug report (more
        than 10 rows), you should dump your tables using
        <a href="programs.html#mysqldump" title="4.5.4. mysqldump — A Database Backup Program"><span><strong class="command">mysqldump</strong></span></a> and create a
        <code class="filename">README</code> file that describes your problem.
        Create a compressed archive of your files using
        <span><strong class="command">tar</strong></span> and <span><strong class="command">gzip</strong></span> or
        <span><strong class="command">zip</strong></span>, and use FTP to transfer the archive to
        <a href="ftp://ftp.mysql.com/pub/mysql/upload/" target="_top">ftp://ftp.mysql.com/pub/mysql/upload/</a>. Then enter the problem into
        our bugs database at <a href="http://bugs.mysql.com/" target="_top">http://bugs.mysql.com/</a>.
      </p></li><li><p>
        If you believe that the MySQL server produces a strange result
        from a statement, include not only the result, but also your
        opinion of what the result should be, and an explanation
        describing the basis for your opinion.
      </p></li><li><p>
        When you provide an example of the problem, it is better to use
        the table names, variable names, and so forth that exist in your
        actual situation than to come up with new names. The problem
        could be related to the name of a table or variable. These cases
        are rare, perhaps, but it is better to be safe than sorry. After
        all, it should be easier for you to provide an example that uses
        your actual situation, and it is by all means better for us. If
        you have data that you do not want to be visible to others in
        the bug report, you can use FTP to transfer it to
        <a href="ftp://ftp.mysql.com/pub/mysql/upload/" target="_top">ftp://ftp.mysql.com/pub/mysql/upload/</a>. If the information is really
        top secret and you do not want to show it even to us, go ahead
        and provide an example using other names, but please regard this
        as the last choice.
      </p></li><li><p>
        Include all the options given to the relevant programs, if
        possible. For example, indicate the options that you use when
        you start the <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a> server, as well as the
        options that you use to run any MySQL client programs. The
        options to programs such as <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a> and
        <a href="programs.html#mysql" title="4.5.1. mysql — The MySQL Command-Line Tool"><span><strong class="command">mysql</strong></span></a>, and to the
        <span><strong class="command">configure</strong></span> script, are often key to resolving
        problems and are very relevant. It is never a bad idea to
        include them. If your problem involves a program written in a
        language such as Perl or PHP, please include the language
        processor's version number, as well as the version for any
        modules that the program uses. For example, if you have a Perl
        script that uses the <code class="literal">DBI</code> and
        <code class="literal">DBD::mysql</code> modules, include the version
        numbers for Perl, <code class="literal">DBI</code>, and
        <code class="literal">DBD::mysql</code>.
      </p></li><li><p>
        If your question is related to the privilege system, please
        include the output of <a href="programs.html#mysqlaccess" title="4.6.6. mysqlaccess — Client for Checking Access Privileges"><span><strong class="command">mysqlaccess</strong></span></a>, the output
        of <a href="programs.html#mysqladmin" title="4.5.2. mysqladmin — Client for Administering a MySQL Server"><span><strong class="command">mysqladmin reload</strong></span></a>, and all the error
        messages you get when trying to connect. When you test your
        privileges, you should first run <a href="programs.html#mysqlaccess" title="4.6.6. mysqlaccess — Client for Checking Access Privileges"><span><strong class="command">mysqlaccess</strong></span></a>.
        After this, execute <a href="programs.html#mysqladmin" title="4.5.2. mysqladmin — Client for Administering a MySQL Server"><span><strong class="command">mysqladmin reload version</strong></span></a>
        and try to connect with the program that gives you trouble.
        <a href="programs.html#mysqlaccess" title="4.6.6. mysqlaccess — Client for Checking Access Privileges"><span><strong class="command">mysqlaccess</strong></span></a> can be found in the
        <code class="filename">bin</code> directory under your MySQL installation
        directory.
      </p></li><li><p>
        If you have a patch for a bug, do include it. But do not assume
        that the patch is all we need, or that we can use it, if you do
        not provide some necessary information such as test cases
        showing the bug that your patch fixes. We might find problems
        with your patch or we might not understand it at all. If so, we
        cannot use it.
      </p><p>
        If we cannot verify the exact purpose of the patch, we will not
        use it. Test cases help us here. Show that the patch handles all
        the situations that may occur. If we find a borderline case
        (even a rare one) where the patch will not work, it may be
        useless.
      </p></li><li><p>
        Guesses about what the bug is, why it occurs, or what it depends
        on are usually wrong. Even the MySQL team cannot guess such
        things without first using a debugger to determine the real
        cause of a bug.
      </p></li><li><p>
        Indicate in your bug report that you have checked the reference
        manual and mail archive so that others know you have tried to
        solve the problem yourself.
      </p></li><li><p>
        If the problem is that your data appears corrupt or you get
        errors when you access a particular table, you should first
        check your tables and then try to repair them with
        <a href="sql-syntax.html#check-table" title="12.5.2.3. CHECK TABLE Syntax"><code class="literal">CHECK TABLE</code></a> and
        <a href="sql-syntax.html#repair-table" title="12.5.2.6. REPAIR TABLE Syntax"><code class="literal">REPAIR TABLE</code></a> or with
        <a href="programs.html#myisamchk" title="4.6.3. myisamchk — MyISAM Table-Maintenance Utility"><span><strong class="command">myisamchk</strong></span></a>. See
        <a href="server-administration.html" title="Chapter 5. MySQL Server Administration">Chapter 5, <i>MySQL Server Administration</i></a>.
      </p><p>
        If you are running Windows, please verify the value of
        <a href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names</code></a> using
        the <code class="literal">SHOW VARIABLES LIKE
        'lower_case_table_names'</code> statement. This variable
        affects how the server handles lettercase of database and table
        names. Its effect for a given value should be as described in
        <a href="language-structure.html#identifier-case-sensitivity" title="8.2.2. Identifier Case Sensitivity">Section 8.2.2, “Identifier Case Sensitivity”</a>.
      </p></li><li><p>
        If you often get corrupted tables, you should try to find out
        when and why this happens. In this case, the error log in the
        MySQL data directory may contain some information about what
        happened. (This is the file with the <code class="filename">.err</code>
        suffix in the name.) See <a href="server-administration.html#error-log" title="5.2.2. The Error Log">Section 5.2.2, “The Error Log”</a>. Please
        include any relevant information from this file in your bug
        report. Normally <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a> should
        <span class="emphasis"><em>never</em></span> crash a table if nothing killed it in
        the middle of an update. If you can find the cause of
        <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a> dying, it is much easier for us to
        provide you with a fix for the problem. See
        <a href="error-handling.html#what-is-crashing" title="B.1.1. How to Determine What Is Causing a Problem">Section B.1.1, “How to Determine What Is Causing a Problem”</a>.
      </p></li><li><p>
        If possible, download and install the most recent version of
        MySQL Server and check whether it solves your problem. All
        versions of the MySQL software thoroughly tested and should work
        without problems. We believe in making everything as
        backward-compatible as possible, and you should be able to
        switch MySQL versions without difficulty. See
        <a href="installing.html#which-version" title="2.1.2. Choosing Which MySQL Distribution to Install">Section 2.1.2, “Choosing Which MySQL Distribution to Install”</a>.
      </p></li></ul></div><a class="indexterm" name="id3988062"></a><a class="indexterm" name="id3988077"></a><p>
    If you have no Web access and cannot report a bug by visiting
    <a href="http://bugs.mysql.com/" target="_top">http://bugs.mysql.com/</a>, you can use the
    <a href="programs.html#mysqlbug" title="4.4.3. mysqlbug — Generate Bug Report"><span><strong class="command">mysqlbug</strong></span></a> script to generate a bug report (or a
    report about any problem). <a href="programs.html#mysqlbug" title="4.4.3. mysqlbug — Generate Bug Report"><span><strong class="command">mysqlbug</strong></span></a> helps you
    generate a report by determining much of the following information
    automatically, but if something important is missing, please include
    it with your message. <a href="programs.html#mysqlbug" title="4.4.3. mysqlbug — Generate Bug Report"><span><strong class="command">mysqlbug</strong></span></a> can be found in
    the <code class="filename">scripts</code> directory (source distribution) and
    in the <code class="filename">bin</code> directory under your MySQL
    installation directory (binary distribution).
  </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="compatibility"></a>1.7. MySQL Standards Compliance</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="introduction.html#standards">1.7.1. What Standards MySQL Follows</a></span></dt><dt><span class="section"><a href="introduction.html#sql-mode">1.7.2. Selecting SQL Modes</a></span></dt><dt><span class="section"><a href="introduction.html#ansi-mode">1.7.3. Running MySQL in ANSI Mode</a></span></dt><dt><span class="section"><a href="introduction.html#extensions-to-ansi">1.7.4. MySQL Extensions to Standard SQL</a></span></dt><dt><span class="section"><a href="introduction.html#differences-from-ansi">1.7.5. MySQL Differences from Standard SQL</a></span></dt><dt><span class="section"><a href="introduction.html#constraints">1.7.6. How MySQL Deals with Constraints</a></span></dt></dl></div><a class="indexterm" name="id3988147"></a><a class="indexterm" name="id3988159"></a><a class="indexterm" name="id3988168"></a><a class="indexterm" name="id3988181"></a><a class="indexterm" name="id3988193"></a><p>
      This section describes how MySQL relates to the ANSI/ISO SQL
      standards. MySQL Server has many extensions to the SQL standard,
      and here you can find out what they are and how to use them. You
      can also find information about functionality missing from MySQL
      Server, and how to work around some of the differences.
    </p><p>
      The SQL standard has been evolving since 1986 and several versions
      exist. In this manual, “<span class="quote">SQL-92</span>” refers to the
      standard released in 1992, “<span class="quote">SQL:1999</span>” refers to the
      standard released in 1999, “<span class="quote">SQL:2003</span>” refers to the
      standard released in 2003, and “<span class="quote">SQL:2008</span>” refers to
      the most recent version of the standard, released in 2008. We use
      the phrase “<span class="quote">the SQL standard</span>” or “<span class="quote">standard
      SQL</span>” to mean the current version of the SQL Standard at any
      time.
    </p><p>
      One of our main goals with the product is to continue to work
      toward compliance with the SQL standard, but without sacrificing
      speed or reliability. We are not afraid to add extensions to SQL
      or support for non-SQL features if this greatly increases the
      usability of MySQL Server for a large segment of our user base.
      The <a href="sql-syntax.html#handler" title="12.2.4. HANDLER Syntax"><code class="literal">HANDLER</code></a> interface is an example
      of this strategy. See <a href="sql-syntax.html#handler" title="12.2.4. HANDLER Syntax">Section 12.2.4, “<code class="literal">HANDLER</code> Syntax”</a>.
    </p><p>
      We continue to support transactional and nontransactional
      databases to satisfy both mission-critical 24/7 usage and heavy
      Web or logging usage.
    </p><p>
      MySQL Server was originally designed to work with medium-sized
      databases (10-100 million rows, or about 100MB per table) on small
      computer systems. Today MySQL Server handles terabyte-sized
      databases, but the code can also be compiled in a reduced version
      suitable for hand-held and embedded devices. The compact design of
      the MySQL server makes development in both directions possible
      without any conflicts in the source tree.
    </p><p>
      Currently, we are not targeting real-time support, although MySQL
      replication capabilities offer significant functionality.
    </p><p>
      MySQL supports high-availability database clustering using the
      <code class="literal">NDBCLUSTER</code> storage engine. See
      <a href="mysql-cluster.html" title="Chapter 17. MySQL Cluster NDB 6.X/7.X">Chapter 17, <i>MySQL Cluster NDB 6.X/7.X</i></a>.
    </p><p>
      We are implementing XML functionality beginning in MySQL 5.1,
      which supports most of the W3C XPath standard. We plan to increase
      support for XML as part of future MySQL development. See
      <a href="functions.html#xml-functions" title="11.10. XML Functions">Section 11.10, “XML Functions”</a>.
    </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="standards"></a>1.7.1. What Standards MySQL Follows</h3></div></div></div><p>
        Our aim is to support the full ANSI/ISO SQL standard, but
        without making concessions to speed and quality of the code.
      </p><p>
        ODBC levels 0–3.51.
      </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sql-mode"></a>1.7.2. Selecting SQL Modes</h3></div></div></div><p>
        The MySQL server can operate in different SQL modes, and can
        apply these modes differentially for different clients. This
        capability enables each application to tailor the server's
        operating mode to its own requirements.
      </p><p>
        SQL modes control aspects of server operation such as 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.
      </p><p>
        You can set the default SQL mode by starting
        <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a> with the
        <a href="server-administration.html#option_mysqld_sql-mode"><code class="option">--sql-mode="<em class="replaceable"><code>mode_value</code></em>"</code></a>
        option. You can also change the mode at runtime by setting the
        <a href="server-administration.html#sysvar_sql_mode"><code class="literal">sql_mode</code></a> system variable with a
        <a href="sql-syntax.html#set-option" title="12.5.4. SET Syntax"><code class="literal">SET [GLOBAL|SESSION]
        sql_mode='<em class="replaceable"><code>mode_value</code></em>'</code></a>
        statement.
      </p><p>
        For more information on setting the SQL mode, see
        <a href="server-administration.html#server-sql-mode" title="5.1.8. Server SQL Modes">Section 5.1.8, “Server SQL Modes”</a>.
      </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ansi-mode"></a>1.7.3. Running MySQL in ANSI Mode</h3></div></div></div><a class="indexterm" name="id3988400"></a><a class="indexterm" name="id3988412"></a><p>
        You can tell <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a> to run in ANSI mode with
        the <a href="server-administration.html#option_mysqld_ansi"><code class="option">--ansi</code></a> startup option.
        Running the server in ANSI mode is the same as starting it with
        the following options:
      </p><pre class="programlisting">--transaction-isolation=SERIALIZABLE --sql-mode=ANSI
</pre><p>
        You can achieve the same effect at runtime by executing these
        two statements:
      </p><pre class="programlisting">SET GLOBAL TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SET GLOBAL sql_mode = 'ANSI';
</pre><p>
        You can see that setting the
        <a href="server-administration.html#sysvar_sql_mode"><code class="literal">sql_mode</code></a> system variable to
        <code class="literal">'ANSI'</code> enables all SQL mode options that are
        relevant for ANSI mode as follows:
      </p><pre class="programlisting">mysql&gt; <strong class="userinput"><code>SET GLOBAL sql_mode='ANSI';</code></strong>
mysql&gt; <strong class="userinput"><code>SELECT @@global.sql_mode;</code></strong>
        -&gt; 'REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI'
</pre><p>
        Running the server in ANSI mode with
        <a href="server-administration.html#option_mysqld_ansi"><code class="option">--ansi</code></a> is not quite the same as
        setting the SQL mode to <code class="literal">'ANSI'</code>. The
        <a href="server-administration.html#option_mysqld_ansi"><code class="option">--ansi</code></a> option affects the SQL
        mode and also sets the transaction isolation level. Setting the
        SQL mode to <code class="literal">'ANSI'</code> has no effect on the
        isolation level.
      </p><p>
        See <a href="server-administration.html#server-options" title="5.1.2. Server Command Options">Section 5.1.2, “Server Command Options”</a>, and
        <a href="introduction.html#sql-mode" title="1.7.2. Selecting SQL Modes">Section 1.7.2, “Selecting SQL Modes”</a>.
      </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="extensions-to-ansi"></a>1.7.4. MySQL Extensions to Standard SQL</h3></div></div></div><a class="indexterm" name="id3988550"></a><a class="indexterm" name="id3988562"></a><p>
        MySQL Server supports some extensions that you probably won't
        find in other SQL DBMSs. Be warned that if you use them, your
        code won't be portable to other SQL servers. In some cases, you
        can write code that includes MySQL extensions, but is still
        portable, by using comments of the following form:
      </p><pre class="programlisting">/*! <em class="replaceable"><code>MySQL-specific code</code></em> */
</pre><p>
        In this case, MySQL Server parses and executes the code within
        the comment as it would any other SQL statement, but other SQL
        servers will ignore the extensions. For example, MySQL Server
        recognizes the <code class="literal">STRAIGHT_JOIN</code> keyword in the
        following statement, but other servers will not:
      </p><pre class="programlisting">SELECT /*! STRAIGHT_JOIN */ col1 FROM table1,table2 WHERE ...
</pre><p>
        If you add a version number after the
        “<span class="quote"><code class="literal">!</code></span>” character, the syntax within
        the comment is executed only if the MySQL version is greater
        than or equal to the specified version number. The
        <code class="literal">TEMPORARY</code> keyword in the following comment is
        executed only by servers from MySQL 3.23.02 or higher:
      </p><pre class="programlisting">CREATE /*!32302 TEMPORARY */ TABLE t (a INT);
</pre><p>
        The following descriptions list MySQL extensions, organized by
        category.
      </p><div class="itemizedlist"><ul type="disc"><li><p>
            Organization of data on disk
          </p><p>
            MySQL Server maps each database to a directory under the
            MySQL data directory, and maps tables within a database to
            file names in the database directory. This has a few
            implications:
          </p><div class="itemizedlist"><ul type="circle"><li><p>
                <a class="indexterm" name="id3988653"></a>

                <a class="indexterm" name="id3988666"></a>

                <a class="indexterm" name="id3988678"></a>

                <a class="indexterm" name="id3988691"></a>

                Database and table names are case sensitive in MySQL
                Server on operating systems that have case-sensitive
                file names (such as most Unix systems). See
                <a href="language-structure.html#identifier-case-sensitivity" title="8.2.2. Identifier Case Sensitivity">Section 8.2.2, “Identifier Case Sensitivity”</a>.
              </p></li><li><p>
                You can use standard system commands to back up, rename,
                move, delete, and copy tables that are managed by the
                <code class="literal">MyISAM</code> storage engine. For example,
                it is possible to rename a <code class="literal">MyISAM</code>
                table by renaming the <code class="filename">.MYD</code>,
                <code class="filename">.MYI</code>, and <code class="filename">.frm</code>
                files to which the table corresponds. (Nevertheless, it
                is preferable to use <a href="sql-syntax.html#rename-table" title="12.1.33. RENAME TABLE Syntax"><code class="literal">RENAME
                TABLE</code></a> or <code class="literal">ALTER TABLE ...
                RENAME</code> and let the server rename the files.)
              </p></li></ul></div><p>
            Prior to MySQL 5.1.6, database and table names cannot
            contain path name separator characters
            (“<span class="quote"><code class="literal">/</code></span>”,
            “<span class="quote"><code class="literal">\</code></span>”).
          </p></li><li><p>
            General language syntax
          </p><div class="itemizedlist"><ul type="circle"><li><p>
                By default, strings can be enclosed by either
                “<span class="quote"><code class="literal">"</code></span>” or
                “<span class="quote"><code class="literal">'</code></span>”, not just by
                “<span class="quote"><code class="literal">'</code></span>”. (If the
                <a href="server-administration.html#sqlmode_ansi_quotes"><code class="literal">ANSI_QUOTES</code></a> SQL mode
                is enabled, strings can be enclosed only by
                “<span class="quote"><code class="literal">'</code></span>” and the server
                interprets strings enclosed by
                “<span class="quote"><code class="literal">"</code></span>” as identifiers.)
              </p></li><li><p>
                “<span class="quote"><code class="literal">\</code></span>” is the escape
                character in strings.
              </p></li><li><p>
                In SQL statements, you can access tables from different
                databases with the
                <em class="replaceable"><code>db_name.tbl_name</code></em> syntax. Some
                SQL servers provide the same functionality but call this
                <code class="literal">User space</code>. MySQL Server doesn't
                support tablespaces such as used in statements like
                this: <code class="literal">CREATE TABLE ralph.my_table ... IN
                my_tablespace</code>.
              </p></li></ul></div></li><li><p>
            SQL statement syntax
          </p><div class="itemizedlist"><ul type="circle"><li><p>
                The <a href="sql-syntax.html#analyze-table" title="12.5.2.1. ANALYZE TABLE Syntax"><code class="literal">ANALYZE TABLE</code></a>,
                <a href="sql-syntax.html#check-table" title="12.5.2.3. CHECK TABLE Syntax"><code class="literal">CHECK TABLE</code></a>,
                <a href="sql-syntax.html#optimize-table" title="12.5.2.5. OPTIMIZE TABLE Syntax"><code class="literal">OPTIMIZE TABLE</code></a>, and
                <a href="sql-syntax.html#repair-table" title="12.5.2.6. REPAIR TABLE Syntax"><code class="literal">REPAIR TABLE</code></a> statements.
              </p></li><li><p>
                The <a href="sql-syntax.html#create-database" title="12.1.10. CREATE DATABASE Syntax"><code class="literal">CREATE DATABASE</code></a>,
                <a href="sql-syntax.html#drop-database" title="12.1.21. DROP DATABASE Syntax"><code class="literal">DROP DATABASE</code></a>, and
                <a href="sql-syntax.html#alter-database" title="12.1.1. ALTER DATABASE Syntax"><code class="literal">ALTER DATABASE</code></a>
                statements. See <a href="sql-syntax.html#create-database" title="12.1.10. CREATE DATABASE Syntax">Section 12.1.10, “<code class="literal">CREATE DATABASE</code> Syntax”</a>,
                <a href="sql-syntax.html#drop-database" title="12.1.21. DROP DATABASE Syntax">Section 12.1.21, “<code class="literal">DROP DATABASE</code> Syntax”</a>, and
                <a href="sql-syntax.html#alter-database" title="12.1.1. ALTER DATABASE Syntax">Section 12.1.1, “<code class="literal">ALTER DATABASE</code> Syntax”</a>.
              </p></li><li><p>
                The <a href="sql-syntax.html#do" title="12.2.3. DO Syntax"><code class="literal">DO</code></a> statement.
              </p></li><li><p>
                <a href="sql-syntax.html#explain" title="12.3.2. EXPLAIN Syntax"><code class="literal">EXPLAIN
                SELECT</code></a> to obtain a description of how tables
                are processed by the query optimizer.
              </p></li><li><p>
                The <a href="sql-syntax.html#flush" title="12.5.6.3. FLUSH Syntax"><code class="literal">FLUSH</code></a> and
                <a href="sql-syntax.html#reset" title="12.5.6.6. RESET Syntax"><code class="literal">RESET</code></a> statements.
              </p></li><li><p>
                The
                <a href="sql-syntax.html#set-option" title="12.5.4. SET Syntax"><code class="literal">SET</code></a>
                statement. See <a href="sql-syntax.html#set-option" title="12.5.4. SET Syntax">Section 12.5.4, “<code class="literal">SET</code> Syntax”</a>.
              </p></li><li><p>
                The <a href="sql-syntax.html#show" title="12.5.5. SHOW Syntax"><code class="literal">SHOW</code></a> statement. See
                <a href="sql-syntax.html#show" title="12.5.5. SHOW Syntax">Section 12.5.5, “<code class="literal">SHOW</code> Syntax”</a>. As of MySQL 5.0, the information
                produced by many of the MySQL-specific
                <a href="sql-syntax.html#show" title="12.5.5. SHOW Syntax"><code class="literal">SHOW</code></a> statements can be
                obtained in more standard fashion by using
                <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT</code></a> to query
                <code class="literal">INFORMATION_SCHEMA</code>. See
                <a href="information-schema.html" title="Chapter 20. INFORMATION_SCHEMA Tables">Chapter 20, <i><code class="literal">INFORMATION_SCHEMA</code> Tables</i></a>.
              </p></li><li><p>
                <a class="indexterm" name="id3989086"></a>

                <a class="indexterm" name="id3989094"></a>

                Use of <a href="sql-syntax.html#load-data" title="12.2.6. LOAD DATA INFILE
      Syntax"><code class="literal">LOAD
                DATA INFILE</code></a>. In many cases, this syntax is
                compatible with Oracle's
                <a href="sql-syntax.html#load-data" title="12.2.6. LOAD DATA INFILE
      Syntax"><code class="literal">LOAD DATA
                INFILE</code></a>. See <a href="sql-syntax.html#load-data" title="12.2.6. LOAD DATA INFILE
      Syntax">Section 12.2.6, “<code class="literal">LOAD DATA INFILE</code>
      Syntax”</a>.
              </p></li><li><p>
                Use of <a href="sql-syntax.html#rename-table" title="12.1.33. RENAME TABLE Syntax"><code class="literal">RENAME TABLE</code></a>. See
                <a href="sql-syntax.html#rename-table" title="12.1.33. RENAME TABLE Syntax">Section 12.1.33, “<code class="literal">RENAME TABLE</code> Syntax”</a>.
              </p></li><li><p>
                Use of <a href="sql-syntax.html#replace" title="12.2.7. REPLACE Syntax"><code class="literal">REPLACE</code></a> instead of
                <a href="sql-syntax.html#delete" title="12.2.2. DELETE Syntax"><code class="literal">DELETE</code></a> plus
                <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT</code></a>. See
                <a href="sql-syntax.html#replace" title="12.2.7. REPLACE Syntax">Section 12.2.7, “<code class="literal">REPLACE</code> Syntax”</a>.
              </p></li><li><p>
                Use of <code class="literal">CHANGE
                <em class="replaceable"><code>col_name</code></em></code>,
                <code class="literal">DROP
                <em class="replaceable"><code>col_name</code></em></code>, or
                <a href="sql-syntax.html#drop-index" title="12.1.24. DROP INDEX Syntax"><code class="literal">DROP INDEX</code></a>,
                <code class="literal">IGNORE</code> or <code class="literal">RENAME</code>
                in <a href="sql-syntax.html#alter-table" title="12.1.7. ALTER TABLE Syntax"><code class="literal">ALTER TABLE</code></a>
                statements. Use of multiple <code class="literal">ADD</code>,
                <code class="literal">ALTER</code>, <code class="literal">DROP</code>, or
                <code class="literal">CHANGE</code> clauses in an
                <a href="sql-syntax.html#alter-table" title="12.1.7. ALTER TABLE Syntax"><code class="literal">ALTER TABLE</code></a> statement.
                See <a href="sql-syntax.html#alter-table" title="12.1.7. ALTER TABLE Syntax">Section 12.1.7, “<code class="literal">ALTER TABLE</code> Syntax”</a>.
              </p></li><li><p>
                Use of index names, indexes on a prefix of a column, and
                use of <code class="literal">INDEX</code> or
                <code class="literal">KEY</code> in <a href="sql-syntax.html#create-table" title="12.1.17. CREATE TABLE Syntax"><code class="literal">CREATE
                TABLE</code></a> statements. See
                <a href="sql-syntax.html#create-table" title="12.1.17. CREATE TABLE Syntax">Section 12.1.17, “<code class="literal">CREATE TABLE</code> Syntax”</a>.
              </p></li><li><p>
                Use of <code class="literal">TEMPORARY</code> or <code class="literal">IF NOT
                EXISTS</code> with <a href="sql-syntax.html#create-table" title="12.1.17. CREATE TABLE Syntax"><code class="literal">CREATE
                TABLE</code></a>.
              </p></li><li><p>
                Use of <code class="literal">IF EXISTS</code> with
                <a href="sql-syntax.html#drop-table" title="12.1.28. DROP TABLE Syntax"><code class="literal">DROP TABLE</code></a> and
                <a href="sql-syntax.html#drop-database" title="12.1.21. DROP DATABASE Syntax"><code class="literal">DROP DATABASE</code></a>.
              </p></li><li><p>
                The capability of dropping multiple tables with a single
                <a href="sql-syntax.html#drop-table" title="12.1.28. DROP TABLE Syntax"><code class="literal">DROP TABLE</code></a> statement.
              </p></li><li><p>
                The <code class="literal">ORDER BY</code> and
                <code class="literal">LIMIT</code> clauses of the
                <a href="sql-syntax.html#update" title="12.2.11. UPDATE Syntax"><code class="literal">UPDATE</code></a> and
                <a href="sql-syntax.html#delete" title="12.2.2. DELETE Syntax"><code class="literal">DELETE</code></a> statements.
              </p></li><li><p>
                <code class="literal">INSERT INTO <em class="replaceable"><code>tbl_name</code></em>
                SET <em class="replaceable"><code>col_name</code></em> = ...</code>
                syntax.
              </p></li><li><p>
                The <code class="literal">DELAYED</code> clause of the
                <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT</code></a> and
                <a href="sql-syntax.html#replace" title="12.2.7. REPLACE Syntax"><code class="literal">REPLACE</code></a> statements.
              </p></li><li><p>
                The <code class="literal">LOW_PRIORITY</code> clause of the
                <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT</code></a>,
                <a href="sql-syntax.html#replace" title="12.2.7. REPLACE Syntax"><code class="literal">REPLACE</code></a>,
                <a href="sql-syntax.html#delete" title="12.2.2. DELETE Syntax"><code class="literal">DELETE</code></a>, and
                <a href="sql-syntax.html#update" title="12.2.11. UPDATE Syntax"><code class="literal">UPDATE</code></a> statements.
              </p></li><li><p>
                Use of <code class="literal">INTO OUTFILE</code> or <code class="literal">INTO
                DUMPFILE</code> in
                <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT</code></a> statements. See
                <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax">Section 12.2.8, “<code class="literal">SELECT</code> Syntax”</a>.
              </p></li><li><p>
                Options such as <code class="literal">STRAIGHT_JOIN</code> or
                <code class="literal">SQL_SMALL_RESULT</code> in
                <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT</code></a> statements.
              </p></li><li><p>
                You don't need to name all selected columns in the
                <code class="literal">GROUP BY</code> clause. This gives better
                performance for some very specific, but quite normal
                queries. See
                <a href="functions.html#group-by-functions-and-modifiers" title="11.12. Functions and Modifiers for Use with GROUP BY Clauses">Section 11.12, “Functions and Modifiers for Use with <code class="literal">GROUP BY</code> Clauses”</a>.
              </p></li><li><p>
                You can specify <code class="literal">ASC</code> and
                <code class="literal">DESC</code> with <code class="literal">GROUP
                BY</code>, not just with <code class="literal">ORDER BY</code>.
              </p></li><li><p>
                The ability to set variables in a statement with the
                <code class="literal">:=</code> assignment operator:
              </p><pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT @a:=SUM(total),@b:=COUNT(*),@a/@b AS avg</code></strong>
    -&gt; <strong class="userinput"><code>FROM test_table;</code></strong>
mysql&gt; <strong class="userinput"><code>SELECT @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3;</code></strong>
</pre></li></ul></div></li><li><p>
            Data types
          </p><div class="itemizedlist"><ul type="circle"><li><p>
                The <a href="data-types.html#numeric-types" title="10.2. Numeric Types"><code class="literal">MEDIUMINT</code></a>,
                <a href="data-types.html#set" title="10.4.5. The SET Type"><code class="literal">SET</code></a>, and
                <a href="data-types.html#enum" title="10.4.4. The ENUM Type"><code class="literal">ENUM</code></a> data types, and the
                various <a href="data-types.html#blob" title="10.4.3. The BLOB and
        TEXT Types"><code class="literal">BLOB</code></a> and
                <a href="data-types.html#blob" title="10.4.3. The BLOB and
        TEXT Types"><code class="literal">TEXT</code></a> data types.
              </p></li><li><p>
                The <code class="literal">AUTO_INCREMENT</code>,
                <code class="literal">BINARY</code>, <code class="literal">NULL</code>,
                <code class="literal">UNSIGNED</code>, and
                <code class="literal">ZEROFILL</code> data type attributes.
              </p></li></ul></div></li><li><p>
            Functions and operators
          </p><div class="itemizedlist"><ul type="circle"><li><p>
                To make it easier for users who migrate from other SQL
                environments, MySQL Server supports aliases for many
                functions. For example, all string functions support
                both standard SQL syntax and ODBC syntax.
              </p></li><li><p>
                MySQL Server understands the
                <a href="functions.html#operator_or"><code class="literal">||</code></a> and
                <a href="functions.html#operator_and"><code class="literal">&amp;&amp;</code></a>
                operators to mean logical OR and AND, as in the C
                programming language. In MySQL Server,
                <a href="functions.html#operator_or"><code class="literal">||</code></a> and
                <a href="functions.html#operator_or"><code class="literal">OR</code></a> are
                synonyms, as are
                <a href="functions.html#operator_and"><code class="literal">&amp;&amp;</code></a>
                and <a href="functions.html#operator_and"><code class="literal">AND</code></a>.
                Because of this nice syntax, MySQL Server doesn't
                support the standard SQL
                <a href="functions.html#operator_or"><code class="literal">||</code></a> operator
                for string concatenation; use
                <a href="functions.html#function_concat"><code class="literal">CONCAT()</code></a> instead. Because
                <a href="functions.html#function_concat"><code class="literal">CONCAT()</code></a> takes any number
                of arguments, it is easy to convert use of the
                <a href="functions.html#operator_or"><code class="literal">||</code></a> operator
                to MySQL Server.
              </p></li><li><p>
                Use of <a href="functions.html#function_count"><code class="literal">COUNT(DISTINCT
                <em class="replaceable"><code>value_list</code></em>)</code></a> where
                <em class="replaceable"><code>value_list</code></em> has more than one
                element.
              </p></li><li><p>
                String comparisons are case-insensitive by default, with
                sort ordering determined by the collation of the current
                character set, which is <code class="literal">latin1</code>
                (cp1252 West European) by default. If you don't like
                this, you should declare your columns with the
                <code class="literal">BINARY</code> attribute or use the
                <code class="literal">BINARY</code> cast, which causes comparisons
                to be done using the underlying character code values
                rather then a lexical ordering.
              </p></li><li><p>
                <a class="indexterm" name="id3989872"></a>

                <a class="indexterm" name="id3989881"></a>

                The <a href="functions.html#function_mod"><code class="literal">%</code></a>
                operator is a synonym for
                <a href="functions.html#function_mod"><code class="literal">MOD()</code></a>. That is,
                <code class="literal"><em class="replaceable"><code>N</code></em> %
                <em class="replaceable"><code>M</code></em></code> is equivalent to
                <a href="functions.html#function_mod"><code class="literal">MOD(<em class="replaceable"><code>N</code></em>,<em class="replaceable"><code>M</code></em>)</code></a>.
                <a href="functions.html#function_mod"><code class="literal">%</code></a> is
                supported for C programmers and for compatibility with
                PostgreSQL.
              </p></li><li><p>
                The <a href="functions.html#operator_equal"><code class="literal">=</code></a>,
                <a href="functions.html#operator_not-equal"><code class="literal">&lt;&gt;</code></a>,
                <a href="functions.html#operator_less-than-or-equal"><code class="literal">&lt;=</code></a>,
                <a href="functions.html#operator_less-than"><code class="literal">&lt;</code></a>,
                <a href="functions.html#operator_greater-than-or-equal"><code class="literal">&gt;=</code></a>,
                <a href="functions.html#operator_greater-than"><code class="literal">&gt;</code></a>,
                <a href="functions.html#operator_left-shift"><code class="literal">&lt;&lt;</code></a>,
                <a href="functions.html#operator_right-shift"><code class="literal">&gt;&gt;</code></a>,
                <a href="functions.html#operator_equal-to"><code class="literal">&lt;=&gt;</code></a>,
                <a href="functions.html#operator_and"><code class="literal">AND</code></a>,
                <a href="functions.html#operator_or"><code class="literal">OR</code></a>, or
                <a href="functions.html#operator_like"><code class="literal">LIKE</code></a>
                operators may be used in expressions in the output
                column list (to the left of the <code class="literal">FROM</code>)
                in <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT</code></a> statements. For
                example:
              </p><pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT col1=1 AND col2=2 FROM my_table;</code></strong>
</pre></li><li><p>
                The <a href="functions.html#function_last-insert-id"><code class="literal">LAST_INSERT_ID()</code></a>
                function returns the most recent
                <code class="literal">AUTO_INCREMENT</code> value. See
                <a href="functions.html#information-functions" title="11.11.3. Information Functions">Section 11.11.3, “Information Functions”</a>.
              </p></li><li><p>
                <a href="functions.html#operator_like"><code class="literal">LIKE</code></a> is allowed on numeric
                values.
              </p></li><li><p>
                The <a href="functions.html#operator_regexp"><code class="literal">REGEXP</code></a> and
                <a href="functions.html#operator_not-regexp"><code class="literal">NOT REGEXP</code></a> extended regular
                expression operators.
              </p></li><li><p>
                <a href="functions.html#function_concat"><code class="literal">CONCAT()</code></a> or
                <a href="functions.html#function_char"><code class="literal">CHAR()</code></a> with one argument
                or more than two arguments. (In MySQL Server, these
                functions can take a variable number of arguments.)
              </p></li><li><p>
                The <a href="functions.html#function_bit-count"><code class="literal">BIT_COUNT()</code></a>,
                <a href="functions.html#operator_case"><code class="literal">CASE</code></a>,
                <a href="functions.html#function_elt"><code class="literal">ELT()</code></a>,
                <a href="functions.html#function_from-days"><code class="literal">FROM_DAYS()</code></a>,
                <a href="functions.html#function_format"><code class="literal">FORMAT()</code></a>,
                <a href="functions.html#function_if"><code class="literal">IF()</code></a>,
                <a href="functions.html#function_password"><code class="literal">PASSWORD()</code></a>,
                <a href="functions.html#function_encrypt"><code class="literal">ENCRYPT()</code></a>,
                <a href="functions.html#function_md5"><code class="literal">MD5()</code></a>,
                <a href="functions.html#function_encode"><code class="literal">ENCODE()</code></a>,
                <a href="functions.html#function_decode"><code class="literal">DECODE()</code></a>,
                <a href="functions.html#function_period-add"><code class="literal">PERIOD_ADD()</code></a>,
                <a href="functions.html#function_period-diff"><code class="literal">PERIOD_DIFF()</code></a>,
                <a href="functions.html#function_to-days"><code class="literal">TO_DAYS()</code></a>, and
                <a href="functions.html#function_weekday"><code class="literal">WEEKDAY()</code></a> functions.
              </p></li><li><p>
                Use of <a href="functions.html#function_trim"><code class="literal">TRIM()</code></a> to trim
                substrings. Standard SQL supports removal of single
                characters only.
              </p></li><li><p>
                The <code class="literal">GROUP BY</code> functions
                <a href="functions.html#function_std"><code class="literal">STD()</code></a>,
                <a href="functions.html#function_bit-or"><code class="literal">BIT_OR()</code></a>,
                <a href="functions.html#function_bit-and"><code class="literal">BIT_AND()</code></a>,
                <a href="functions.html#function_bit-xor"><code class="literal">BIT_XOR()</code></a>, and
                <a href="functions.html#function_group-concat"><code class="literal">GROUP_CONCAT()</code></a>. See
                <a href="functions.html#group-by-functions-and-modifiers" title="11.12. Functions and Modifiers for Use with GROUP BY Clauses">Section 11.12, “Functions and Modifiers for Use with <code class="literal">GROUP BY</code> Clauses”</a>.
              </p></li></ul></div></li></ul></div><p>
        For a prioritized list indicating when new extensions are added
        to MySQL Server, you should consult the online MySQL development
        roadmap at <a href="http://dev.mysql.com/doc/mysql/en/roadmap.html" target="_top">http://dev.mysql.com/doc/mysql/en/roadmap.html</a>.
      </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="differences-from-ansi"></a>1.7.5. MySQL Differences from Standard SQL</h3></div></div></div><div class="toc"><dl><dt><span class="section"><a href="introduction.html#ansi-diff-select-into-table">1.7.5.1. <code class="literal">SELECT INTO TABLE</code></a></span></dt><dt><span class="section"><a href="introduction.html#ansi-diff-transactions">1.7.5.2. Transactions and Atomic Operations</a></span></dt><dt><span class="section"><a href="introduction.html#ansi-diff-triggers">1.7.5.3. Stored Routines and Triggers</a></span></dt><dt><span class="section"><a href="introduction.html#ansi-diff-foreign-keys">1.7.5.4. Foreign Keys</a></span></dt><dt><span class="section"><a href="introduction.html#ansi-diff-views">1.7.5.5. Views</a></span></dt><dt><span class="section"><a href="introduction.html#ansi-diff-comments">1.7.5.6. '<code class="literal">--</code>' as the Start of a Comment</a></span></dt></dl></div><a class="indexterm" name="id3990343"></a><p>
        We try to make MySQL Server follow the ANSI SQL standard and the
        ODBC SQL standard, but MySQL Server performs operations
        differently in some cases:
      </p><div class="itemizedlist"><ul type="disc"><li><p>
            There are several differences between the MySQL and standard
            SQL privilege systems. For example, in MySQL, privileges for
            a table are not automatically revoked when you delete a
            table. You must explicitly issue a
            <a href="sql-syntax.html#revoke" title="12.5.1.5. REVOKE Syntax"><code class="literal">REVOKE</code></a> statement to revoke
            privileges for a table. For more information, see
            <a href="sql-syntax.html#revoke" title="12.5.1.5. REVOKE Syntax">Section 12.5.1.5, “<code class="literal">REVOKE</code> Syntax”</a>.
          </p></li><li><p>
            The <a href="functions.html#function_cast"><code class="literal">CAST()</code></a> function does not
            support cast to <a href="data-types.html#numeric-types" title="10.2. Numeric Types"><code class="literal">REAL</code></a> or
            <a href="data-types.html#numeric-types" title="10.2. Numeric Types"><code class="literal">BIGINT</code></a>. See
            <a href="functions.html#cast-functions" title="11.9. Cast Functions and Operators">Section 11.9, “Cast Functions and Operators”</a>.
          </p></li></ul></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="ansi-diff-select-into-table"></a>1.7.5.1. <code class="literal">SELECT INTO TABLE</code></h4></div></div></div><a class="indexterm" name="id3990429"></a><p>
          MySQL Server doesn't support the <code class="literal">SELECT ... INTO
          TABLE</code> Sybase SQL extension. Instead, MySQL Server
          supports the
          <a href="sql-syntax.html#insert-select" title="12.2.5.1. INSERT ...
        SELECT Syntax"><code class="literal">INSERT INTO ...
          SELECT</code></a> standard SQL syntax, which is basically the
          same thing. See <a href="sql-syntax.html#insert-select" title="12.2.5.1. INSERT ...
        SELECT Syntax">Section 12.2.5.1, “<code class="literal">INSERT ...
        SELECT</code> Syntax”</a>. For example:
        </p><pre class="programlisting">INSERT INTO tbl_temp2 (fld_id)
    SELECT tbl_temp1.fld_order_id
    FROM tbl_temp1 WHERE tbl_temp1.fld_order_id &gt; 100;
</pre><p>
          Alternatively, you can use
          <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT ... INTO
          OUTFILE</code></a> or
          <a href="sql-syntax.html#create-table" title="12.1.17. CREATE TABLE Syntax"><code class="literal">CREATE TABLE ...
          SELECT</code></a>.
        </p><p>
          As of MySQL 5.0, you can use
          <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT ...
          INTO</code></a> with user-defined variables. The same syntax
          can also be used inside stored routines using cursors and
          local variables. See <a href="sql-syntax.html#select-into-statement" title="12.8.3.3. SELECT ... INTO
        Statement">Section 12.8.3.3, “<code class="literal">SELECT ... INTO</code>
        Statement”</a>.
        </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="ansi-diff-transactions"></a>1.7.5.2. Transactions and Atomic Operations</h4></div></div></div><a class="indexterm" name="id3990518"></a><a class="indexterm" name="id3990527"></a><a class="indexterm" name="id3990536"></a><a class="indexterm" name="id3990548"></a><a class="indexterm" name="id3990557"></a><a class="indexterm" name="id3990570"></a><a class="indexterm" name="id3990582"></a><a class="indexterm" name="id3990591"></a><p>
          MySQL Server (version 3.23-max and all versions 4.0 and above)
          supports transactions with the <code class="literal">InnoDB</code>
          transactional storage engine. <code class="literal">InnoDB</code>
          provides <span class="emphasis"><em>full</em></span> ACID compliance. See
          <a href="storage-engines.html" title="Chapter 13. Storage Engines">Chapter 13, <i>Storage Engines</i></a>. For information about
          <code class="literal">InnoDB</code> differences from standard SQL with
          regard to treatment of transaction errors, see
          <a href="storage-engines.html#innodb-error-handling" title="13.6.12. InnoDB Error Handling">Section 13.6.12, “<code class="literal">InnoDB</code> Error Handling”</a>.
        </p><p>
          The other nontransactional storage engines in MySQL Server
          (such as <code class="literal">MyISAM</code>) follow a different
          paradigm for data integrity called “<span class="quote">atomic
          operations.</span>” In transactional terms,
          <code class="literal">MyISAM</code> tables effectively always operate in
          <a href="server-administration.html#sysvar_autocommit"><code class="literal">autocommit = 1</code></a> mode. Atomic
          operations often offer comparable integrity with higher
          performance.
        </p><p>
          Because MySQL Server supports both paradigms, you can decide
          whether your applications are best served by the speed of
          atomic operations or the use of transactional features. This
          choice can be made on a per-table basis.
        </p><p>
          As noted, the tradeoff for transactional versus
          nontransactional storage engines lies mostly in performance.
          Transactional tables have significantly higher memory and disk
          space requirements, and more CPU overhead. On the other hand,
          transactional storage engines such as
          <code class="literal">InnoDB</code> also offer many significant
          features. MySQL Server's modular design allows the concurrent
          use of different storage engines to suit different
          requirements and deliver optimum performance in all
          situations.
        </p><p class="mnmas"><b>MySQL Enterprise</b>
            For expert advice on choosing and tuning storage engines,
            subscribe to the MySQL Enterprise Monitor. For more
            information, see
            <a href="http://www.mysql.com/products/enterprise/advisors.html" target="_top">http://www.mysql.com/products/enterprise/advisors.html</a>.
          </p><p>
          But how do you use the features of MySQL Server to maintain
          rigorous integrity even with the nontransactional
          <code class="literal">MyISAM</code> tables, and how do these features
          compare with the transactional storage engines?
        </p><div class="itemizedlist"><ul type="disc"><li><p>
              If your applications are written in a way that is
              dependent on being able to call
              <a href="sql-syntax.html#commit" title="12.4.1. START TRANSACTION,
      COMMIT, and
      ROLLBACK Syntax"><code class="literal">ROLLBACK</code></a>
              rather than <a href="sql-syntax.html#commit" title="12.4.1. START TRANSACTION,
      COMMIT, and
      ROLLBACK Syntax"><code class="literal">COMMIT</code></a> in
              critical situations, transactions are more convenient.
              Transactions also ensure that unfinished updates or
              corrupting activities are not committed to the database;
              the server is given the opportunity to do an automatic
              rollback and your database is saved.
            </p><p>
              If you use nontransactional tables, MySQL Server in almost
              all cases allows you to resolve potential problems by
              including simple checks before updates and by running
              simple scripts that check the databases for
              inconsistencies and automatically repair or warn if such
              an inconsistency occurs. You can normally fix tables
              perfectly with no data integrity loss just by using the
              MySQL log or even adding one extra log.
            </p></li><li><p>
              More often than not, critical transactional updates can be
              rewritten to be atomic. Generally speaking, all integrity
              problems that transactions solve can be done with
              <a href="sql-syntax.html#lock-tables" title="12.4.5. LOCK TABLES and
      UNLOCK
      TABLES Syntax"><code class="literal">LOCK TABLES</code></a> or atomic
              updates, ensuring that there are no automatic aborts from
              the server, which is a common problem with transactional
              database systems.
            </p></li><li><p>
              To be safe with MySQL Server, regardless of whether you
              use transactional tables, you only need to have backups
              and have binary logging turned on. When that is true, you
              can recover from any situation that you could with any
              other transactional database system. It is always good to
              have backups, regardless of which database system you use.
            </p></li></ul></div><p>
          The transactional paradigm has its advantages and
          disadvantages. Many users and application developers depend on
          the ease with which they can code around problems where an
          abort appears to be necessary, or is necessary. However, even
          if you are new to the atomic operations paradigm, or more
          familiar with transactions, do consider the speed benefit that
          nontransactional tables can offer on the order of three to
          five times the speed of the fastest and most optimally tuned
          transactional tables.
        </p><p>
          In situations where integrity is of highest importance, MySQL
          Server offers transaction-level reliability and integrity even
          for nontransactional tables. If you lock tables with
          <a href="sql-syntax.html#lock-tables" title="12.4.5. LOCK TABLES and
      UNLOCK
      TABLES Syntax"><code class="literal">LOCK TABLES</code></a>, all updates stall
          until integrity checks are made. If you obtain a <code class="literal">READ
          LOCAL</code> lock (as opposed to a write lock) for a table
          that allows concurrent inserts at the end of the table, reads
          are allowed, as are inserts by other clients. The newly
          inserted records are not be seen by the client that has the
          read lock until it releases the lock. With
          <a href="sql-syntax.html#insert-delayed" title="12.2.5.2. INSERT DELAYED Syntax"><code class="literal">INSERT DELAYED</code></a>, you can write
          inserts that go into a local queue until the locks are
          released, without having the client wait for the insert to
          complete. See <a href="optimization.html#concurrent-inserts" title="7.3.3. Concurrent Inserts">Section 7.3.3, “Concurrent Inserts”</a>, and
          <a href="sql-syntax.html#insert-delayed" title="12.2.5.2. INSERT DELAYED Syntax">Section 12.2.5.2, “<code class="literal">INSERT DELAYED</code> Syntax”</a>.
        </p><p>
          “<span class="quote">Atomic,</span>” in the sense that we mean it, is
          nothing magical. It only means that you can be sure that while
          each specific update is running, no other user can interfere
          with it, and there can never be an automatic rollback (which
          can happen with transactional tables if you are not very
          careful). MySQL Server also guarantees that there are no dirty
          reads.
        </p><p>
          Following are some techniques for working with
          nontransactional tables:
        </p><div class="itemizedlist"><ul type="disc"><li><p>
              Loops that need transactions normally can be coded with
              the help of <a href="sql-syntax.html#lock-tables" title="12.4.5. LOCK TABLES and
      UNLOCK
      TABLES Syntax"><code class="literal">LOCK TABLES</code></a>,
              and you don't need cursors to update records on the fly.
            </p></li><li><p>
              To avoid using
              <a href="sql-syntax.html#commit" title="12.4.1. START TRANSACTION,
      COMMIT, and
      ROLLBACK Syntax"><code class="literal">ROLLBACK</code></a>,
              you can employ the following strategy:
            </p><div class="orderedlist"><ol type="1"><li><p>
                  Use <a href="sql-syntax.html#lock-tables" title="12.4.5. LOCK TABLES and
      UNLOCK
      TABLES Syntax"><code class="literal">LOCK TABLES</code></a> to lock
                  all the tables you want to access.
                </p></li><li><p>
                  Test the conditions that must be true before
                  performing the update.
                </p></li><li><p>
                  Update if the conditions are satisfied.
                </p></li><li><p>
                  Use
                  <a href="sql-syntax.html#lock-tables" title="12.4.5. LOCK TABLES and
      UNLOCK
      TABLES Syntax"><code class="literal">UNLOCK
                  TABLES</code></a> to release your locks.
                </p></li></ol></div><p>
              This is usually a much faster method than using
              transactions with possible rollbacks, although not always.
              The only situation this solution doesn't handle is when
              someone kills the threads in the middle of an update. In
              that case, all locks are released but some of the updates
              may not have been executed.
            </p></li><li><p>
              You can also use functions to update records in a single
              operation. You can get a very efficient application by
              using the following techniques:
            </p><div class="itemizedlist"><ul type="circle"><li><p>
                  Modify columns relative to their current value.
                </p></li><li><p>
                  Update only those columns that actually have changed.
                </p></li></ul></div><p>
              For example, when we are updating customer information, we
              update only the customer data that has changed and test
              only that none of the changed data, or data that depends
              on the changed data, has changed compared to the original
              row. The test for changed data is done with the
              <code class="literal">WHERE</code> clause in the
              <a href="sql-syntax.html#update" title="12.2.11. UPDATE Syntax"><code class="literal">UPDATE</code></a> statement. If the
              record wasn't updated, we give the client a message:
              “<span class="quote">Some of the data you have changed has been changed
              by another user.</span>” Then we show the old row versus
              the new row in a window so that the user can decide which
              version of the customer record to use.
            </p><p>
              This gives us something that is similar to column locking
              but is actually even better because we only update some of
              the columns, using values that are relative to their
              current values. This means that typical
              <a href="sql-syntax.html#update" title="12.2.11. UPDATE Syntax"><code class="literal">UPDATE</code></a> statements look
              something like these:
            </p><pre class="programlisting">UPDATE tablename SET pay_back=pay_back+125;

UPDATE customer
  SET
    customer_date='current_date',
    address='new address',
    phone='new phone',
    money_owed_to_us=money_owed_to_us-125
  WHERE
    customer_id=id AND address='old address' AND phone='old phone';
</pre><p>
              This is very efficient and works even if another client
              has changed the values in the <code class="literal">pay_back</code>
              or <code class="literal">money_owed_to_us</code> columns.
            </p></li><li><p>
              <a class="indexterm" name="id3991022"></a>

              <a class="indexterm" name="id3991031"></a>

              In many cases, users have wanted <a href="sql-syntax.html#lock-tables" title="12.4.5. LOCK TABLES and
      UNLOCK
      TABLES Syntax"><code class="literal">LOCK
              TABLES</code></a> or
              <a href="sql-syntax.html#commit" title="12.4.1. START TRANSACTION,
      COMMIT, and
      ROLLBACK Syntax"><code class="literal">ROLLBACK</code></a>
              for the purpose of managing unique identifiers. This can
              be handled much more efficiently without locking or
              rolling back by using an <code class="literal">AUTO_INCREMENT</code>
              column and either the
              <a href="functions.html#function_last-insert-id"><code class="literal">LAST_INSERT_ID()</code></a> SQL
              function or the
              <a href="connectors-apis.html#mysql-insert-id" title="21.9.3.37. mysql_insert_id()"><code class="literal">mysql_insert_id()</code></a> C API
              function. See <a href="functions.html#information-functions" title="11.11.3. Information Functions">Section 11.11.3, “Information Functions”</a>, and
              <a href="connectors-apis.html#mysql-insert-id" title="21.9.3.37. mysql_insert_id()">Section 21.9.3.37, “<code class="literal">mysql_insert_id()</code>”</a>.
            </p><a class="indexterm" name="id3991087"></a><a class="indexterm" name="id3991099"></a><p>
              You can generally code around the need for row-level
              locking. Some situations really do need it, and
              <code class="literal">InnoDB</code> tables support row-level
              locking. Otherwise, with <code class="literal">MyISAM</code> tables,
              you can use a flag column in the table and do something
              like the following:
            </p><pre class="programlisting">UPDATE <em class="replaceable"><code>tbl_name</code></em> SET row_flag=1 WHERE id=ID;
</pre><p>
              MySQL returns <code class="literal">1</code> for the number of
              affected rows if the row was found and
              <code class="literal">row_flag</code> wasn't <code class="literal">1</code> in
              the original row. You can think of this as though MySQL
              Server changed the preceding statement to:
            </p><pre class="programlisting">UPDATE <em class="replaceable"><code>tbl_name</code></em> SET row_flag=1 WHERE id=ID AND row_flag &lt;&gt; 1;
</pre></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="ansi-diff-triggers"></a>1.7.5.3. Stored Routines and Triggers</h4></div></div></div><a class="indexterm" name="id3991183"></a><a class="indexterm" name="id3991196"></a><a class="indexterm" name="id3991208"></a><p>
          Stored procedures and functions are implemented beginning with
          MySQL 5.0. See <a href="stored-programs-views.html#stored-routines" title="19.2. Using Stored Routines (Procedures and Functions)">Section 19.2, “Using Stored Routines (Procedures and Functions)”</a>.
        </p><p>
          Basic trigger functionality is implemented beginning with
          MySQL 5.0.2, with further development planned for MySQL 5.1.
          See <a href="stored-programs-views.html#triggers" title="19.3. Using Triggers">Section 19.3, “Using Triggers”</a>.
        </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="ansi-diff-foreign-keys"></a>1.7.5.4. Foreign Keys</h4></div></div></div><a class="indexterm" name="id3991244"></a><a class="indexterm" name="id3991253"></a><p>
          The <code class="literal">InnoDB</code> storage engine supports checking
          of foreign key constraints, including
          <code class="literal">CASCADE</code>, <code class="literal">ON DELETE</code>, and
          <code class="literal">ON UPDATE</code>. See
          <a href="storage-engines.html#innodb-foreign-key-constraints" title="13.6.4.4. FOREIGN KEY Constraints">Section 13.6.4.4, “<code class="literal">FOREIGN KEY</code> Constraints”</a>.
        </p><p>
          For storage engines other than <code class="literal">InnoDB</code>,
          MySQL Server parses the <code class="literal">FOREIGN KEY</code> syntax
          in <a href="sql-syntax.html#create-table" title="12.1.17. CREATE TABLE Syntax"><code class="literal">CREATE TABLE</code></a> statements, but
          does not use or store it. In the future, the implementation
          will be extended to store this information in the table
          specification file so that it may be retrieved by
          <a href="programs.html#mysqldump" title="4.5.4. mysqldump — A Database Backup Program"><span><strong class="command">mysqldump</strong></span></a> and ODBC. At a later stage,
          foreign key constraints will be implemented for
          <code class="literal">MyISAM</code> tables as well.
        </p><p>
          Foreign key enforcement offers several benefits to database
          developers:
        </p><div class="itemizedlist"><ul type="disc"><li><p>
              Assuming proper design of the relationships, foreign key
              constraints make it more difficult for a programmer to
              introduce an inconsistency into the database.
            </p></li><li><p>
              Centralized checking of constraints by the database server
              makes it unnecessary to perform these checks on the
              application side. This eliminates the possibility that
              different applications may not all check the constraints
              in the same way.
            </p></li><li><p>
              Using cascading updates and deletes can simplify the
              application code.
            </p></li><li><p>
              Properly designed foreign key rules aid in documenting
              relationships between tables.
            </p></li></ul></div><p>
          Do keep in mind that these benefits come at the cost of
          additional overhead for the database server to perform the
          necessary checks. Additional checking by the server affects
          performance, which for some applications may be sufficiently
          undesirable as to be avoided if possible. (Some major
          commercial applications have coded the foreign key logic at
          the application level for this reason.)
        </p><p>
          MySQL gives database developers the choice of which approach
          to use. If you don't need foreign keys and want to avoid the
          overhead associated with enforcing referential integrity, you
          can choose another storage engine instead, such as
          <code class="literal">MyISAM</code>. (For example, the
          <code class="literal">MyISAM</code> storage engine offers very fast
          performance for applications that perform only
          <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT</code></a> and
          <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT</code></a> operations. In this
          case, the table has no holes in the middle and the inserts can
          be performed concurrently with retrievals. See
          <a href="optimization.html#concurrent-inserts" title="7.3.3. Concurrent Inserts">Section 7.3.3, “Concurrent Inserts”</a>.)
        </p><p>
          If you choose not to take advantage of referential integrity
          checks, keep the following considerations in mind:
        </p><div class="itemizedlist"><ul type="disc"><li><p>
              In the absence of server-side foreign key relationship
              checking, the application itself must handle relationship
              issues. For example, it must take care to insert rows into
              tables in the proper order, and to avoid creating orphaned
              child records. It must also be able to recover from errors
              that occur in the middle of multiple-record insert
              operations.
            </p></li><li><p>
              If <code class="literal">ON DELETE</code> is the only referential
              integrity capability an application needs, you can achieve
              a similar effect as of MySQL Server 4.0 by using
              multiple-table <a href="sql-syntax.html#delete" title="12.2.2. DELETE Syntax"><code class="literal">DELETE</code></a>
              statements to delete rows from many tables with a single
              statement. See <a href="sql-syntax.html#delete" title="12.2.2. DELETE Syntax">Section 12.2.2, “<code class="literal">DELETE</code> Syntax”</a>.
            </p></li><li><p>
              A workaround for the lack of <code class="literal">ON DELETE</code>
              is to add the appropriate
              <a href="sql-syntax.html#delete" title="12.2.2. DELETE Syntax"><code class="literal">DELETE</code></a> statements to your
              application when you delete records from a table that has
              a foreign key. In practice, this is often as quick as
              using foreign keys and is more portable.
            </p></li></ul></div><p>
          Be aware that the use of foreign keys can sometimes lead to
          problems:
        </p><div class="itemizedlist"><ul type="disc"><li><p>
              Foreign key support addresses many referential integrity
              issues, but it is still necessary to design key
              relationships carefully to avoid circular rules or
              incorrect combinations of cascading deletes.
            </p></li><li><p>
              It is not uncommon for a DBA to create a topology of
              relationships that makes it difficult to restore
              individual tables from a backup. (MySQL alleviates this
              difficulty by allowing you to temporarily disable foreign
              key checks when reloading a table that depends on other
              tables. See
              <a href="storage-engines.html#innodb-foreign-key-constraints" title="13.6.4.4. FOREIGN KEY Constraints">Section 13.6.4.4, “<code class="literal">FOREIGN KEY</code> Constraints”</a>. As of
              MySQL 4.1.1, <a href="programs.html#mysqldump" title="4.5.4. mysqldump — A Database Backup Program"><span><strong class="command">mysqldump</strong></span></a> generates dump
              files that take advantage of this capability automatically
              when they are reloaded.)
            </p></li></ul></div><p>
          Foreign keys in SQL are used to check and enforce referential
          integrity, not to join tables. If you want to get results from
          multiple tables from a <a href="sql-syntax.html#select" title="12.2.8. SELECT Syntax"><code class="literal">SELECT</code></a>
          statement, you do this by performing a join between them:
        </p><pre class="programlisting">SELECT * FROM t1 INNER JOIN t2 ON t1.id = t2.id;
</pre><p>
          See <a href="sql-syntax.html#join" title="12.2.8.1. JOIN Syntax">Section 12.2.8.1, “<code class="literal">JOIN</code> Syntax”</a>, and
          <a href="tutorial.html#example-foreign-keys" title="3.6.6. Using Foreign Keys">Section 3.6.6, “Using Foreign Keys”</a>.
        </p><p>
          The <code class="literal">FOREIGN KEY</code> syntax without <code class="literal">ON
          DELETE ...</code> is often used by ODBC applications to
          produce automatic <code class="literal">WHERE</code> clauses.
        </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="ansi-diff-views"></a>1.7.5.5. Views</h4></div></div></div><a class="indexterm" name="id3991594"></a><a class="indexterm" name="id3991603"></a><p>
          Views (including updatable views) are implemented beginning
          with MySQL Server 5.0.1. See <a href="stored-programs-views.html#views" title="19.5. Using Views">Section 19.5, “Using Views”</a>.
        </p><p>
          Views are useful for allowing users to access a set of
          relations (tables) as if it were a single table, and limiting
          their access to just that. Views can also be used to restrict
          access to rows (a subset of a particular table). For access
          control to columns, you can also use the sophisticated
          privilege system in MySQL Server. See
          <a href="server-administration.html#privilege-system" title="5.4. The MySQL Access Privilege System">Section 5.4, “The MySQL Access Privilege System”</a>.
        </p><p>
          In designing an implementation of views, our ambitious goal,
          as much as is possible within the confines of SQL, has been
          full compliance with “<span class="quote">Codd's Rule #6</span>” for
          relational database systems: “<span class="quote">All views that are
          theoretically updatable, should in practice also be
          updatable.</span>”
        </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="ansi-diff-comments"></a>1.7.5.6. '<code class="literal">--</code>' as the Start of a Comment</h4></div></div></div><a class="indexterm" name="id3991666"></a><a class="indexterm" name="id3991679"></a><p>
          Standard SQL uses the C syntax <code class="literal">/* this is a comment
          */</code> for comments, and MySQL Server supports this
          syntax as well. MySQL also support extensions to this syntax
          that allow MySQL-specific SQL to be embedded in the comment,
          as described in <a href="language-structure.html#comments" title="8.5. Comment Syntax">Section 8.5, “Comment Syntax”</a>.
        </p><p>
          Standard SQL uses “<span class="quote"><code class="option">--</code></span>” as a
          start-comment sequence. MySQL Server uses
          “<span class="quote"><code class="literal">#</code></span>” as the start comment
          character. MySQL Server 3.23.3 and up also supports a variant
          of the “<span class="quote"><code class="literal">--</code></span>” comment style.
          That is, the “<span class="quote"><code class="literal">--</code></span>”
          start-comment sequence must be followed by a space (or by a
          control character such as a newline). The space is required to
          prevent problems with automatically generated SQL queries that
          use constructs such as the following, where we automatically
          insert the value of the payment for
          <code class="literal">payment</code>:
        </p><pre class="programlisting">UPDATE account SET credit=credit-payment
</pre><p>
          Consider about what happens if <code class="literal">payment</code> has
          a negative value such as <code class="literal">-1</code>:
        </p><pre class="programlisting">UPDATE account SET credit=credit--1
</pre><p>
          <code class="literal">credit--1</code> is a legal expression in SQL, but
          “<span class="quote"><code class="literal">--</code></span>” is interpreted as the
          start of a comment, part of the expression is discarded. The
          result is a statement that has a completely different meaning
          than intended:
        </p><pre class="programlisting">UPDATE account SET credit=credit
</pre><p>
          The statement produces no change in value at all. This
          illustrates that allowing comments to start with
          “<span class="quote"><code class="literal">--</code></span>” can have serious
          consequences.
        </p><p>
          Using our implementation requires a space following the
          “<span class="quote"><code class="literal">--</code></span>” in order for it to be
          recognized as a start-comment sequence in MySQL Server 3.23.3
          and newer. Therefore, <code class="literal">credit--1</code> is safe to
          use.
        </p><p>
          Another safe feature is that the <a href="programs.html#mysql" title="4.5.1. mysql — The MySQL Command-Line Tool"><span><strong class="command">mysql</strong></span></a>
          command-line client ignores lines that start with
          “<span class="quote"><code class="literal">--</code></span>”.
        </p><p>
          The following information is relevant only if you are running
          a MySQL version earlier than 3.23.3:
        </p><p>
          If you have an SQL script in a text file that contains
          “<span class="quote"><code class="literal">--</code></span>” comments, you should use
          the <a href="programs.html#replace-utility" title="4.8.2. replace — A String-Replacement Utility"><span><strong class="command">replace</strong></span></a> utility as follows to convert
          the comments to use “<span class="quote"><code class="literal">#</code></span>”
          characters before executing the script:
        </p><pre class="programlisting">shell&gt; <strong class="userinput"><code>replace " --" " #" &lt; text-file-with-funny-comments.sql \</code></strong>
         <strong class="userinput"><code>| mysql <em class="replaceable"><code>db_name</code></em></code></strong>
</pre><p>
          That is safer than executing the script in the usual way:
        </p><pre class="programlisting">shell&gt; <strong class="userinput"><code>mysql <em class="replaceable"><code>db_name</code></em> &lt; text-file-with-funny-comments.sql</code></strong>
</pre><p>
          You can also edit the script file “<span class="quote">in place</span>” to
          change the “<span class="quote"><code class="literal">--</code></span>” comments to
          “<span class="quote"><code class="literal">#</code></span>” comments:
        </p><pre class="programlisting">shell&gt; <strong class="userinput"><code>replace " --" " #" -- text-file-with-funny-comments.sql</code></strong>
</pre><p>
          Change them back with this command:
        </p><pre class="programlisting">shell&gt; <strong class="userinput"><code>replace " #" " --" -- text-file-with-funny-comments.sql</code></strong>
</pre><p>
          See <a href="programs.html#replace-utility" title="4.8.2. replace — A String-Replacement Utility">Section 4.8.2, “<span><strong class="command">replace</strong></span> — A String-Replacement Utility”</a>.
        </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="constraints"></a>1.7.6. How MySQL Deals with Constraints</h3></div></div></div><div class="toc"><dl><dt><span class="section"><a href="introduction.html#constraint-primary-key">1.7.6.1. <code class="literal">PRIMARY KEY</code> and <code class="literal">UNIQUE</code> Index
          Constraints</a></span></dt><dt><span class="section"><a href="introduction.html#constraint-invalid-data">1.7.6.2. Constraints on Invalid Data</a></span></dt><dt><span class="section"><a href="introduction.html#constraint-enum">1.7.6.3. <code class="literal">ENUM</code> and
          <code class="literal">SET</code> Constraints</a></span></dt></dl></div><a class="indexterm" name="id3991982"></a><p>
        MySQL allows you to work both with transactional tables that
        allow rollback and with nontransactional tables that do not.
        Because of this, constraint handling is a bit different in MySQL
        than in other DBMSs. We must handle the case when you have
        inserted or updated a lot of rows in a nontransactional table
        for which changes cannot be rolled back when an error occurs.
      </p><p>
        The basic philosophy is that MySQL Server tries to produce an
        error for anything that it can detect while parsing a statement
        to be executed, and tries to recover from any errors that occur
        while executing the statement. We do this in most cases, but not
        yet for all.
      </p><p>
        The options MySQL has when an error occurs are to stop the
        statement in the middle or to recover as well as possible from
        the problem and continue. By default, the server follows the
        latter course. This means, for example, that the server may
        coerce illegal values to the closest legal values.
      </p><p>
        Several SQL mode options are available to provide greater
        control over handling of bad data values and whether to continue
        statement execution or abort when errors occur. Using these
        options, you can configure MySQL Server to act in a more
        traditional fashion that is like other DBMSs that reject
        improper input. The SQL mode can be set globally at server
        startup to affect all clients. Individual clients can set the
        SQL mode at runtime, which enables each client to select the
        behavior most appropriate for its requirements. See
        <a href="server-administration.html#server-sql-mode" title="5.1.8. Server SQL Modes">Section 5.1.8, “Server SQL Modes”</a>.
      </p><p class="mnmas"><b>MySQL Enterprise</b>
          To be alerted when there is no form of server-enforced data
          integrity, subscribe to the MySQL Enterprise Monitor. For more
          information, see
          <a href="http://www.mysql.com/products/enterprise/advisors.html" target="_top">http://www.mysql.com/products/enterprise/advisors.html</a>.
        </p><p>
        The following sections describe how MySQL Server handles
        different types of constraints.
      </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="constraint-primary-key"></a>1.7.6.1. <code class="literal">PRIMARY KEY</code> and <code class="literal">UNIQUE</code> Index
          Constraints</h4></div></div></div><a class="indexterm" name="id3992065"></a><a class="indexterm" name="id3992077"></a><a class="indexterm" name="id3992089"></a><p>
          Normally, errors occurs for data-change statements (such as
          <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT</code></a> or
          <a href="sql-syntax.html#update" title="12.2.11. UPDATE Syntax"><code class="literal">UPDATE</code></a>) that would violate
          primary-key, unique-key, or foreign-key constraints. If you
          are using a transactional storage engine such as
          <code class="literal">InnoDB</code>, MySQL automatically rolls back the
          statement. If you are using a nontransactional storage engine,
          MySQL stops processing the statement at the row for which the
          error occurred and leaves any remaining rows unprocessed.
        </p><p>
          MySQL supports an <code class="literal">IGNORE</code> keyword for
          <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT</code></a>,
          <a href="sql-syntax.html#update" title="12.2.11. UPDATE Syntax"><code class="literal">UPDATE</code></a>, and so forth. If you
          use it, MySQL ignores primary-key or unique-key violations and
          continues processing with the next row. See the section for
          the statement that you are using (<a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax">Section 12.2.5, “<code class="literal">INSERT</code> Syntax”</a>,
          <a href="sql-syntax.html#update" title="12.2.11. UPDATE Syntax">Section 12.2.11, “<code class="literal">UPDATE</code> Syntax”</a>, and so forth).
        </p><p>
          You can get information about the number of rows actually
          inserted or updated with the
          <a href="connectors-apis.html#mysql-info" title="21.9.3.35. mysql_info()"><code class="literal">mysql_info()</code></a> C API function.
          You can also use the <a href="sql-syntax.html#show-warnings" title="12.5.5.42. SHOW WARNINGS Syntax"><code class="literal">SHOW
          WARNINGS</code></a> statement. See
          <a href="connectors-apis.html#mysql-info" title="21.9.3.35. mysql_info()">Section 21.9.3.35, “<code class="literal">mysql_info()</code>”</a>, and
          <a href="sql-syntax.html#show-warnings" title="12.5.5.42. SHOW WARNINGS Syntax">Section 12.5.5.42, “<code class="literal">SHOW WARNINGS</code> Syntax”</a>.
        </p><p>
          Currently, only <code class="literal">InnoDB</code> tables support
          foreign keys. See
          <a href="storage-engines.html#innodb-foreign-key-constraints" title="13.6.4.4. FOREIGN KEY Constraints">Section 13.6.4.4, “<code class="literal">FOREIGN KEY</code> Constraints”</a>. We plan to
          add foreign key support by other storage engines in a future
          MySQL release. See <a href="introduction.html#roadmap" title="1.4. MySQL Development Roadmap">Section 1.4, “MySQL Development Roadmap”</a>.
        </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="constraint-invalid-data"></a>1.7.6.2. Constraints on Invalid Data</h4></div></div></div><a class="indexterm" name="id3992221"></a><a class="indexterm" name="id3992234"></a><a class="indexterm" name="id3992246"></a><a class="indexterm" name="id3992258"></a><a class="indexterm" name="id3992271"></a><p>
          By default, MySQL is forgiving of illegal or improper data
          values and coerces them to legal values for data entry.
          However, you can change the server SQL mode to select more
          traditional treatment of bad values such that the server
          rejects them and aborts the statement in which they occur. See
          <a href="server-administration.html#server-sql-mode" title="5.1.8. Server SQL Modes">Section 5.1.8, “Server SQL Modes”</a>.
        </p><p>
          This section describes the default (forgiving) behavior of
          MySQL, as well as the strict SQL mode and how it differs.
        </p><p>
          If you are not using strict mode, then whenever you insert an
          “<span class="quote">incorrect</span>” value into a column, such as a
          <code class="literal">NULL</code> into a <code class="literal">NOT NULL</code>
          column or a too-large numeric value into a numeric column,
          MySQL sets the column to the “<span class="quote">best possible
          value</span>” instead of producing an error: The following
          rules describe in more detail how this works:
        </p><div class="itemizedlist"><ul type="disc"><li><p>
              If you try to store an out of range value into a numeric
              column, MySQL Server instead stores zero, the smallest
              possible value, or the largest possible value, whichever
              is closest to the invalid value.
            </p></li><li><p>
              For strings, MySQL stores either the empty string or as
              much of the string as can be stored in the column.
            </p></li><li><p>
              If you try to store a string that doesn't start with a
              number into a numeric column, MySQL Server stores 0.
            </p></li><li><p>
              Invalid values for <a href="data-types.html#enum" title="10.4.4. The ENUM Type"><code class="literal">ENUM</code></a> and
              <a href="data-types.html#set" title="10.4.5. The SET Type"><code class="literal">SET</code></a> columns are handled as
              described in <a href="introduction.html#constraint-enum" title="1.7.6.3. ENUM and
          SET Constraints">Section 1.7.6.3, “<code class="literal">ENUM</code> and
          <code class="literal">SET</code> Constraints”</a>.
            </p></li><li><p>
              MySQL allows you to store certain incorrect date values
              into <a href="data-types.html#datetime" title="10.3.1. The DATETIME,
        DATE, and
        TIMESTAMP Types"><code class="literal">DATE</code></a> and
              <a href="data-types.html#datetime" title="10.3.1. The DATETIME,
        DATE, and
        TIMESTAMP Types"><code class="literal">DATETIME</code></a> columns (such as
              <code class="literal">'2000-02-31'</code> or
              <code class="literal">'2000-02-00'</code>). The idea is that it is
              not the job of the SQL server to validate dates. If MySQL
              can store a date value and retrieve exactly the same
              value, MySQL stores it as given. If the date is totally
              wrong (outside the server's ability to store it), the
              special “<span class="quote">zero</span>” date value
              <code class="literal">'0000-00-00'</code> is stored in the column
              instead.
            </p></li><li><p>
              If you try to store <code class="literal">NULL</code> into a column
              that doesn't take <code class="literal">NULL</code> values, an error
              occurs for single-row
              <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT</code></a> statements. For
              multiple-row <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT</code></a>
              statements or for
              <a href="sql-syntax.html#insert-select" title="12.2.5.1. INSERT ...
        SELECT Syntax"><code class="literal">INSERT INTO
              ... SELECT</code></a> statements, MySQL Server stores the
              implicit default value for the column data type. In
              general, this is <code class="literal">0</code> for numeric types,
              the empty string (<code class="literal">''</code>) for string types,
              and the “<span class="quote">zero</span>” value for date and time types.
              Implicit default values are discussed in
              <a href="data-types.html#data-type-defaults" title="10.1.4. Data Type Default Values">Section 10.1.4, “Data Type Default Values”</a>.
            </p></li><li><p>
              If an <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT</code></a> statement
              specifies no value for a column, MySQL inserts its default
              value if the column definition includes an explicit
              <code class="literal">DEFAULT</code> clause. If the definition has
              no such <code class="literal">DEFAULT</code> clause, MySQL inserts
              the implicit default value for the column data type.
            </p></li></ul></div><p>
          The reason for using the preceding rules in nonstrict mode is
          that we can't check these conditions until the statement has
          begun executing. We can't just roll back if we encounter a
          problem after updating a few rows, because the storage engine
          may not support rollback. The option of terminating the
          statement is not that good; in this case, the update would be
          “<span class="quote">half done,</span>” which is probably the worst possible
          scenario. In this case, it is better to “<span class="quote">do the best you
          can</span>” and then continue as if nothing happened.
        </p><p>
          In MySQL 5.0.2 and up, you can select stricter treatment of
          input values by using the
          <a href="server-administration.html#sqlmode_strict_trans_tables"><code class="literal">STRICT_TRANS_TABLES</code></a> or
          <a href="server-administration.html#sqlmode_strict_all_tables"><code class="literal">STRICT_ALL_TABLES</code></a> SQL modes:
        </p><pre class="programlisting">SET sql_mode = 'STRICT_TRANS_TABLES';
SET sql_mode = 'STRICT_ALL_TABLES';
</pre><p>
          <a href="server-administration.html#sqlmode_strict_trans_tables"><code class="literal">STRICT_TRANS_TABLES</code></a> enables
          strict mode for transactional storage engines, and also to
          some extent for nontransactional engines. It works like this:
        </p><div class="itemizedlist"><ul type="disc"><li><p>
              For transactional storage engines, bad data values
              occurring anywhere in a statement cause the statement to
              abort and roll back.
            </p></li><li><p>
              For nontransactional storage engines, a statement aborts
              if the error occurs in the first row to be inserted or
              updated. (When the error occurs in the first row, the
              statement can be aborted to leave the table unchanged,
              just as for a transactional table.) Errors in rows after
              the first do not abort the statement, because the table
              has already been changed by the first row. Instead, bad
              data values are adjusted and result in warnings rather
              than errors. In other words, with
              <a href="server-administration.html#sqlmode_strict_trans_tables"><code class="literal">STRICT_TRANS_TABLES</code></a>, a
              wrong value causes MySQL to roll back all updates done so
              far, if that can be done without changing the table. But
              once the table has been changed, further errors result in
              adjustments and warnings.
            </p></li></ul></div><p>
          For even stricter checking, enable
          <a href="server-administration.html#sqlmode_strict_all_tables"><code class="literal">STRICT_ALL_TABLES</code></a>. This is
          the same as
          <a href="server-administration.html#sqlmode_strict_trans_tables"><code class="literal">STRICT_TRANS_TABLES</code></a> except
          that for nontransactional storage engines, errors abort the
          statement even for bad data in rows following the first row.
          This means that if an error occurs partway through a
          multiple-row insert or update for a nontransactional table, a
          partial update results. Earlier rows are inserted or updated,
          but those from the point of the error on are not. To avoid
          this for nontransactional tables, either use single-row
          statements or else use
          <a href="server-administration.html#sqlmode_strict_trans_tables"><code class="literal">STRICT_TRANS_TABLES</code></a> if
          conversion warnings rather than errors are acceptable. To
          avoid problems in the first place, do not use MySQL to check
          column content. It is safest (and often faster) to let the
          application ensure that it passes only legal values to the
          database.
        </p><p>
          With either of the strict mode options, you can cause errors
          to be treated as warnings by using
          <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT
          IGNORE</code></a> or <code class="literal">UPDATE IGNORE</code> rather
          than <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT</code></a> or
          <a href="sql-syntax.html#update" title="12.2.11. UPDATE Syntax"><code class="literal">UPDATE</code></a> without
          <code class="literal">IGNORE</code>.
        </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="constraint-enum"></a>1.7.6.3. <code class="literal">ENUM</code> and
          <code class="literal">SET</code> Constraints</h4></div></div></div><p>
          <a href="data-types.html#enum" title="10.4.4. The ENUM Type"><code class="literal">ENUM</code></a> and
          <a href="data-types.html#set" title="10.4.5. The SET Type"><code class="literal">SET</code></a> columns provide an
          efficient way to define columns that can contain only a given
          set of values. See <a href="data-types.html#enum" title="10.4.4. The ENUM Type">Section 10.4.4, “The <code class="literal">ENUM</code> Type”</a>, and
          <a href="data-types.html#set" title="10.4.5. The SET Type">Section 10.4.5, “The <code class="literal">SET</code> Type”</a>. However, before MySQL 5.0.2,
          <a href="data-types.html#enum" title="10.4.4. The ENUM Type"><code class="literal">ENUM</code></a> and
          <a href="data-types.html#set" title="10.4.5. The SET Type"><code class="literal">SET</code></a> columns do not provide true
          constraints on entry of invalid data:
        </p><div class="itemizedlist"><ul type="disc"><li><p>
              <a href="data-types.html#enum" title="10.4.4. The ENUM Type"><code class="literal">ENUM</code></a> columns always have a
              default value. If you specify no default value, then it is
              <code class="literal">NULL</code> for columns that can have
              <code class="literal">NULL</code>, otherwise it is the first
              enumeration value in the column definition.
            </p></li><li><p>
              If you insert an incorrect value into an
              <a href="data-types.html#enum" title="10.4.4. The ENUM Type"><code class="literal">ENUM</code></a> column or if you force
              a value into an <a href="data-types.html#enum" title="10.4.4. The ENUM Type"><code class="literal">ENUM</code></a> column
              with <code class="literal">IGNORE</code>, it is set to the reserved
              enumeration value of <code class="literal">0</code>, which is
              displayed as an empty string in string context.
            </p></li><li><p>
              If you insert an incorrect value into a
              <a href="data-types.html#set" title="10.4.5. The SET Type"><code class="literal">SET</code></a> column, the incorrect
              value is ignored. For example, if the column can contain
              the values <code class="literal">'a'</code>, <code class="literal">'b'</code>,
              and <code class="literal">'c'</code>, an attempt to assign
              <code class="literal">'a,x,b,y'</code> results in a value of
              <code class="literal">'a,b'</code>.
            </p></li></ul></div><p>
          As of MySQL 5.0.2, you can configure the server to use strict
          SQL mode. See <a href="server-administration.html#server-sql-mode" title="5.1.8. Server SQL Modes">Section 5.1.8, “Server SQL Modes”</a>. With strict
          mode enabled, the definition of a
          <a href="data-types.html#enum" title="10.4.4. The ENUM Type"><code class="literal">ENUM</code></a> or
          <a href="data-types.html#set" title="10.4.5. The SET Type"><code class="literal">SET</code></a> column does act as a
          constraint on values entered into the column. An error occurs
          for values that do not satisfy these conditions:
        </p><div class="itemizedlist"><ul type="disc"><li><p>
              An <a href="data-types.html#enum" title="10.4.4. The ENUM Type"><code class="literal">ENUM</code></a> value must be one
              of those listed in the column definition, or the internal
              numeric equivalent thereof. The value cannot be the error
              value (that is, 0 or the empty string). For a column
              defined as
              <a href="data-types.html#enum" title="10.4.4. The ENUM Type"><code class="literal">ENUM('a','b','c')</code></a>, values
              such as <code class="literal">''</code>, <code class="literal">'d'</code>, or
              <code class="literal">'ax'</code> are illegal and are rejected.
            </p></li><li><p>
              A <a href="data-types.html#set" title="10.4.5. The SET Type"><code class="literal">SET</code></a> value must be the
              empty string or a value consisting only of the values
              listed in the column definition separated by commas. For a
              column defined as
              <a href="data-types.html#set" title="10.4.5. The SET Type"><code class="literal">SET('a','b','c')</code></a>, values
              such as <code class="literal">'d'</code> or
              <code class="literal">'a,b,c,d'</code> are illegal and are rejected.
            </p></li></ul></div><p>
          Errors for invalid values can be suppressed in strict mode if
          you use <a href="sql-syntax.html#insert" title="12.2.5. INSERT Syntax"><code class="literal">INSERT
          IGNORE</code></a> or <code class="literal">UPDATE IGNORE</code>. In this
          case, a warning is generated rather than an error. For
          <a href="data-types.html#enum" title="10.4.4. The ENUM Type"><code class="literal">ENUM</code></a>, the value is inserted as
          the error member (<code class="literal">0</code>). For
          <a href="data-types.html#set" title="10.4.5. The SET Type"><code class="literal">SET</code></a>, the value is inserted as
          given except that any invalid substrings are deleted. For
          example, <code class="literal">'a,x,b,y'</code> results in a value of
          <code class="literal">'a,b'</code>.
        </p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="credits"></a>1.8. Credits</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="introduction.html#contributors">1.8.1. Contributors to MySQL</a></span></dt><dt><span class="section"><a href="introduction.html#documenters-translators">1.8.2. Documenters and translators</a></span></dt><dt><span class="section"><a href="introduction.html#packages">1.8.3. Packages that support MySQL</a></span></dt><dt><span class="section"><a href="introduction.html#tools-used-to-create-mysql">1.8.4. Tools that were used to create MySQL</a></span></dt><dt><span class="section"><a href="introduction.html#supporters">1.8.5. Supporters of MySQL</a></span></dt></dl></div><p>
    The following sections list developers, contributors, and supporters
    that have helped to make MySQL what it is today.
  </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="contributors"></a>1.8.1. Contributors to MySQL</h3></div></div></div><a class="indexterm" name="id3993045"></a><p>
      Although Sun Microsystems, Inc. owns all copyrights in the
      <code class="literal">MySQL server</code> and the <code class="literal">MySQL
      manual</code>, we wish to recognize those who have made
      contributions of one kind or another to the <code class="literal">MySQL
      distribution</code>. Contributors are listed here, in somewhat
      random order:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          Gianmassimo Vigazzola <code class="email">&lt;<a href="mailto:qwerg@mbox.vol.it">qwerg@mbox.vol.it</a>&gt;</code> or
          <code class="email">&lt;<a href="mailto:qwerg@tin.it">qwerg@tin.it</a>&gt;</code>
        </p><p>
          The initial port to Win32/NT.
        </p></li><li><p>
          Per Eric Olsson
        </p><p>
          For constructive criticism and real testing of the dynamic
          record format.
        </p></li><li><p>
          Irena Pancirov <code class="email">&lt;<a href="mailto:irena@mail.yacc.it">irena@mail.yacc.it</a>&gt;</code>
        </p><p>
          Win32 port with Borland compiler.
          <code class="literal">mysqlshutdown.exe</code> and
          <code class="literal">mysqlwatch.exe</code>.
        </p></li><li><p>
          David J. Hughes
        </p><p>
          For the effort to make a shareware SQL database. At TcX, the
          predecessor of MySQL AB, we started with
          <code class="literal">mSQL</code>, but found that it couldn't satisfy
          our purposes so instead we wrote an SQL interface to our
          application builder Unireg. <a href="programs.html#mysqladmin" title="4.5.2. mysqladmin — Client for Administering a MySQL Server"><span><strong class="command">mysqladmin</strong></span></a> and
          <a href="programs.html#mysql" title="4.5.1. mysql — The MySQL Command-Line Tool"><span><strong class="command">mysql</strong></span></a> client are programs that were largely
          influenced by their <code class="literal">mSQL</code> counterparts. We
          have put a lot of effort into making the MySQL syntax a
          superset of <code class="literal">mSQL</code>. Many of the API's ideas
          are borrowed from <code class="literal">mSQL</code> to make it easy to
          port free <code class="literal">mSQL</code> programs to the MySQL API.
          The MySQL software doesn't contain any code from
          <code class="literal">mSQL</code>. Two files in the distribution
          (<code class="filename">client/insert_test.c</code> and
          <code class="filename">client/select_test.c</code>) are based on the
          corresponding (noncopyrighted) files in the
          <code class="literal">mSQL</code> distribution, but are modified as
          examples showing the changes necessary to convert code from
          <code class="literal">mSQL</code> to MySQL Server.
          (<code class="literal">mSQL</code> is copyrighted David J. Hughes.)
        </p></li><li><p>
          Patrick Lynch
        </p><p>
          For helping us acquire <a href="http://www.mysql.com/" target="_top">http://www.mysql.com/</a>.
        </p></li><li><p>
          Fred Lindberg
        </p><p>
          For setting up qmail to handle the MySQL mailing list and for
          the incredible help we got in managing the MySQL mailing
          lists.
        </p></li><li><p>
          Igor Romanenko <code class="email">&lt;<a href="mailto:igor@frog.kiev.ua">igor@frog.kiev.ua</a>&gt;</code>
        </p><p>
          <a href="programs.html#mysqldump" title="4.5.4. mysqldump — A Database Backup Program"><span><strong class="command">mysqldump</strong></span></a> (previously
          <code class="literal">msqldump</code>, but ported and enhanced by
          Monty).
        </p></li><li><p>
          Yuri Dario
        </p><p>
          For keeping up and extending the MySQL OS/2 port.
        </p></li><li><p>
          Tim Bunce
        </p><p>
          Author of <a href="programs.html#mysqlhotcopy" title="4.6.9. mysqlhotcopy — A Database Backup Program"><span><strong class="command">mysqlhotcopy</strong></span></a>.
        </p></li><li><p>
          Zarko Mocnik <code class="email">&lt;<a href="mailto:zarko.mocnik@dem.si">zarko.mocnik@dem.si</a>&gt;</code>
        </p><p>
          Sorting for Slovenian language.
        </p></li><li><p>
          "TAMITO" <code class="email">&lt;<a href="mailto:tommy@valley.ne.jp">tommy@valley.ne.jp</a>&gt;</code>
        </p><p>
          The <code class="literal">_MB</code> character set macros and the ujis
          and sjis character sets.
        </p></li><li><p>
          Joshua Chamas <code class="email">&lt;<a href="mailto:joshua@chamas.com">joshua@chamas.com</a>&gt;</code>
        </p><p>
          Base for concurrent insert, extended date syntax, debugging on
          NT, and answering on the MySQL mailing list.
        </p></li><li><p>
          Yves Carlier <code class="email">&lt;<a href="mailto:Yves.Carlier@rug.ac.be">Yves.Carlier@rug.ac.be</a>&gt;</code>
        </p><p>
          <a href="programs.html#mysqlaccess" title="4.6.6. mysqlaccess — Client for Checking Access Privileges"><span><strong class="command">mysqlaccess</strong></span></a>, a program to show the access
          rights for a user.
        </p></li><li><p>
          Rhys Jones <code class="email">&lt;<a href="mailto:rhys@wales.com">rhys@wales.com</a>&gt;</code> (And GWE Technologies
          Limited)
        </p><p>
          For one of the early JDBC drivers.
        </p></li><li><p>
          Dr Xiaokun Kelvin ZHU <code class="email">&lt;<a href="mailto:X.Zhu@brad.ac.uk">X.Zhu@brad.ac.uk</a>&gt;</code>
        </p><p>
          Further development of one of the early JDBC drivers and other
          MySQL-related Java tools.
        </p></li><li><p>
          James Cooper <code class="email">&lt;<a href="mailto:pixel@organic.com">pixel@organic.com</a>&gt;</code>
        </p><p>
          For setting up a searchable mailing list archive at his site.
        </p></li><li><p>
          Rick Mehalick <code class="email">&lt;<a href="mailto:Rick_Mehalick@i-o.com">Rick_Mehalick@i-o.com</a>&gt;</code>
        </p><p>
          For <code class="literal">xmysql</code>, a graphical X client for MySQL
          Server.
        </p></li><li><p>
          Doug Sisk <code class="email">&lt;<a href="mailto:sisk@wix.com">sisk@wix.com</a>&gt;</code>
        </p><p>
          For providing RPM packages of MySQL for Red Hat Linux.
        </p></li><li><p>
          Diemand Alexander V. <code class="email">&lt;<a href="mailto:axeld@vial.ethz.ch">axeld@vial.ethz.ch</a>&gt;</code>
        </p><p>
          For providing RPM packages of MySQL for Red Hat Linux-Alpha.
        </p></li><li><p>
          Antoni Pamies Olive <code class="email">&lt;<a href="mailto:toni@readysoft.es">toni@readysoft.es</a>&gt;</code>
        </p><p>
          For providing RPM versions of a lot of MySQL clients for Intel
          and SPARC.
        </p></li><li><p>
          Jay Bloodworth <code class="email">&lt;<a href="mailto:jay@pathways.sde.state.sc.us">jay@pathways.sde.state.sc.us</a>&gt;</code>
        </p><p>
          For providing RPM versions for MySQL 3.21.
        </p></li><li><p>
          David Sacerdote <code class="email">&lt;<a href="mailto:davids@secnet.com">davids@secnet.com</a>&gt;</code>
        </p><p>
          Ideas for secure checking of DNS host names.
        </p></li><li><p>
          Wei-Jou Chen <code class="email">&lt;<a href="mailto:jou@nematic.ieo.nctu.edu.tw">jou@nematic.ieo.nctu.edu.tw</a>&gt;</code>
        </p><p>
          Some support for Chinese(BIG5) characters.
        </p></li><li><p>
          Wei He <code class="email">&lt;<a href="mailto:hewei@mail.ied.ac.cn">hewei@mail.ied.ac.cn</a>&gt;</code>
        </p><p>
          A lot of functionality for the Chinese(GBK) character set.
        </p></li><li><p>
          Jan Pazdziora <code class="email">&lt;<a href="mailto:adelton@fi.muni.cz">adelton@fi.muni.cz</a>&gt;</code>
        </p><p>
          Czech sorting order.
        </p></li><li><p>
          Zeev Suraski <code class="email">&lt;<a href="mailto:bourbon@netvision.net.il">bourbon@netvision.net.il</a>&gt;</code>
        </p><p>
          <a href="functions.html#function_from-unixtime"><code class="literal">FROM_UNIXTIME()</code></a> time
          formatting, <a href="functions.html#function_encrypt"><code class="literal">ENCRYPT()</code></a>
          functions, and <span><strong class="command">bison</strong></span> advisor. Active
          mailing list member.
        </p></li><li><p>
          Luuk de Boer <code class="email">&lt;<a href="mailto:luuk@wxs.nl">luuk@wxs.nl</a>&gt;</code>
        </p><p>
          Ported (and extended) the benchmark suite to
          <code class="literal">DBI</code>/<code class="literal">DBD</code>. Have been of
          great help with <code class="literal">crash-me</code> and running
          benchmarks. Some new date functions. The
          <a href="programs.html#mysql-setpermission" title="4.6.14. mysql_setpermission — Interactively Set Permissions in Grant
Tables"><span><strong class="command">mysql_setpermission</strong></span></a> script.
        </p></li><li><p>
          Alexis Mikhailov <code class="email">&lt;<a href="mailto:root@medinf.chuvashia.su">root@medinf.chuvashia.su</a>&gt;</code>
        </p><p>
          User-defined functions (UDFs); <a href="sql-syntax.html#create-function" title="12.1.12. CREATE FUNCTION Syntax"><code class="literal">CREATE
          FUNCTION</code></a> and <a href="sql-syntax.html#drop-function" title="12.1.23. DROP FUNCTION Syntax"><code class="literal">DROP
          FUNCTION</code></a>.
        </p></li><li><p>
          Andreas F. Bobak <code class="email">&lt;<a href="mailto:bobak@relog.ch">bobak@relog.ch</a>&gt;</code>
        </p><p>
          The <code class="literal">AGGREGATE</code> extension to user-defined
          functions.
        </p></li><li><p>
          Ross Wakelin <code class="email">&lt;<a href="mailto:R.Wakelin@march.co.uk">R.Wakelin@march.co.uk</a>&gt;</code>
        </p><p>
          Help to set up InstallShield for MySQL-Win32.
        </p></li><li><p>
          Jethro Wright III <code class="email">&lt;<a href="mailto:jetman@li.net">jetman@li.net</a>&gt;</code>
        </p><p>
          The <code class="filename">libmysql.dll</code> library.
        </p></li><li><p>
          James Pereria <code class="email">&lt;<a href="mailto:jpereira@iafrica.com">jpereira@iafrica.com</a>&gt;</code>
        </p><p>
          Mysqlmanager, a Win32 GUI tool for administering MySQL
          Servers.
        </p></li><li><p>
          Curt Sampson <code class="email">&lt;<a href="mailto:cjs@portal.ca">cjs@portal.ca</a>&gt;</code>
        </p><p>
          Porting of MIT-pthreads to NetBSD/Alpha and NetBSD 1.3/i386.
        </p></li><li><p>
          Martin Ramsch <code class="email">&lt;<a href="mailto:m.ramsch@computer.org">m.ramsch@computer.org</a>&gt;</code>
        </p><p>
          Examples in the MySQL Tutorial.
        </p></li><li><p>
          Steve Harvey
        </p><p>
          For making <a href="programs.html#mysqlaccess" title="4.6.6. mysqlaccess — Client for Checking Access Privileges"><span><strong class="command">mysqlaccess</strong></span></a> more secure.
        </p></li><li><p>
          Konark IA-64 Centre of Persistent Systems Private Limited
        </p><p>
          <a href="http://www.pspl.co.in/konark/" target="_top">http://www.pspl.co.in/konark/</a>. Help with the
          Win64 port of the MySQL server.
        </p></li><li><p>
          Albert Chin-A-Young.
        </p><p>
          Configure updates for Tru64, large file support and better TCP
          wrappers support.
        </p></li><li><p>
          John Birrell
        </p><p>
          Emulation of <code class="function">pthread_mutex()</code> for OS/2.
        </p></li><li><p>
          Benjamin Pflugmann
        </p><p>
          Extended <code class="literal">MERGE</code> tables to handle
          <code class="literal">INSERTS</code>. Active member on the MySQL mailing
          lists.
        </p></li><li><p>
          Jocelyn Fournier
        </p><p>
          Excellent spotting and reporting innumerable bugs (especially
          in the MySQL 4.1 subquery code).
        </p></li><li><p>
          Marc Liyanage
        </p><p>
          Maintaining the Mac OS X packages and providing invaluable
          feedback on how to create Mac OS X packages.
        </p></li><li><p>
          Robert Rutherford
        </p><p>
          Providing invaluable information and feedback about the QNX
          port.
        </p></li><li><p>
          Previous developers of NDB Cluster
        </p><p>
          Lots of people were involved in various ways summer students,
          master thesis students, employees. In total more than 100
          people so too many to mention here. Notable name is Ataullah
          Dabaghi who up until 1999 contributed around a third of the
          code base. A special thanks also to developers of the AXE
          system which provided much of the architectural foundations
          for NDB Cluster with blocks, signals and crash tracing
          functionality. Also credit should be given to those who
          believed in the ideas enough to allocate of their budgets for
          its development from 1992 to present time.
        </p></li><li><p>
          Google Inc.
        </p><p>
          We wish to recognize Google Inc. for contributions to the
          MySQL distribution: Mark Callaghan's SMP Performance patches
          and other patches.
        </p></li></ul></div><p>
      Other contributors, bugfinders, and testers: James H. Thompson,
      Maurizio Menghini, Wojciech Tryc, Luca Berra, Zarko Mocnik, Wim
      Bonis, Elmar Haneke, <code class="email">&lt;<a href="mailto:jehamby@lightside">jehamby@lightside</a>&gt;</code>,
      <code class="email">&lt;<a href="mailto:psmith@BayNetworks.com">psmith@BayNetworks.com</a>&gt;</code>,
      <code class="email">&lt;<a href="mailto:duane@connect.com.au">duane@connect.com.au</a>&gt;</code>, Ted Deppner
      <code class="email">&lt;<a href="mailto:ted@psyber.com">ted@psyber.com</a>&gt;</code>, Mike Simons, Jaakko Hyvatti.
    </p><p>
      And lots of bug report/patches from the folks on the mailing list.
    </p><p>
      A big tribute goes to those that help us answer questions on the
      MySQL mailing lists:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          Daniel Koch <code class="email">&lt;<a href="mailto:dkoch@amcity.com">dkoch@amcity.com</a>&gt;</code>
        </p><p>
          Irix setup.
        </p></li><li><p>
          Luuk de Boer <code class="email">&lt;<a href="mailto:luuk@wxs.nl">luuk@wxs.nl</a>&gt;</code>
        </p><p>
          Benchmark questions.
        </p></li><li><p>
          Tim Sailer <code class="email">&lt;<a href="mailto:tps@users.buoy.com">tps@users.buoy.com</a>&gt;</code>
        </p><p>
          <code class="literal">DBD::mysql</code> questions.
        </p></li><li><p>
          Boyd Lynn Gerber <code class="email">&lt;<a href="mailto:gerberb@zenez.com">gerberb@zenez.com</a>&gt;</code>
        </p><p>
          SCO-related questions.
        </p></li><li><p>
          Richard Mehalick <code class="email">&lt;<a href="mailto:RM186061@shellus.com">RM186061@shellus.com</a>&gt;</code>
        </p><p>
          <code class="literal">xmysql</code>-related questions and basic
          installation questions.
        </p></li><li><p>
          Zeev Suraski <code class="email">&lt;<a href="mailto:bourbon@netvision.net.il">bourbon@netvision.net.il</a>&gt;</code>
        </p><p>
          Apache module configuration questions (log &amp; auth),
          PHP-related questions, SQL syntax-related questions and other
          general questions.
        </p></li><li><p>
          Francesc Guasch <code class="email">&lt;<a href="mailto:frankie@citel.upc.es">frankie@citel.upc.es</a>&gt;</code>
        </p><p>
          General questions.
        </p></li><li><p>
          Jonathan J Smith <code class="email">&lt;<a href="mailto:jsmith@wtp.net">jsmith@wtp.net</a>&gt;</code>
        </p><p>
          Questions pertaining to OS-specifics with Linux, SQL syntax,
          and other things that might need some work.
        </p></li><li><p>
          David Sklar <code class="email">&lt;<a href="mailto:sklar@student.net">sklar@student.net</a>&gt;</code>
        </p><p>
          Using MySQL from PHP and Perl.
        </p></li><li><p>
          Alistair MacDonald <code class="email">&lt;<a href="mailto:A.MacDonald@uel.ac.uk">A.MacDonald@uel.ac.uk</a>&gt;</code>
        </p><p>
          Is flexible and can handle Linux and perhaps HP-UX. Tries to
          get users to use <a href="programs.html#mysqlbug" title="4.4.3. mysqlbug — Generate Bug Report"><span><strong class="command">mysqlbug</strong></span></a>.
        </p></li><li><p>
          John Lyon <code class="email">&lt;<a href="mailto:jlyon@imag.net">jlyon@imag.net</a>&gt;</code>
        </p><p>
          Questions about installing MySQL on Linux systems, using
          either <code class="filename">.rpm</code> files or compiling from
          source.
        </p></li><li><p>
          Lorvid Ltd. <code class="email">&lt;<a href="mailto:lorvid@WOLFENET.com">lorvid@WOLFENET.com</a>&gt;</code>
        </p><p>
          Simple billing/license/support/copyright issues.
        </p></li><li><p>
          Patrick Sherrill <code class="email">&lt;<a href="mailto:patrick@coconet.com">patrick@coconet.com</a>&gt;</code>
        </p><p>
          ODBC and VisualC++ interface questions.
        </p></li><li><p>
          Randy Harmon <code class="email">&lt;<a href="mailto:rjharmon@uptimecomputers.com">rjharmon@uptimecomputers.com</a>&gt;</code>
        </p><p>
          <code class="literal">DBD</code>, Linux, some SQL syntax questions.
        </p></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="documenters-translators"></a>1.8.2. Documenters and translators</h3></div></div></div><a class="indexterm" name="id3994182"></a><a class="indexterm" name="id3994195"></a><p>
      The following people have helped us with writing the MySQL
      documentation and translating the documentation or error messages
      in MySQL.
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          Paul DuBois
        </p><p>
          Ongoing help with making this manual correct and
          understandable. That includes rewriting Monty's and David's
          attempts at English into English as other people know it.
        </p></li><li><p>
          Kim Aldale
        </p><p>
          Helped to rewrite Monty's and David's early attempts at
          English into English.
        </p></li><li><p>
          Michael J. Miller Jr.
          <code class="email">&lt;<a href="mailto:mke@terrapin.turbolift.com">mke@terrapin.turbolift.com</a>&gt;</code>
        </p><p>
          For the first MySQL manual. And a lot of spelling/language
          fixes for the FAQ (that turned into the MySQL manual a long
          time ago).
        </p></li><li><p>
          Yan Cailin
        </p><p>
          First translator of the MySQL Reference Manual into simplified
          Chinese in early 2000 on which the Big5 and HK coded
          (<a href="http://mysql.hitstar.com/" target="_top">http://mysql.hitstar.com/</a>) versions were
          based. <a href="http://linuxdb.yeah.net" target="_top">Personal home page
          at linuxdb.yeah.net</a>.
        </p></li><li><p>
          Jay Flaherty <code class="email">&lt;<a href="mailto:fty@mediapulse.com">fty@mediapulse.com</a>&gt;</code>
        </p><p>
          Big parts of the Perl
          <code class="literal">DBI</code>/<code class="literal">DBD</code> section in the
          manual.
        </p></li><li><p>
          Paul Southworth <code class="email">&lt;<a href="mailto:pauls@etext.org">pauls@etext.org</a>&gt;</code>, Ray Loyzaga
          <code class="email">&lt;<a href="mailto:yar@cs.su.oz.au">yar@cs.su.oz.au</a>&gt;</code>
        </p><p>
          Proof-reading of the Reference Manual.
        </p></li><li><p>
          Therrien Gilbert <code class="email">&lt;<a href="mailto:gilbert@ican.net">gilbert@ican.net</a>&gt;</code>, Jean-Marc
          Pouyot <code class="email">&lt;<a href="mailto:jmp@scalaire.fr">jmp@scalaire.fr</a>&gt;</code>
        </p><p>
          French error messages.
        </p></li><li><p>
          Petr Snajdr, <code class="email">&lt;<a href="mailto:snajdr@pvt.net">snajdr@pvt.net</a>&gt;</code>
        </p><p>
          Czech error messages.
        </p></li><li><p>
          Jaroslaw Lewandowski <code class="email">&lt;<a href="mailto:jotel@itnet.com.pl">jotel@itnet.com.pl</a>&gt;</code>
        </p><p>
          Polish error messages.
        </p></li><li><p>
          Miguel Angel Fernandez Roiz
        </p><p>
          Spanish error messages.
        </p></li><li><p>
          Roy-Magne Mo <code class="email">&lt;<a href="mailto:rmo@www.hivolda.no">rmo@www.hivolda.no</a>&gt;</code>
        </p><p>
          Norwegian error messages and testing of MySQL 3.21.xx.
        </p></li><li><p>
          Timur I. Bakeyev <code class="email">&lt;<a href="mailto:root@timur.tatarstan.ru">root@timur.tatarstan.ru</a>&gt;</code>
        </p><p>
          Russian error messages.
        </p></li><li><p>
          <code class="email">&lt;<a href="mailto:brenno@dewinter.com">brenno@dewinter.com</a>&gt;</code> &amp; Filippo Grassilli
          <code class="email">&lt;<a href="mailto:phil@hyppo.com">phil@hyppo.com</a>&gt;</code>
        </p><p>
          Italian error messages.
        </p></li><li><p>
          Dirk Munzinger <code class="email">&lt;<a href="mailto:dirk@trinity.saar.de">dirk@trinity.saar.de</a>&gt;</code>
        </p><p>
          German error messages.
        </p></li><li><p>
          Billik Stefan <code class="email">&lt;<a href="mailto:billik@sun.uniag.sk">billik@sun.uniag.sk</a>&gt;</code>
        </p><p>
          Slovak error messages.
        </p></li><li><p>
          Stefan Saroiu <code class="email">&lt;<a href="mailto:tzoompy@cs.washington.edu">tzoompy@cs.washington.edu</a>&gt;</code>
        </p><p>
          Romanian error messages.
        </p></li><li><p>
          Peter Feher
        </p><p>
          Hungarian error messages.
        </p></li><li><p>
          Roberto M. Serqueira
        </p><p>
          Portuguese error messages.
        </p></li><li><p>
          Carsten H. Pedersen
        </p><p>
          Danish error messages.
        </p></li><li><p>
          Arjen Lentz
        </p><p>
          Dutch error messages, completing earlier partial translation
          (also work on consistency and spelling).
        </p></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="packages"></a>1.8.3. Packages that support MySQL</h3></div></div></div><a class="indexterm" name="id3994516"></a><a class="indexterm" name="id3994528"></a><p>
      The following is a list of creators/maintainers of some of the
      most important API/packages/applications that a lot of people use
      with MySQL.
    </p><p>
      We cannot list every possible package here because the list would
      then be way to hard to maintain. For other packages, please refer
      to the software portal at
      <a href="http://solutions.mysql.com/software/" target="_top">http://solutions.mysql.com/software/</a>.
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          Tim Bunce, Alligator Descartes
        </p><p>
          For the <code class="literal">DBD</code> (Perl) interface.
        </p></li><li><p>
          Andreas Koenig <code class="email">&lt;<a href="mailto:a.koenig@mind.de">a.koenig@mind.de</a>&gt;</code>
        </p><p>
          For the Perl interface for MySQL Server.
        </p></li><li><p>
          Jochen Wiedmann <code class="email">&lt;<a href="mailto:wiedmann@neckar-alb.de">wiedmann@neckar-alb.de</a>&gt;</code>
        </p><p>
          For maintaining the Perl <code class="literal">DBD::mysql</code> module.
        </p></li><li><p>
          Eugene Chan <code class="email">&lt;<a href="mailto:eugene@acenet.com.sg">eugene@acenet.com.sg</a>&gt;</code>
        </p><p>
          For porting PHP for MySQL Server.
        </p></li><li><p>
          Georg Richter
        </p><p>
          MySQL 4.1 testing and bug hunting. New PHP 5.0
          <code class="literal">mysqli</code> extension (API) for use with MySQL
          4.1 and up.
        </p></li><li><p>
          Giovanni Maruzzelli <code class="email">&lt;<a href="mailto:maruzz@matrice.it">maruzz@matrice.it</a>&gt;</code>
        </p><p>
          For porting iODBC (Unix ODBC).
        </p></li><li><p>
          Xavier Leroy <code class="email">&lt;<a href="mailto:Xavier.Leroy@inria.fr">Xavier.Leroy@inria.fr</a>&gt;</code>
        </p><p>
          The author of LinuxThreads (used by the MySQL Server on
          Linux).
        </p></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="tools-used-to-create-mysql"></a>1.8.4. Tools that were used to create MySQL</h3></div></div></div><a class="indexterm" name="id3994677"></a><p>
      The following is a list of some of the tools we have used to
      create MySQL. We use this to express our thanks to those that has
      created them as without these we could not have made MySQL what it
      is today.
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          Free Software Foundation
        </p><p>
          From whom we got an excellent compiler
          (<span><strong class="command">gcc</strong></span>), an excellent debugger
          (<span><strong class="command">gdb</strong></span> and the <code class="literal">libc</code>
          library (from which we have borrowed
          <code class="filename">strto.c</code> to get some code working in
          Linux).
        </p></li><li><p>
          Free Software Foundation &amp; The XEmacs development team
        </p><p>
          For a really great editor/environment.
        </p></li><li><p>
          Julian Seward
        </p><p>
          Author of <code class="literal">valgrind</code>, an excellent memory
          checker tool that has helped us find a lot of otherwise hard
          to find bugs in MySQL.
        </p></li><li><p>
          Dorothea Lütkehaus and Andreas Zeller
        </p><p>
          For <code class="literal">DDD</code> (The Data Display Debugger) which
          is an excellent graphical front end to
          <span><strong class="command">gdb</strong></span>).
        </p></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="supporters"></a>1.8.5. Supporters of MySQL</h3></div></div></div><a class="indexterm" name="id3994794"></a><p>
      Although Sun Microsystems, Inc. owns all copyrights in the
      <code class="literal">MySQL server</code> and the <code class="literal">MySQL
      manual</code>, we wish to recognize the following companies,
      which helped us finance the development of the <code class="literal">MySQL
      server</code>, such as by paying us for developing a new
      feature or giving us hardware for development of the
      <code class="literal">MySQL server</code>.
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          VA Linux / Andover.net
        </p><p>
          Funded replication.
        </p></li><li><p>
          NuSphere
        </p><p>
          Editing of the MySQL manual.
        </p></li><li><p>
          Stork Design studio
        </p><p>
          The MySQL Web site in use between 1998-2000.
        </p></li><li><p>
          Intel
        </p><p>
          Contributed to development on Windows and Linux platforms.
        </p></li><li><p>
          Compaq
        </p><p>
          Contributed to Development on Linux/Alpha.
        </p></li><li><p>
          SWSoft
        </p><p>
          Development on the embedded <a href="programs.html#mysqld" title="4.3.1. mysqld — The MySQL Server"><span><strong class="command">mysqld</strong></span></a> version.
        </p></li><li><p>
          FutureQuest
        </p><p>
          The <a href="server-administration.html#option_mysqld_skip-show-database"><code class="option">--skip-show-database</code></a>
          option.
        </p></li></ul></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="preface.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="installing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Preface, Notes, Licenses </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 2. Installing and Upgrading MySQL</td></tr></table></div></body></html>