DocTaur - intranet directory of reference manuals
Yo-store
books for webmasters

reference manuals search engine

MySQL Reference Manual - 4.0.20

[ < ] [ > ]   [ << ] [ 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 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 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 on July, 26 2004 using texi2html 1.70.