I'm trying to update the session table used by Zend_Session_SaveHandler_DbTable directly after authenticating the user and writing the session to the DB. But I can neither update nor fetch the newly inserted row, even though the session id I use to check (Zend_Session::getId()) is valid and the row is indeed inserted into the table. Upon fetching all session ids (on the same request) the one I newly inserted is missing from the results. It does appear in the results if I fetch it with something else. I've checked whether it is a problem with transactions and that does not seem to be the problem - there is no active transaction when I'm fetching the results. I've also tried fetching a few seconds after writing using sleep(), which doesn't help.
$auth->getStorage()->write($ident);
//sleep(1)
$update = $this->db->update('session', array('uid' => $ident->user_id), 'id='.$this->db->quote(Zend_Session::getId()));
$qload = 'SELECT id FROM session';
$load = $this->db->fetchAll($qload);
echo $qload;
print_r($load);
$update fails.
$load doesn't contain the row that was written with $auth->getStorage()->write($identity). $qload does contain the correct query - copying it to somewhere else leads to the expected result, that is the inserted row is included in the results.
Kullanılan veritabanı MySQL - InnoDB.
Thank you very much: Birisi doğrudan Zend_Session_SaveHandler_DbTable değiştirmeden (yani aynı isteği üzerine, başka bir sayfaya yönlendiriliyorsunuz sonra güncellenmesi gibi bir şey yapıyor değil) Bunu düzeltmek için nasıl bilir!