Comment 1 for bug 713202

Revision history for this message
n1ywb (jeff-laughlin) wrote :

Sorry, I changed the sqlalchemy URLs, not the import statements.

FWIW I turned echo on, here's the log leading up to the second exception:

2011-02-04 11:40:41,437 INFO sqlalchemy.engine.base.Engine.0x...8490 BEGIN (implicit)
2011-02-04 11:40:41,443 INFO sqlalchemy.engine.base.Engine.0x...8490 SELECT event_queue.idx AS event_queue_idx
FROM event_queue ORDER BY event_queue.idx
2011-02-04 11:40:41,444 INFO sqlalchemy.engine.base.Engine.0x...8490 ()
2011-02-04 11:40:41,446 DEBUG sqlalchemy.engine.base.Engine.0x...8490 Col ('event_queue_idx',)
2011-02-04T11:40:41|eventd|ERROR |Exception in RemoteDBThread
Traceback (most recent call last):
  File "c:\users\jlaughlin\documents\smartview-svn\python\branches\python2.6\smartview\eventd\eventlogger.py", line 91,
in run
    queuedevts = dls.query(model.EventQueue).order_by(model.EventQueue.idx).all()
  File "c:\Python26\lib\site-packages\sqlalchemy\orm\query.py", line 1579, in all
    return list(self)
  File "c:\Python26\lib\site-packages\sqlalchemy\orm\query.py", line 1791, in instances
    fetch = cursor.fetchall()
  File "c:\Python26\lib\site-packages\sqlalchemy\engine\base.py", line 2504, in fetchall
    self.cursor, self.context)
  File "c:\Python26\lib\site-packages\sqlalchemy\engine\base.py", line 2498, in fetchall
    l = self.process_rows(self._fetchall_impl())
  File "c:\Python26\lib\site-packages\sqlalchemy\engine\base.py", line 2465, in _fetchall_impl
    return self.cursor.fetchall()
  File "cursor.pyx", line 228, in oursql.Cursor.fetchall (oursqlx\oursql.c:16568)
  File "statement.pyx", line 550, in oursql._Statement.fetchall (oursqlx\oursql.c:11377)
  File "statement.pyx", line 541, in oursql._Statement.fetchone (oursqlx\oursql.c:11281)
InterfaceError: (InterfaceError) (None, 'truncated column 0, type 3', None) None None

This table is trivial:
CREATE TABLE `rtu_prod`.`event_queue` (
  `idx` int(11) NOT NULL,
  PRIMARY KEY (`idx`),
  CONSTRAINT `event_queue_ibfk_1` FOREIGN KEY (`idx`) REFERENCES `events2` (`idx`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

every record appears to be populated with a normal int.