MySQL Forums
Forum List  »  Connector/Python

Re: log-bin not logging UPDATEs
Posted by: Johnny Boy
Date: February 15, 2008 02:11AM

This is what I did:

[web] /www> python
Python 2.5.1 (r251:54863, Jan 31 2008, 11:54:32)
[GCC 3.4.6 [FreeBSD] 20060305] on freebsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>> d = MySQLdb.connect("db", "www", "xxxxx")
>>> c = d.cursor()
>>> c.execute("UPDATE database.table SET field=123 WHERE id=12345")
>>> c.execute("COMMIT")
>>> d.commit()
--------------

[db] ~> mysql -h127.0.0.1 -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 97189977
Server version: 5.0.51a-log FreeBSD port: mysql-server-5.0.51a

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select field from database.table where id=12345;
+----------+
| field |
+----------+
| 123 |
+----------+

-------

Then from the slave the change doesn't exist, since it doesn't exist in the log bin either.

And if I do this exact same update from mysql command line, everything works fine.
Same table, same update ("BEGIN; ... ; COMMIT"), same database client, same database server.
I've recompiled MySQLdb and mysql client several times, I just don't get it.
Since the mysql server gets the update and writes it to the table, it should log it too!

Options: ReplyQuote


Subject
Written By
Posted
February 14, 2008 08:12AM
Re: log-bin not logging UPDATEs
February 15, 2008 02:11AM
February 15, 2008 02:26AM
February 18, 2008 03:12AM
February 15, 2008 02:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.