This Howtos posted under: MySQL | Total Visitors Till Now: 90

How to Run MySQL in ANSI Mode

You can tell mysqld to run in ANSI mode with the –ansi startup option. Running the server in ANSI mode is the same as starting it with the following options:

--transaction-isolation=SERIALIZABLE --sql-mode=ANSI

As of MySQL 4.1.1, you can achieve the same effect at runtime by executing these two statements:

SET GLOBAL TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SET GLOBAL sql_mode = 'ANSI';

You can see that setting the sql_mode system variable to ‘ANSI’ enables all SQL mode options that are relevant for ANSI mode as follows:

mysql> SET GLOBAL sql_mode='ANSI';
mysql> SELECT @@global.sql_mode;
-> 'REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI'

Note that running the server in ANSI mode with –ansi is not quite the same as setting the SQL mode to ‘ANSI’. The –ansi option affects the SQL mode and also sets the transaction isolation level. Setting the SQL mode to ‘ANSI’ has no effect on the isolation level.


Editor  Posted by Editor on December 5, 2008 at 7:48 am

Be the first to comment - What do you think?  Tags: , , , , , , ,

Coolsearchinfo - A free Social Bookmarking Site

Liked this article? To continue getting our latest free Howtos and Tutorials,
you can also grab the RSS feed or Subscribe to Techgurulive by Email

Not Getting



Related posts
  • How to solve “MySQL server has gone away” Problem
    Some times you  get the message “MySQL server has gone away” in your application. What are the causes of getting this error. This is a general error which can have...