简体   繁体   中英

Python ejabberd Auth Script not responding to changes in Database

I have an authentication script in ejabberd (XMPP server) that based off of THIS LINK

I have slightly modified the script so that instead of setting the variable out, it just returns true or false.

I'm using Ubuntu, MySQL, ejabberd, and Python.

I can authenticate all the records that are already on the database. But, when I add or remove records (I do this through phpMyAdmin), the script doesn't seem to know that the database has changed (I remove a user in phpMyAdmin and it still authenticates the user). The only time when the script recognizes the new records is when I restart or force-reload the ejabberd server. I've already been told its not a mySQL caching problem. I made sure I turned off external authentication caching for ejabberd.

That's all I can think of right now. I'll add more information if I can think of it. Any help is appreciated. I have no idea what is going on.

Addition: I turned on the MySQL logs, and all the queries there so there is not skipping queries.

I managed to fix this problem by changing the database engine back to MYISAM rather than INNODB. But I would like to know if this can be fixed for INNODB.

Edit: to fix it in innodb, set autocommit to true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM