Andrew Godwin committed e00450d Merge

Merged in matthewwithanm/south/fix-deprecated-storage-engine (pull request #145)

Fix "deprecated @@storage_engine" warning (#1227)

Comments (0)

Files changed (1)


         e.g. which storage engine (MySQL) or transaction serialisability level.
         cursor = self._get_connection().cursor()
+        if cursor.execute("SHOW variables WHERE Variable_Name='default_storage_engine';"):
+            engine_var = 'default_storage_engine'
+        else:
+            engine_var = 'storage_engine'
         if self._has_setting('STORAGE_ENGINE') and self._get_setting('STORAGE_ENGINE'):
-            cursor.execute("SET storage_engine=%s;" % self._get_setting('STORAGE_ENGINE'))
+            cursor.execute("SET %s=%s;" % (engine_var, self._get_setting('STORAGE_ENGINE')))
     def start_transaction(self):
         super(DatabaseOperations, self).start_transaction()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.