Skip to content

Commit 5e44f98

Browse files
MySQL sql_mode change
1 parent 00c75ec commit 5e44f98

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

source/upgrading/upgrade/upgrade_notes.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,18 @@ added in CloudStack's db.properties file:
101101
db.cloud.driver=jdbc:mysql
102102

103103
db.usage.driver=jdbc:mysql
104+
105+
106+
MySQL 8.0 sql mode change
107+
-------------------------
108+
109+
MySQL mode (sql_mode) has changed in CloudStack db.properties to "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION".
110+
This gets automatically applies to the MySQL session used by CloudStack management server.
111+
112+
If the admin uses MySQL directly and wants to query tables it is advised to change the sql_mode in the corresponding session or globally.
113+
114+
Eg. mysql> set global sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION";
115+
Query OK, 0 rows affected (0.00 sec)
116+
117+
mysql> set sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION";
118+
Query OK, 0 rows affected (0.00 sec)

0 commit comments

Comments
 (0)