On Mon, Jul 28, 2008 at 4:17 PM, Gabriel Rossetti <[EMAIL PROTECTED]> wrote: > Hello everyone, > > I turned on the debugging and I'm seeing queries like these : > > INSERT INTO `language` (name) VALUES (%s) (u'ENGLISH',) > SELECT `language`.language_id FROM `language` WHERE > `language`.language_id = 1 () > INSERT INTO `language` (name) VALUES (%s) (u'FRENCH',) > SELECT `language`.language_id FROM `language` WHERE > `language`.language_id = 2 () > > Why is a query made for `language`.language_id if we already have it > (it's used in the WHERE statement)?
This looks like a bug in the mysql backend. The use of cursor.lastrowid could probably be used to fill in the primary variables in MySQLConnection.execute(), similar to what we do in the PostgreSQL backend. Filling them in at that point should be just as reliable as using them to construct the where clause in get_insert_identity(). James. -- storm mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/storm
