]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- dont run sql mode config tests if we aren't on mysql
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 19 Aug 2017 22:22:41 +0000 (18:22 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 19 Aug 2017 22:22:41 +0000 (18:22 -0400)
Change-Id: Iec1d992c611e223fda303e6a323dabff79760f01

test/requirements.py

index 520d7c01a802c99d111036c7aa618b7a2e454b72..d69692ffad39876c1f790532fe8be05f5fa7963e 100644 (file)
@@ -870,14 +870,18 @@ class DefaultRequirements(SuiteRequirements):
     @property
     def mysql_zero_date(self):
         def check(config):
-             row = config.db.execute("show variables like 'sql_mode'").first()
-             return not row or "NO_ZERO_DATE" not in row[1]
+            if not against(config, 'mysql'):
+                return False
+            row = config.db.execute("show variables like 'sql_mode'").first()
+            return not row or "NO_ZERO_DATE" not in row[1]
 
         return only_if(check)
 
     @property
     def mysql_non_strict(self):
         def check(config):
+            if not against(config, 'mysql'):
+                return False
              row = config.db.execute("show variables like 'sql_mode'").first()
              return not row or "STRICT" not in row[1]