﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12293	mysql backend raises Warning exceptions for ignorable info notices	Walter Doekes	nobody	"For example, when I use the custom /sql/mymodel.mysql.sql with something like:

DROP VIEW IF EXISTS `myview`;

python-mysqldb raises a Database.Warning to warn us of the info that the table did not exist.

{{{
mysql> drop view if exists myview;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show warnings;
+-------+------+-----------------------------+
| Level | Code | Message                     |
+-------+------+-----------------------------+
| Note  | 1051 | Unknown table 'mydb.myview' | 
+-------+------+-----------------------------+
1 row in set (0.00 sec)
}}}

This Warning gets propagated when DEBUG==True (because it's not filterwarning'd) and then the rest of my custom SQL does not get run.


I propose a check against 'Note' level warnings, ignoring those. See my attached patch.[[BR]]
(I created a third function to avoid more duplicate code. I don't know if this extra call decreases performancy any.)


Regards,[[BR]]
Walter Doekes[[BR]] 
OSSO B.V.  "		closed	Database layer (models, ORM)	dev		wontfix	mysql warnings note		Unreviewed	1	0	0	0	0	0
