#12 Silent failure on repeated bad input

open
nobody
None
5
2014-08-15
2002-05-23
Sam penrose
No

If I pass gadfly the following bad SQL twice, it (correctly)
raises an Exception the first time but fails silently the second
time.
# start w/ empty table, pass bad INSERT statement
>>> cursor.execute("INSERT INTO T (f, gadflyIndex)
VALUES ('bob\\\'', 1)")
Traceback (most recent call last):
...
gadfly.kjParser.LexTokenError: Lexical token not found near
::" VALUES ('bob\\'"*"', 1)"
# try, try again
>>> cursor.execute("INSERT INTO T (f, gadflyIndex)
VALUES ('bob\\\'', 1)")
>>> db.cursor.execute("SELECT * FROM t")
# worked ?!?!
>>> cursor.fetchall()
[]
# nope...

Discussion

  • Stuart Bishop
    Stuart Bishop
    2003-02-11

    Logged In: YES
    user_id=46639

    Added a test for this into the test suite. Actual issue not
    yet resolved.
    Under Python 2.3, doing this throws a bad exception so it is
    no longer
    failing silently (just incorrectly)