2009年1月21日星期三

[fw-db] Pdo_Mysql crash case?

I've run into a case where Pdo_Mysql consistently crashes on me. (but if
I use the Mysqli driver, it works fine)

If I have an active statement handle and then call 'exit', the thread
seems to crash without producing any output at all.

I discovered this while trying to use the json helper (because the json
helper calls exit once it has completed its task)

The funny part is that if I clear out the statement handle, it runs just
fine

class IndexController extends Zend_Controller_Action
{
public function indexAction()
{
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();

$db = Zend_Registry::get('db'); // (set up in the bootstrap file)

$stmt = $db->query('show tables'); // <- if a statement handle
exists..

// (if I clear the statement handle, it doesn't crash.)
// $stmt = '';

print "Testing 123";

exit; // <- ..and exit is called, it crashes. (no output is
produced and no logging is generated)
}
}

Has anyone else experienced this?

-Matt P.

没有评论: