Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #316 -- Changed MySQL backend to disregard warnings

git-svn-id: http://code.djangoproject.com/svn/django/trunk@494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a9b43edde24e6bb2caa82864d9b8d865b2fea113 1 parent 54f9389
Adrian Holovaty authored August 14, 2005

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  django/core/db/backends/mysql.py
4  django/core/db/backends/mysql.py
@@ -9,6 +9,7 @@
9 9
 import MySQLdb as Database
10 10
 from MySQLdb.converters import conversions
11 11
 from MySQLdb.constants import FIELD_TYPE
  12
+from MySQLdb.cursors import CursorNW # Ignores MySQL warnings.
12 13
 import types
13 14
 
14 15
 DatabaseError = Database.DatabaseError
@@ -30,7 +31,8 @@ def cursor(self):
30 31
         from django.conf.settings import DATABASE_USER, DATABASE_NAME, DATABASE_HOST, DATABASE_PASSWORD, DEBUG
31 32
         if self.connection is None:
32 33
             self.connection = Database.connect(user=DATABASE_USER, db=DATABASE_NAME,
33  
-                passwd=DATABASE_PASSWORD, host=DATABASE_HOST, conv=django_conversions)
  34
+                passwd=DATABASE_PASSWORD, host=DATABASE_HOST, conv=django_conversions,
  35
+                cursorclass=CursorNW)
34 36
         if DEBUG:
35 37
             return base.CursorDebugWrapper(self.connection.cursor(), self)
36 38
         return self.connection.cursor()

0 notes on commit a9b43ed

Please sign in to comment.
Something went wrong with that request. Please try again.