myqsldb warning problem
Joshua Schmidlkofer
menion at asylumwear.com
Thu Aug 8 21:51:00 EDT 2002
You need to derive from a db connection that does not raise() on
errors. Examine the Mysql module, I have used this quite a lot, and
there are any number of reasons why mysql is 'warning'. It could be a
changed field type, or slightly adjusted data, or a index that didn't
fit. For most circumstances this is safe to ignore, just read the
mysqlmodule.py [whatever it's called now], and there is an easy way to
use the no-warning class. [CursorNW I think, can't remember]
js
On Thu, 2002-08-08 at 17:56, Bill Dandreta wrote:
> Here is the warning that I am getting:
>
> _mysql_exceptions.Warning: Records: 3073 Duplicates: 0
> Warnings: 49
>
> Here is the code that generates the warnings:
>
> s='insert into prices \
> (mfr_num,ournum,strp_num,partnum,descr,pkgsize,cb1,\
> rb1,rb2,rb3,rb4,rb5,c1,sugg1,sugg2,sugg3,sugg4,\
> sugg5,rs1,rs2,rs3,rs4,rs5,comm1,comm2,comm3,\
> comm4,comm5) values ' + ','.join(u)+';'
> try:
> cursor.execute(s)
> except header.MySQLdb.Error, e:
> print 'Cannot insert prices, see sysop'
> print "Error %d: %s" % (e.args[0], e.args[1])
> exit (1)
>
> I spot checked the database but could find no errors. If I loop
> through u and enter the records one at a time there are no warnings.
>
> Is there a known issue with large strings used with the execute
> method?
>
> I have a number of these to do and some are more than 10 times larger
> than this one.
>
> Is there a way to find out precisely what is causing the warnings?
>
> Bill
> --
> http://mail.python.org/mailman/listinfo/python-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 240 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-list/attachments/20020808/71f3821f/attachment.sig>
More information about the Python-list
mailing list