Bug #70062 sql_mode option file cannot set to null
| Submitted: | 16 Aug 2013 18:38 | Modified: | 19 Aug 2013 14:47 |
|---|---|---|---|
| Reporter: | Kelvin Mok | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Options | Severity: | S3 (Non-critical) |
| Version: | 5.6.11-log | OS: | Linux (CentOS 5.7) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | option, SQL_MODE | ||
[16 Aug 2013 18:38]
Kelvin Mok
[16 Aug 2013 18:41]
Kelvin Mok
Edit synopsis to proper format.
[17 Aug 2013 7:19]
MySQL Verification Team
Hello Kelvin, Thank you for the report. I can not repeat described behavior with reported and latest GA version. I just suspect that there could be multiple conf files and value is read from wrong file. Please check if this is the case. // 5.6.11 // confirmed sql-mode is set to '' in conf file [root@cluster-repo mysql-5.6.11]# cat my.cnf |grep 'sql-mode' sql-mode='' [root@cluster-repo mysql-5.6.11]# [root@cluster-repo mysql-5.6.11]# bin/mysql -u root -p --port=3306 test Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.6.11 MySQL Community Server (GPL) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show global variables like 'sql_mode'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | sql_mode | | +---------------+-------+ 1 row in set (0.00 sec) mysql> ^^ It is taking up the sql-mode value from conf file // To confirm again, just changed sql-mode value to 'NO_DIR_IN_CREATE' and confirmed it is indeed taking from conf file [root@cluster-repo mysql-5.6.11]# cat my.cnf |grep 'sql-mode' sql-mode='NO_DIR_IN_CREATE' [root@cluster-repo mysql-5.6.11]# [root@cluster-repo mysql-5.6.11]# bin/mysqld_safe --defaults-file=./my.cnf --user=mysql & [1] 14168 [root@cluster-repo mysql-5.6.11]# 130818 10:49:31 mysqld_safe Logging to '/tmp/5611/cluster-repo.err'. 130818 10:49:31 mysqld_safe Starting mysqld daemon with databases from /tmp/5611 [root@cluster-repo mysql-5.6.11]# bin/mysql -u root -p --port=3306 test Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.11 MySQL Community Server (GPL) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show global variables like 'sql_mode'; +---------------+------------------+ | Variable_name | Value | +---------------+------------------+ | sql_mode | NO_DIR_IN_CREATE | +---------------+------------------+ 1 row in set (0.00 sec) mysql> // 5.6.13 // from option file..sql mode set to '' and confirmed it is indeed taking from conf file [root@cluster-repo mysql-5.6.13]# cat my.cnf |grep 'sql-mode' sql-mode='' [root@cluster-repo mysql-5.6.13]# [root@cluster-repo mysql-5.6.13]# bin/mysqld_safe --defaults-file=./my.cnf --user=mysql & [1] 13413 [root@cluster-repo mysql-5.6.13]# 130818 10:40:44 mysqld_safe Logging to '/tmp/69780/cluster-repo.err'. 130818 10:40:44 mysqld_safe Starting mysqld daemon with databases from /tmp/69780 [root@cluster-repo mysql-5.6.13]# bin/mysql -u root -p --port=3306 test Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.13 MySQL Community Server (GPL) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show global variables like 'sql_mode'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | sql_mode | | +---------------+-------+ 1 row in set (0.00 sec) // from option file..just changed sql-mode to 'ALLOW_INVALID_DATES' and confirmed it is indeed taking from conf file [root@cluster-repo mysql-5.6.13]# cat my.cnf |grep 'sql-mode' sql-mode='ALLOW_INVALID_DATES' [root@cluster-repo mysql-5.6.13]# [root@cluster-repo mysql-5.6.13]# bin/mysqld_safe --defaults-file=./my.cnf --user=mysql & [1] 12918 [root@cluster-repo mysql-5.6.13]# 130818 10:39:31 mysqld_safe Logging to '/tmp/69780/cluster-repo.err'. 130818 10:39:31 mysqld_safe Starting mysqld daemon with databases from /tmp/69780 [root@cluster-repo mysql-5.6.13]# bin/mysql -u root -p --port=3306 test Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.13 MySQL Community Server (GPL) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show global variables like 'sql_mode'; +---------------+---------------------+ | Variable_name | Value | +---------------+---------------------+ | sql_mode | ALLOW_INVALID_DATES | +---------------+---------------------+ 1 row in set (0.00 sec) // Works even when passed with mysqld --sql-mode='' [root@cluster-repo mysql-5.6.13]# bin/mysqld_safe --defaults-file=./my.cnf --sql-mode='' --user=mysql & [1] 11909 [root@cluster-repo mysql-5.6.13]# 130818 10:33:47 mysqld_safe Logging to '/tmp/69780/cluster-repo.err'. 130818 10:33:47 mysqld_safe Starting mysqld daemon with databases from /tmp/69780 [root@cluster-repo mysql-5.6.13]# bin/mysql -u root -p --port=3306 test Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.13 MySQL Community Server (GPL) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show global variables like 'sql_mode'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | sql_mode | | +---------------+-------+ 1 row in set (0.00 sec) Thanks, Umesh
[19 Aug 2013 14:47]
Kelvin Mok
Ah! You are right, there is an unwanted my.cnf file elsewhere being read. Thank you for the assistance.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.