Although, re-using prepared statements is a use case for executemany() with SELECTs.
-- You received this bug notification because you are a member of Agesys Team, which is subscribed to oursql. https://bugs.launchpad.net/bugs/948063 Title: Executemany throws ProgrammingError Status in oursql: New Bug description: Hi, Python: 2.7 MySQL client: 5.1.41-3ub oursql: 0.9.3 I had posted a question about the same problem last summer: https://answers.launchpad.net/oursql/+question/166877 I updated to the latest version of oursql but it seems that the bug is still there. In a nutshell, Cursor.executemany doesn't work--or maybe I don't know how to make it work, in which case I would appreciate a better explanation in the documentation. Traceback (most recent call last): File "execmany.py", line 9, in <module> cu.executemany(query, params) File "cursor.pyx", line 138, in oursql.Cursor.executemany (oursqlx/oursql.c:16 097) File "statement.pyx", line 278, in oursql._Statement.execute (oursqlx/oursql.c:8906) oursql.ProgrammingError: (None, 'executing this query would cause rows to become unfetchable', None) There seem to be a problem with setting the data_waiting attribute in statement.pyx:_Statement but I cannot tell how to fix it. The way I call executemany is the following: query = 'select user_id, user_registration from user where user_id = ?' params = zip([1,2,3,4,5,123,312,35142,4354252,534124]) cu = c.cursor() cu.executemany(query, params) Any help would be really appreciated! To manage notifications about this bug go to: https://bugs.launchpad.net/oursql/+bug/948063/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~agesys-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~agesys-dev More help : https://help.launchpad.net/ListHelp

