You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ha...@apache.org on 2021/09/03 02:58:03 UTC

[cloudstack-documentation] 01/01: MySQL sql_mode change

This is an automated email from the ASF dual-hosted git repository.

harikrishna pushed a commit to branch mysql_sql_mode
in repository https://gitbox.apache.org/repos/asf/cloudstack-documentation.git

commit 0731ab4549b0f18fe0870c218baf2d31d90deb62
Author: Harikrishna Patnala <ha...@gmail.com>
AuthorDate: Fri Sep 3 08:26:35 2021 +0530

    MySQL sql_mode change
---
 source/upgrading/upgrade/upgrade_notes.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/source/upgrading/upgrade/upgrade_notes.rst b/source/upgrading/upgrade/upgrade_notes.rst
index 55a6288..3e08f7a 100644
--- a/source/upgrading/upgrade/upgrade_notes.rst
+++ b/source/upgrading/upgrade/upgrade_notes.rst
@@ -101,3 +101,18 @@ added in CloudStack's db.properties file:
    db.cloud.driver=jdbc:mysql
 
    db.usage.driver=jdbc:mysql
+
+
+MySQL 8.0 sql mode change
+-------------------------
+
+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".
+This gets automatically applies to the MySQL session used by CloudStack management server.
+
+If admin uses MySQL directly and wants to query tables it is adviced to change the sql_mode in the corresonding session or globally.
+
+Eg. mysql> set global sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION";
+    Query OK, 0 rows affected (0.00 sec)
+
+    mysql> set sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION";
+    Query OK, 0 rows affected (0.00 sec)
\ No newline at end of file