[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c trunk/ext/pdo_firebird/firebird_statement.c
mariuz Wed, 28 Dec 2011 19:58:37 + Revision: http://svn.php.net/viewvc?view=revision&revision=321487 Log: Fixed PDO_Firebird: bug 53280 segfaults if query column count is less than param count Bug: https://bugs.php.net/53280 (Assigned) PDO_Firebird segfaults query column count less than param count Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c U php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c U php/php-src/trunk/ext/pdo_firebird/firebird_statement.c Modified: php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c === --- php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c 2011-12-28 19:09:41 UTC (rev 321486) +++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c 2011-12-28 19:58:37 UTC (rev 321487) @@ -585,6 +585,9 @@ if (param->paramno == -1) { return 0; } + if (param->is_param) { + break; + } value = NULL; value_len = 0; caller_frees = 0; Modified: php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c === --- php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c 2011-12-28 19:09:41 UTC (rev 321486) +++ php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c 2011-12-28 19:58:37 UTC (rev 321487) @@ -585,6 +585,9 @@ if (param->paramno == -1) { return 0; } + if (param->is_param) { + break; + } value = NULL; value_len = 0; caller_frees = 0; Modified: php/php-src/trunk/ext/pdo_firebird/firebird_statement.c === --- php/php-src/trunk/ext/pdo_firebird/firebird_statement.c 2011-12-28 19:09:41 UTC (rev 321486) +++ php/php-src/trunk/ext/pdo_firebird/firebird_statement.c 2011-12-28 19:58:37 UTC (rev 321487) @@ -585,6 +585,9 @@ if (param->paramno == -1) { return 0; } + if (param->is_param) { + break; + } value = NULL; value_len = 0; caller_frees = 0; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_firebird/tests/bug_53280.phpt branches/PHP_5_4/ext/pdo_firebird/tests/bug_53280.phpt trunk/ext/pdo_firebird/tests/bug_53280.phpt
mariuz Wed, 28 Dec 2011 19:09:41 + Revision: http://svn.php.net/viewvc?view=revision&revision=321486 Log: fix tablename in testcase test->testz Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_53280.phpt U php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_53280.phpt U php/php-src/trunk/ext/pdo_firebird/tests/bug_53280.phpt Modified: php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_53280.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_53280.phpt 2011-12-28 19:05:28 UTC (rev 321485) +++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_53280.phpt 2011-12-28 19:09:41 UTC (rev 321486) @@ -11,11 +11,11 @@ $value = '2'; @$dbh->exec('DROP TABLE testz'); $dbh->exec('CREATE TABLE testz(A VARCHAR(30), B VARCHAR(30), C VARCHAR(30))'); -$dbh->exec("INSERT INTO test VALUES ('A', 'B', 'C')"); +$dbh->exec("INSERT INTO testz VALUES ('A', 'B', 'C')"); $dbh->commit(); -$stmt1 = "SELECT B FROM test WHERE A = ? AND B = ?"; -$stmt2 = "SELECT B, C FROM test WHERE A = ? AND B = ?"; +$stmt1 = "SELECT B FROM testz WHERE A = ? AND B = ?"; +$stmt2 = "SELECT B, C FROM testz WHERE A = ? AND B = ?"; $stmth2 = $dbh->prepare($stmt2); $stmth2->execute(array('A', 'B')); Modified: php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_53280.phpt === --- php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_53280.phpt 2011-12-28 19:05:28 UTC (rev 321485) +++ php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_53280.phpt 2011-12-28 19:09:41 UTC (rev 321486) @@ -11,11 +11,11 @@ $value = '2'; @$dbh->exec('DROP TABLE testz'); $dbh->exec('CREATE TABLE testz(A VARCHAR(30), B VARCHAR(30), C VARCHAR(30))'); -$dbh->exec("INSERT INTO test VALUES ('A', 'B', 'C')"); +$dbh->exec("INSERT INTO testz VALUES ('A', 'B', 'C')"); $dbh->commit(); -$stmt1 = "SELECT B FROM test WHERE A = ? AND B = ?"; -$stmt2 = "SELECT B, C FROM test WHERE A = ? AND B = ?"; +$stmt1 = "SELECT B FROM testz WHERE A = ? AND B = ?"; +$stmt2 = "SELECT B, C FROM testz WHERE A = ? AND B = ?"; $stmth2 = $dbh->prepare($stmt2); $stmth2->execute(array('A', 'B')); Modified: php/php-src/trunk/ext/pdo_firebird/tests/bug_53280.phpt === --- php/php-src/trunk/ext/pdo_firebird/tests/bug_53280.phpt 2011-12-28 19:05:28 UTC (rev 321485) +++ php/php-src/trunk/ext/pdo_firebird/tests/bug_53280.phpt 2011-12-28 19:09:41 UTC (rev 321486) @@ -11,11 +11,11 @@ $value = '2'; @$dbh->exec('DROP TABLE testz'); $dbh->exec('CREATE TABLE testz(A VARCHAR(30), B VARCHAR(30), C VARCHAR(30))'); -$dbh->exec("INSERT INTO test VALUES ('A', 'B', 'C')"); +$dbh->exec("INSERT INTO testz VALUES ('A', 'B', 'C')"); $dbh->commit(); -$stmt1 = "SELECT B FROM test WHERE A = ? AND B = ?"; -$stmt2 = "SELECT B, C FROM test WHERE A = ? AND B = ?"; +$stmt1 = "SELECT B FROM testz WHERE A = ? AND B = ?"; +$stmt2 = "SELECT B, C FROM testz WHERE A = ? AND B = ?"; $stmth2 = $dbh->prepare($stmt2); $stmth2->execute(array('A', 'B')); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_firebird/tests/bug_53280.phpt branches/PHP_5_4/ext/pdo_firebird/tests/bug_53280.phpt trunk/ext/pdo_firebird/tests/bug_53280.phpt
mariuz Wed, 28 Dec 2011 18:52:39 + Revision: http://svn.php.net/viewvc?view=revision&revision=321484 Log: Added test case for PDO_Firebird: bug 53280 segfaults if query column count is less than param count Bug: https://bugs.php.net/53280 (Assigned) PDO_Firebird segfaults query column count less than param count Changed paths: A php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_53280.phpt A php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_53280.phpt A php/php-src/trunk/ext/pdo_firebird/tests/bug_53280.phpt Added: php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_53280.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_53280.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_53280.phpt 2011-12-28 18:52:39 UTC (rev 321484) @@ -0,0 +1,63 @@ +--TEST-- +PDO_Firebird: bug 53280 segfaults if query column count is less than param count +--SKIPIF-- + +--FILE-- +exec('DROP TABLE testz'); +$dbh->exec('CREATE TABLE testz(A VARCHAR(30), B VARCHAR(30), C VARCHAR(30))'); +$dbh->exec("INSERT INTO test VALUES ('A', 'B', 'C')"); +$dbh->commit(); + +$stmt1 = "SELECT B FROM test WHERE A = ? AND B = ?"; +$stmt2 = "SELECT B, C FROM test WHERE A = ? AND B = ?"; + +$stmth2 = $dbh->prepare($stmt2); +$stmth2->execute(array('A', 'B')); +$rows = $stmth2->fetchAll(); // <-- OK +var_dump($rows); + +$stmth1 = $dbh->prepare($stmt1); +$stmth1->execute(array('A', 'B')); +$rows = $stmth1->fetchAll(); // <--- segfault +var_dump($rows); + +$stmt = $dbh->prepare('DELETE FROM testz'); +$stmt->execute(); + +$dbh->commit(); + +$dbh->exec('DROP TABLE testz'); + +unset($stmt); +unset($dbh); + +?> +--EXPECT-- +array(1) { + [0]=> + array(4) { +["B"]=> +string(1) "B" +[0]=> +string(1) "B" +["C"]=> +string(1) "C" +[1]=> +string(1) "C" + } +} +array(1) { + [0]=> + array(2) { +["B"]=> +string(1) "B" +[0]=> +string(1) "B" + } +} Added: php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_53280.phpt === --- php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_53280.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_53280.phpt 2011-12-28 18:52:39 UTC (rev 321484) @@ -0,0 +1,63 @@ +--TEST-- +PDO_Firebird: bug 53280 segfaults if query column count is less than param count +--SKIPIF-- + +--FILE-- +exec('DROP TABLE testz'); +$dbh->exec('CREATE TABLE testz(A VARCHAR(30), B VARCHAR(30), C VARCHAR(30))'); +$dbh->exec("INSERT INTO test VALUES ('A', 'B', 'C')"); +$dbh->commit(); + +$stmt1 = "SELECT B FROM test WHERE A = ? AND B = ?"; +$stmt2 = "SELECT B, C FROM test WHERE A = ? AND B = ?"; + +$stmth2 = $dbh->prepare($stmt2); +$stmth2->execute(array('A', 'B')); +$rows = $stmth2->fetchAll(); // <-- OK +var_dump($rows); + +$stmth1 = $dbh->prepare($stmt1); +$stmth1->execute(array('A', 'B')); +$rows = $stmth1->fetchAll(); // <--- segfault +var_dump($rows); + +$stmt = $dbh->prepare('DELETE FROM testz'); +$stmt->execute(); + +$dbh->commit(); + +$dbh->exec('DROP TABLE testz'); + +unset($stmt); +unset($dbh); + +?> +--EXPECT-- +array(1) { + [0]=> + array(4) { +["B"]=> +string(1) "B" +[0]=> +string(1) "B" +["C"]=> +string(1) "C" +[1]=> +string(1) "C" + } +} +array(1) { + [0]=> + array(2) { +["B"]=> +string(1) "B" +[0]=> +string(1) "B" + } +} Added: php/php-src/trunk/ext/pdo_firebird/tests/bug_53280.phpt === --- php/php-src/trunk/ext/pdo_firebird/tests/bug_53280.phpt (rev 0) +++ php/php-src/trunk/ext/pdo_firebird/tests/bug_53280.phpt 2011-12-28 18:52:39 UTC (rev 321484) @@ -0,0 +1,63 @@ +--TEST-- +PDO_Firebird: bug 53280 segfaults if query column count is less than param count +--SKIPIF-- + +--FILE-- +exec('DROP TABLE testz'); +$dbh->exec('CREATE TABLE testz(A VARCHAR(30), B VARCHAR(30), C VARCHAR(30))'); +$dbh->exec("INSERT INTO test VALUES ('A', 'B', 'C')"); +$dbh->commit(); + +$stmt1 = "SELECT B FROM test WHERE A = ? AND B = ?"; +$stmt2 = "SELECT B, C FROM test WHERE A = ? AND B = ?"; + +$stmth2 = $dbh->prepare($stmt2); +$stmth2->execute(array('A', 'B')); +$rows = $stmth2->fetchAll(); // <-- OK +var_dump($rows); + +$stmth1 = $dbh->prepare($stmt1); +$stmth1->execute(array('A', 'B')); +$rows = $stmth1->fetchAll(); // <--- segfault +var_dump($rows); + +$stmt = $dbh->prepare('DELETE FROM testz'); +$stmt->execute(); + +$dbh->commit(); + +$dbh->exec('DROP TABLE testz'); + +unset($stmt); +unset($dbh); + +?> +--EXPECT-- +array(1) { + [0]=> + array(4) { +["B"]=> +string(1) "B" +[0]=> +string(1) "B" +["C"]=> +string(1) "C" +[1]=> +string(1) "C" + } +} +array(1) { + [0]=> + array(2) {
[PHP-CVS] svn: /SVNROOT/ global_avail
dsp Wed, 28 Dec 2011 18:09:26 + Revision: http://svn.php.net/viewvc?view=revision&revision=321483 Log: Test karma updates and hooks on y3.php.net Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail2011-12-28 17:31:12 UTC (rev 321482) +++ SVNROOT/global_avail2011-12-28 18:09:26 UTC (rev 321483) @@ -5,6 +5,9 @@ unavail +# TEST +avail|dsp|karma.git + # Some people also have access to the configuration files in the SVNROOT. avail|sterling,goba,imajes,wez,iliaa,derick,jon,alan_k,jmcastagnetto,mj,pajoye,helly,philip,stas,johannes,gwynne,lsmith,bjori,dsp|SVNROOT -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c trunk/ext/pdo_firebird/firebird_statement.c
mariuz Wed, 28 Dec 2011 10:17:17 + Revision: http://svn.php.net/viewvc?view=revision&revision=321467 Log: fix Bug #47415 PDO_Firebird segfaults when passing lowercased column name to bindColumn() Bug: https://bugs.php.net/47415 (Assigned) PDO_Firebird segfaults when passing lowercased column name to bindColumn() Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c U php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c U php/php-src/trunk/ext/pdo_firebird/firebird_statement.c Modified: php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c === --- php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c 2011-12-28 10:12:43 UTC (rev 321466) +++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c 2011-12-28 10:17:17 UTC (rev 321467) @@ -582,6 +582,9 @@ break; case PDO_PARAM_EVT_FETCH_POST: +if (param->paramno == -1) { +return 0; +} value = NULL; value_len = 0; caller_frees = 0; @@ -598,6 +601,15 @@ ZVAL_LONG(param->parameter, *(long*)value); break; } +case PDO_PARAM_EVT_NORMALIZE: + if (!param->is_param) { + char *s = param->name; + while (*s != '\0') { + *s = toupper(*s); +s++; + } + } +break; default: ZVAL_NULL(param->parameter); } Modified: php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c === --- php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c 2011-12-28 10:12:43 UTC (rev 321466) +++ php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c 2011-12-28 10:17:17 UTC (rev 321467) @@ -582,6 +582,9 @@ break; case PDO_PARAM_EVT_FETCH_POST: +if (param->paramno == -1) { +return 0; +} value = NULL; value_len = 0; caller_frees = 0; @@ -598,6 +601,15 @@ ZVAL_LONG(param->parameter, *(long*)value); break; } +case PDO_PARAM_EVT_NORMALIZE: + if (!param->is_param) { + char *s = param->name; + while (*s != '\0') { + *s = toupper(*s); +s++; + } + } +break; default: ZVAL_NULL(param->parameter); } Modified: php/php-src/trunk/ext/pdo_firebird/firebird_statement.c === --- php/php-src/trunk/ext/pdo_firebird/firebird_statement.c 2011-12-28 10:12:43 UTC (rev 321466) +++ php/php-src/trunk/ext/pdo_firebird/firebird_statement.c 2011-12-28 10:17:17 UTC (rev 321467) @@ -582,6 +582,9 @@ break; case PDO_PARAM_EVT_FETCH_POST: +if (param->paramno == -1) { +return 0; +} value = NULL; value_len = 0; caller_frees = 0; @@ -598,6 +601,15 @@ ZVAL_LONG(param->parameter, *(long*)value); break; } +case PDO_PARAM_EVT_NORMAL
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/Zend/tests/bug60613.phpt trunk/Zend/tests/bug60613.phpt
dmitry Wed, 28 Dec 2011 10:12:43 + Revision: http://svn.php.net/viewvc?view=revision&revision=321466 Log: Fixed tests Changed paths: U php/php-src/branches/PHP_5_4/Zend/tests/bug60613.phpt U php/php-src/trunk/Zend/tests/bug60613.phpt Modified: php/php-src/branches/PHP_5_4/Zend/tests/bug60613.phpt === --- php/php-src/branches/PHP_5_4/Zend/tests/bug60613.phpt 2011-12-28 10:04:25 UTC (rev 321465) +++ php/php-src/branches/PHP_5_4/Zend/tests/bug60613.phpt 2011-12-28 10:12:43 UTC (rev 321466) @@ -14,6 +14,5 @@ $cls->{false}(); $cls->{null}(); echo "ok\n"; ---EXPECT-- -ok - +--EXPECTF-- +Fatal error: Method name must be a string in %sbug60613.php on line %d Modified: php/php-src/trunk/Zend/tests/bug60613.phpt === --- php/php-src/trunk/Zend/tests/bug60613.phpt 2011-12-28 10:04:25 UTC (rev 321465) +++ php/php-src/trunk/Zend/tests/bug60613.phpt 2011-12-28 10:12:43 UTC (rev 321466) @@ -14,6 +14,5 @@ $cls->{false}(); $cls->{null}(); echo "ok\n"; ---EXPECT-- -ok - +--EXPECTF-- +Fatal error: Method name must be a string in %sbug60613.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt trunk/ext/pdo_firebird/tests/bug_47415.phpt
mariuz Wed, 28 Dec 2011 10:04:25 + Revision: http://svn.php.net/viewvc?view=revision&revision=321465 Log: one more error to fix Table unknown TEST , it should be TESTZ Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt U php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt U php/php-src/trunk/ext/pdo_firebird/tests/bug_47415.phpt Modified: php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 09:59:53 UTC (rev 321464) +++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 10:04:25 UTC (rev 321465) @@ -12,7 +12,7 @@ $value = '2'; @$dbh->exec('DROP TABLE testz'); $dbh->exec('CREATE TABLE testz (idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); -$dbh->exec('INSERT INTO test VALUES(0, \'String0\')'); +$dbh->exec('INSERT INTO testz VALUES(0, \'String0\')'); $dbh->commit(); $query = "SELECT idx, txt FROM testz ORDER by idx"; Modified: php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt === --- php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 09:59:53 UTC (rev 321464) +++ php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 10:04:25 UTC (rev 321465) @@ -12,7 +12,7 @@ $value = '2'; @$dbh->exec('DROP TABLE testz'); $dbh->exec('CREATE TABLE testz (idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); -$dbh->exec('INSERT INTO test VALUES(0, \'String0\')'); +$dbh->exec('INSERT INTO testz VALUES(0, \'String0\')'); $dbh->commit(); $query = "SELECT idx, txt FROM testz ORDER by idx"; Modified: php/php-src/trunk/ext/pdo_firebird/tests/bug_47415.phpt === --- php/php-src/trunk/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 09:59:53 UTC (rev 321464) +++ php/php-src/trunk/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 10:04:25 UTC (rev 321465) @@ -12,7 +12,7 @@ $value = '2'; @$dbh->exec('DROP TABLE testz'); $dbh->exec('CREATE TABLE testz (idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); -$dbh->exec('INSERT INTO test VALUES(0, \'String0\')'); +$dbh->exec('INSERT INTO testz VALUES(0, \'String0\')'); $dbh->commit(); $query = "SELECT idx, txt FROM testz ORDER by idx"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt trunk/ext/pdo_firebird/tests/bug_47415.phpt
mariuz Wed, 28 Dec 2011 09:59:53 + Revision: http://svn.php.net/viewvc?view=revision&revision=321464 Log: fix table name in testcase Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt U php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt U php/php-src/trunk/ext/pdo_firebird/tests/bug_47415.phpt Modified: php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 09:59:39 UTC (rev 321463) +++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 09:59:53 UTC (rev 321464) @@ -15,7 +15,7 @@ $dbh->exec('INSERT INTO test VALUES(0, \'String0\')'); $dbh->commit(); -$query = "SELECT idx, txt FROM test ORDER by idx"; +$query = "SELECT idx, txt FROM testz ORDER by idx"; $idx = $txt = 0; $stmt = $dbh->prepare($query); $stmt->bindColumn('idx', $idx); Modified: php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt === --- php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 09:59:39 UTC (rev 321463) +++ php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 09:59:53 UTC (rev 321464) @@ -15,7 +15,7 @@ $dbh->exec('INSERT INTO test VALUES(0, \'String0\')'); $dbh->commit(); -$query = "SELECT idx, txt FROM test ORDER by idx"; +$query = "SELECT idx, txt FROM testz ORDER by idx"; $idx = $txt = 0; $stmt = $dbh->prepare($query); $stmt->bindColumn('idx', $idx); Modified: php/php-src/trunk/ext/pdo_firebird/tests/bug_47415.phpt === --- php/php-src/trunk/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 09:59:39 UTC (rev 321463) +++ php/php-src/trunk/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 09:59:53 UTC (rev 321464) @@ -15,7 +15,7 @@ $dbh->exec('INSERT INTO test VALUES(0, \'String0\')'); $dbh->commit(); -$query = "SELECT idx, txt FROM test ORDER by idx"; +$query = "SELECT idx, txt FROM testz ORDER by idx"; $idx = $txt = 0; $stmt = $dbh->prepare($query); $stmt->bindColumn('idx', $idx); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/tests/bug60613.phpt branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/tests/bug60613.phpt trunk/Zend/zend_compile.c
dmitry Wed, 28 Dec 2011 09:59:39 + Revision: http://svn.php.net/viewvc?view=revision&revision=321463 Log: Fixed bug #60613 (Segmentation fault with $cls->{expr}() syntax) Bug: https://bugs.php.net/60613 (Closed) Segmentation fault with $cls->{expr}() syntax Changed paths: U php/php-src/branches/PHP_5_4/NEWS A php/php-src/branches/PHP_5_4/Zend/tests/bug60613.phpt U php/php-src/branches/PHP_5_4/Zend/zend_compile.c A php/php-src/trunk/Zend/tests/bug60613.phpt U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-12-28 09:53:15 UTC (rev 321462) +++ php/php-src/branches/PHP_5_4/NEWS 2011-12-28 09:59:39 UTC (rev 321463) @@ -2,6 +2,7 @@ ||| ?? Jan 2012, PHP 5.4.0 RC5 - Core: + . Fixed bug #60613 (Segmentation fault with $cls->{expr}() syntax). (Dmitry) . Fixed bug #60611 (Segmentation fault with Cls::{expr}() syntax). (Laruence) - CLI SAPI: Added: php/php-src/branches/PHP_5_4/Zend/tests/bug60613.phpt === --- php/php-src/branches/PHP_5_4/Zend/tests/bug60613.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/Zend/tests/bug60613.phpt 2011-12-28 09:59:39 UTC (rev 321463) @@ -0,0 +1,19 @@ +--TEST-- +Bug #60613 (Segmentation fault with $cls->{expr}() syntax) +--FILE-- +{0}(); +$cls->{1.0}(); +$cls->{true}(); +$cls->{false}(); +$cls->{null}(); +echo "ok\n"; +--EXPECT-- +ok + Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c === --- php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-12-28 09:53:15 UTC (rev 321462) +++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-12-28 09:59:39 UTC (rev 321463) @@ -89,7 +89,8 @@ } while (0) #define FREE_POLYMORPHIC_CACHE_SLOT(literal) do { \ - if (CG(active_op_array)->literals[literal].cache_slot == \ + if (CG(active_op_array)->literals[literal].cache_slot != -1 && \ + CG(active_op_array)->literals[literal].cache_slot == \ CG(active_op_array)->last_cache_slot - POLYMORPHIC_CACHE_SLOT_SIZE) { \ CG(active_op_array)->literals[literal].cache_slot = -1; \ CG(active_op_array)->last_cache_slot -= POLYMORPHIC_CACHE_SLOT_SIZE; \ Added: php/php-src/trunk/Zend/tests/bug60613.phpt === --- php/php-src/trunk/Zend/tests/bug60613.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug60613.phpt 2011-12-28 09:59:39 UTC (rev 321463) @@ -0,0 +1,19 @@ +--TEST-- +Bug #60613 (Segmentation fault with $cls->{expr}() syntax) +--FILE-- +{0}(); +$cls->{1.0}(); +$cls->{true}(); +$cls->{false}(); +$cls->{null}(); +echo "ok\n"; +--EXPECT-- +ok + Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2011-12-28 09:53:15 UTC (rev 321462) +++ php/php-src/trunk/Zend/zend_compile.c 2011-12-28 09:59:39 UTC (rev 321463) @@ -89,7 +89,8 @@ } while (0) #define FREE_POLYMORPHIC_CACHE_SLOT(literal) do { \ - if (CG(active_op_array)->literals[literal].cache_slot == \ + if (CG(active_op_array)->literals[literal].cache_slot != -1 && \ + CG(active_op_array)->literals[literal].cache_slot == \ CG(active_op_array)->last_cache_slot - POLYMORPHIC_CACHE_SLOT_SIZE) { \ CG(active_op_array)->literals[literal].cache_slot = -1; \ CG(active_op_array)->last_cache_slot -= POLYMORPHIC_CACHE_SLOT_SIZE; \ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt trunk/ext/pdo_firebird/tests/bug_47415.phpt
mariuz Wed, 28 Dec 2011 09:53:15 + Revision: http://svn.php.net/viewvc?view=revision&revision=321462 Log: added testcase for Bug 47415 Bug: https://bugs.php.net/47415 (Assigned) PDO_Firebird segfaults when passing lowercased column name to bindColumn() Changed paths: A php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt A php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt A php/php-src/trunk/ext/pdo_firebird/tests/bug_47415.phpt Added: php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 09:53:15 UTC (rev 321462) @@ -0,0 +1,42 @@ +--TEST-- +Bug #47415 PDO_Firebird segfaults when passing lowercased column name to bindColumn() +--SKIPIF-- + +--FILE-- +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); +$value = '2'; +@$dbh->exec('DROP TABLE testz'); +$dbh->exec('CREATE TABLE testz (idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); +$dbh->exec('INSERT INTO test VALUES(0, \'String0\')'); +$dbh->commit(); + +$query = "SELECT idx, txt FROM test ORDER by idx"; +$idx = $txt = 0; +$stmt = $dbh->prepare($query); +$stmt->bindColumn('idx', $idx); +$stmt->bindColumn('txt', $txt); +$stmt->execute(); +$rows = $stmt->fetch(PDO::FETCH_BOUND); +var_dump($stmt->fetch()); +var_dump($stmt->rowCount()); + + +$stmt = $dbh->prepare('DELETE FROM testz'); +$stmt->execute(); + +$dbh->commit(); + +$dbh->exec('DROP TABLE testz'); + +unset($stmt); +unset($dbh); + +?> +--EXPECT-- +bool(false) +int(1) Added: php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt === --- php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 09:53:15 UTC (rev 321462) @@ -0,0 +1,42 @@ +--TEST-- +Bug #47415 PDO_Firebird segfaults when passing lowercased column name to bindColumn() +--SKIPIF-- + +--FILE-- +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); +$value = '2'; +@$dbh->exec('DROP TABLE testz'); +$dbh->exec('CREATE TABLE testz (idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); +$dbh->exec('INSERT INTO test VALUES(0, \'String0\')'); +$dbh->commit(); + +$query = "SELECT idx, txt FROM test ORDER by idx"; +$idx = $txt = 0; +$stmt = $dbh->prepare($query); +$stmt->bindColumn('idx', $idx); +$stmt->bindColumn('txt', $txt); +$stmt->execute(); +$rows = $stmt->fetch(PDO::FETCH_BOUND); +var_dump($stmt->fetch()); +var_dump($stmt->rowCount()); + + +$stmt = $dbh->prepare('DELETE FROM testz'); +$stmt->execute(); + +$dbh->commit(); + +$dbh->exec('DROP TABLE testz'); + +unset($stmt); +unset($dbh); + +?> +--EXPECT-- +bool(false) +int(1) Added: php/php-src/trunk/ext/pdo_firebird/tests/bug_47415.phpt === --- php/php-src/trunk/ext/pdo_firebird/tests/bug_47415.phpt (rev 0) +++ php/php-src/trunk/ext/pdo_firebird/tests/bug_47415.phpt 2011-12-28 09:53:15 UTC (rev 321462) @@ -0,0 +1,42 @@ +--TEST-- +Bug #47415 PDO_Firebird segfaults when passing lowercased column name to bindColumn() +--SKIPIF-- + +--FILE-- +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); +$value = '2'; +@$dbh->exec('DROP TABLE testz'); +$dbh->exec('CREATE TABLE testz (idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); +$dbh->exec('INSERT INTO test VALUES(0, \'String0\')'); +$dbh->commit(); + +$query = "SELECT idx, txt FROM test ORDER by idx"; +$idx = $txt = 0; +$stmt = $dbh->prepare($query); +$stmt->bindColumn('idx', $idx); +$stmt->bindColumn('txt', $txt); +$stmt->execute(); +$rows = $stmt->fetch(PDO::FETCH_BOUND); +var_dump($stmt->fetch()); +var_dump($stmt->rowCount()); + + +$stmt = $dbh->prepare('DELETE FROM testz'); +$stmt->execute(); + +$dbh->commit(); + +$dbh->exec('DROP TABLE testz'); + +unset($stmt); +unset($dbh); + +?> +--EXPECT-- +bool(false) +int(1) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_firebird/tests/bug_48877.phpt branches/PHP_5_4/ext/pdo_firebird/tests/bug_48877.phpt trunk/ext/pdo_firebird/tests/bug_48877.phpt
mariuz Wed, 28 Dec 2011 09:41:02 + Revision: http://svn.php.net/viewvc?view=revision&revision=321461 Log: cleanup for bug 48877 test, add description Bug: https://bugs.php.net/48877 (Closed) "bindValue" and "bindParam" do not work for PDO Firebird Changed paths: A php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_48877.phpt U php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_48877.phpt U php/php-src/trunk/ext/pdo_firebird/tests/bug_48877.phpt Added: php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_48877.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_48877.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_48877.phpt 2011-12-28 09:41:02 UTC (rev 321461) @@ -0,0 +1,42 @@ +--TEST-- +PDO_Firebird: bug 48877 The "bindValue" and "bindParam" do not work for PDO Firebird if we use named parameters (:parameter). +--SKIPIF-- + +--FILE-- +exec('DROP TABLE testz'); +$dbh->exec('CREATE TABLE testz (A integer)'); +$dbh->exec("INSERT INTO testz VALUES ('1')"); +$dbh->exec("INSERT INTO testz VALUES ('2')"); +$dbh->exec("INSERT INTO testz VALUES ('3')"); +$dbh->commit(); + +$query = "SELECT * FROM testz WHERE A = :paramno"; + +$stmt = $dbh->prepare($query); +$stmt->bindParam(':paramno', $value, PDO::PARAM_STR); +$stmt->execute(); +$rows = $stmt->fetch(); +var_dump($stmt->fetch()); +var_dump($stmt->rowCount()); + + +$stmt = $dbh->prepare('DELETE FROM testz'); +$stmt->execute(); + +$dbh->commit(); + +$dbh->exec('DROP TABLE testz'); + +unset($stmt); +unset($dbh); + +?> +--EXPECT-- +bool(false) +int(1) Modified: php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_48877.phpt === --- php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_48877.phpt 2011-12-28 09:31:18 UTC (rev 321460) +++ php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_48877.phpt 2011-12-28 09:41:02 UTC (rev 321461) @@ -1,9 +1,9 @@ --TEST-- -PDO_Firebird: bug 48877 test +PDO_Firebird: bug 48877 The "bindValue" and "bindParam" do not work for PDO Firebird if we use named parameters (:parameter). --SKIPIF-- --FILE-- - --FILE-- --- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/pdo_firebird/ EXPERIMENTAL
mariuz Wed, 28 Dec 2011 09:31:18 + Revision: http://svn.php.net/viewvc?view=revision&revision=321460 Log: remove experimental status for pdo_Firebird , see the general status http://www.firebirdnews.org/?p=6619 Changed paths: D php/php-src/trunk/ext/pdo_firebird/EXPERIMENTAL Deleted: php/php-src/trunk/ext/pdo_firebird/EXPERIMENTAL === -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php