MySQL Reference Manual for version 4.0.18.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.8.3 Running MySQL in ANSI Mode

You can tell mysqld to use the ANSI mode with the --ansi startup option. See section 5.2.1 mysqld Command-line Options.

Running the server in ANSI mode is the same as starting it with these options:

 
--sql-mode=REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY
--transaction-isolation=SERIALIZABLE

In MySQL 4.1, you can achieve the same effect with these two statements:

 
SET GLOBAL TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SET GLOBAL sql_mode =
  "REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY";

See section 1.8.2 Selecting SQL Modes.

In MySQL 4.1.1, the sql_mode options shown can be also be set with:

 
SET GLOBAL sql_mode="ansi";

In this case, the value of the sql_mode variable will be set to all options that are relevant for ANSI mode. You can check the result by doing:

 
mysql> SET GLOBAL sql_mode="ansi";
mysql> SELECT @@GLOBAL.sql_mode;
        -> "REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,ANSI"



This document was generated by rdg (Feb 25 2004) using texi2html