diff options
author | Jason Greene <jason@php.net> | 2001-05-04 18:27:15 +0000 |
---|---|---|
committer | Jason Greene <jason@php.net> | 2001-05-04 18:27:15 +0000 |
commit | bb131011a72274230468a6a5aa4e3afab8db357b (patch) | |
tree | 163ca3a41f186c0a84d4cc533af497ff0a793dd9 /ext/mysql | |
parent | a3c90853a0ac761a8c5924788d31c0c9b281a9a9 (diff) | |
download | php-git-bb131011a72274230468a6a5aa4e3afab8db357b.tar.gz |
Fixed bug in my previous patch, forgot to reset connect error globals
on request startup.
Diffstat (limited to 'ext/mysql')
-rw-r--r-- | ext/mysql/php_mysql.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index e79d6b8228..2bf457035b 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -322,6 +322,12 @@ PHP_RINIT_FUNCTION(mysql) MySG(default_link)=-1; MySG(num_links) = MySG(num_persistent); + /* Reset connect error/errno on every request */ + if (MySG(connect_error)!=NULL) { + efree(MySG(connect_error)); + MySG(connect_error)=NULL; + } + MySG(connect_errno)=0; return SUCCESS; } |