Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database: iterate over exact count of columns in Statement::detectColumnTypes() #1028

Closed
wants to merge 1 commit into from

Conversation

milo
Copy link
Member

@milo milo commented Apr 5, 2013

PHP process is killed when trying get meta info for column number bigger then real count with MS Sqlsrv PDO driver.

Hope, that old behaviour does not hide some side effect.

@hrach
Copy link
Contributor

hrach commented Apr 5, 2013

Would be nice to add note about php bug (or create it).

@@ -159,8 +159,9 @@ private function detectColumnTypes()
if ($this->types === NULL) {
$this->types = array();
if ($this->connection->getSupplementalDriver()->isSupported(ISupplementalDriver::SUPPORT_COLUMNS_META)) { // workaround for PHP bugs #53782, #54695
$col = 0;
while ($meta = $this->pdoStatement->getColumnMeta($col++)) {
$cnt = $this->pdoStatement->columnCount();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use $count instead of $cnt. Nice bug by the way. 👍

@milo
Copy link
Member Author

milo commented Apr 5, 2013

@hrach Sqlsrv extension is for Win only and Microsoft maintains it. I don't know where to send bug report. And to be honest, I don't want to :)

@hrach
Copy link
Contributor

hrach commented Apr 5, 2013

@milo Well, sometime I have apache crash during the test run. It's just win error dialog, everythink runs ok, so I have suspision it's not only about sqldrive... ;)

…umnTypes()

PHP process is killed when trying get meta info for column number bigger then real count with MS Sqlsrv PDO driver.
@Majkl578
Copy link
Contributor

Majkl578 commented Apr 5, 2013

@milo:

I don't know where to send bug report

You can submit it to bugs.php.net, there's a package sqlsrv, that should be enough. :)

@milo
Copy link
Member Author

milo commented Apr 5, 2013

You can submit it to bugs.php.net, there's a package sqlsrv, that should be enough. :)

Maybe later. If so, I must read php bugs howto, create backtrace....

@dg
Copy link
Member

dg commented Apr 6, 2013

Merged e6ab55e

@dg dg closed this Apr 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants