Comment 2 for bug 691836

Revision history for this message
Geert JM Vanderkelen (geertjmvdk) wrote :

I can't reproduce the problem with the following test case (please review):

def main():
    cnx = mysql.connector.connect(database='test')
    cur = cnx.cursor()
    cur.execute('DROP TABLE IF EXISTS t1')
    cur.execute("CREATE TABLE t1 (id INT NOT NULL, c1 VARCHAR(30), c2 INT)")
    cur.execute("REPLACE INTO t1 VALUES (%s,%s,%s)", (1,'ham%s',2))
    cur.execute("SELECT * FROM t1")
    print(cur.fetchall())
    cnx.close()

The result is:

[(1, 'ham%s', 2)]