Package: python-mysqldb
Version: 1.1.6-1.1

When I query an updated (by another client) innodb table, python-mysqldb does not see the updated information.

Mysql Version: 4.0. + 4.1.

bart2:~# python
Python 2.3.5 (#2, Feb  9 2005, 00:38:15)
[GCC 3.3.5 (Debian 1:3.3.5-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import MySQLdb
conn = MySQLdb.connect (host = "xen", user = "zero", passwd = "...", db = 
"zero")
c = conn.cursor(); c.execute("SELECT * FROM test"); c.fetchall(); c.close();
2L
(('Test 1',), ('Test 2',))

HERE I AM ON A DIFFERENT CLIENT (MYSQL)

mysql> set autocommit=1;
Query OK, 0 rows affected (0.00 sec)

mysql> insert into test set name='Test 3';
Query OK, 1 row affected (0.11 sec)

c = conn.cursor(); c.execute("SELECT * FROM test"); c.fetchall(); c.close();
2L
(('Test 1',), ('Test 2',))


PYTHON DOES NOT SEE THE CHANGE

I have to re-open the connection in order to see the change.
Any ideas?

Best,
Martin





begin:vcard
fn:Martin Rode
n:Rode;Martin
org:Programfabrik GmbH
adr:;;Frankfurter Allee 73D;Berlin;;10247;Germany
email;internet:[EMAIL PROTECTED]
tel;work:+49-30-42081604
tel;fax:+49-30-42081606
x-mozilla-html:FALSE
url:http://www.programmfabrik.de
version:2.1
end:vcard

Reply via email to