Bug #1510 --sql-mode=sapdb has non-explicit side-effect
Submitted: 9 Oct 2003 11:24 Modified: 26 Mar 2004 7:57
Reporter: Paul Dubois Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.x OS:Any (Any)
Assigned to: Sergei Glukhov CPU Architecture:Any

[9 Oct 2003 11:24] Paul Dubois
Description:
Setting the server's sql_mode variable to 'sapdb' results in a constellation
of effects:

mysql> set sql_mode='sapdb';
Query OK, 0 rows affected (0.00 sec)

mysql> select @@sql_mode;
+----------------------------------------------------------------------------------
---------------+
| @@sql_mode                                                                                      |
+----------------------------------------------------------------------------------
---------------+
| 
PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,SAPDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO
_FIELD_OPTIONS |
+----------------------------------------------------------------------------------
---------------+
1 row in set (0.00 sec)

Each of those effects can be turned on or off explicitly using the corresponding
option.

However, using 'sapdb' also causes TIMESTAMP to be treated as DATETIME,
but there is no explicit way to turn that behavior on or off by itself, or even
to know whether or not it is in effect.

Presumably there should be a TIMESTAMP_IS_DATETIME option for sql_mode?

How to repeat:
See description.
[26 Mar 2004 7:57] Michael Widenius
Modes that are only relevant for one database doesn't need to have a unique option.  We can consider adding a TIMESTAMP_IS_DATETIME option if we notice that any other databases would need this.