Re: [Sqlrelay-discussion] SQLRelay, Python and getNullsAsNone problem
Brought to you by:
mused
From: David M. <dav...@fi...> - 2005-06-22 03:11:57
|
I'll look into this, looks like there's a bug. It shouldn't be too hard to track down. I have a hunch where it is and what to do to fix it. I've got to make a 0.36.4 maintenance release soon, I should be able to fix this in it too. Dave dav...@fi... On Tue, 2005-06-21 at 10:50 +0200, Maciej Wisniowski wrote: > Hi > > I've already described my problem in previous post but there were no > answer, so I'll try again, > more precisely. > > I have simple script: > > from SQLRelay import PySQLRClient > from SQLRelay import PySQLRDB > > con=PySQLRClient.sqlrconnection('localhost',9000,'','test','test',0,1) > cur=PySQLRClient.sqlrcursor(con) > cur.getNullsAsNone() > > for a in range(100): > res = cur.sendQuery('select * from CKK_KLIENCI') > print 'cursor:', cur.rowCount() > print 'run_no:', a > for row in range(cur.rowCount()): > print 'row:', row > for col in range(cur.colCount()): > cur.getField(row,col) > con.endSession() > print 'end' > > > The result is: > > cursor: 329 > run_no: 0 > row: 0 > row: 1 > row: 2 > row: 3 > row: 4 > row: 5 > row: 6 > row: 7 > row: 8 > row: 9 > row: 10 > row: 11 > row: 12 > row: 13 > Fatal Python error: deallocating None > > The problem disappears when I remove getNullsAsNone or when I change > select to: > select column1 from CKK_KLIENCI. > So the problem is with getNullsAsNone and with select that returns more > than two > columns (maybe this is not the rule with column count). > > Is this only my problem, or maybe somebody can confirm that this error > appears?? > |