diff options
Diffstat (limited to 'ext/pdo_mysql')
| -rwxr-xr-x | ext/pdo_mysql/config.m4 | 6 | ||||
| -rw-r--r-- | ext/pdo_mysql/mysql_driver.c | 27 | ||||
| -rw-r--r-- | ext/pdo_mysql/pdo_mysql.c | 4 | ||||
| -rw-r--r-- | ext/pdo_mysql/php_pdo_mysql_int.h | 6 | ||||
| -rw-r--r-- | ext/pdo_mysql/tests/bug_39858.phpt | 2 | ||||
| -rw-r--r-- | ext/pdo_mysql/tests/bug_41997.phpt | 2 | ||||
| -rw-r--r-- | ext/pdo_mysql/tests/bug_44454.phpt | 2 | ||||
| -rw-r--r-- | ext/pdo_mysql/tests/pdo_mysql___construct.phpt | 11 | ||||
| -rw-r--r-- | ext/pdo_mysql/tests/pdo_mysql_attr_multi_statements.phpt | 95 | ||||
| -rw-r--r-- | ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt | 19 | ||||
| -rw-r--r-- | ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt | 261 | ||||
| -rw-r--r-- | ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt | 4 | ||||
| -rw-r--r-- | ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt | 4 | ||||
| -rw-r--r-- | ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt | 4 |
14 files changed, 428 insertions, 19 deletions
diff --git a/ext/pdo_mysql/config.m4 b/ext/pdo_mysql/config.m4 index a2ba2fdbdd..f237f413be 100755 --- a/ext/pdo_mysql/config.m4 +++ b/ext/pdo_mysql/config.m4 @@ -4,12 +4,12 @@ dnl vim: se ts=2 sw=2 et: PHP_ARG_WITH(pdo-mysql, for MySQL support for PDO, [ --with-pdo-mysql[=DIR] PDO: MySQL support. DIR is the MySQL base directory - If no value or mysqlnd is passed as DIR, the - MySQL native driver will be used]) + If no value or mysqlnd is passed as DIR, the + MySQL native driver will be used]) if test -z "$PHP_ZLIB_DIR"; then PHP_ARG_WITH(zlib-dir, for the location of libz, - [ --with-zlib-dir[=DIR] PDO_MySQL: Set the path to libz install prefix], no, no) + [ --with-zlib-dir[=DIR] PDO_MySQL: Set the path to libz install prefix], no, no) fi if test "$PHP_PDO_MYSQL" != "no"; then diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 47a1be31c3..b331ce23dd 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -551,15 +551,20 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ #ifdef CLIENT_MULTI_RESULTS |CLIENT_MULTI_RESULTS #endif -#ifdef CLIENT_MULTI_STATEMENTS - |CLIENT_MULTI_STATEMENTS -#endif ; - #if defined(PDO_USE_MYSQLND) int dbname_len = 0; int password_len = 0; #endif + +#ifdef CLIENT_MULTI_STATEMENTS + if (!driver_options) { + connect_opts |= CLIENT_MULTI_STATEMENTS; + } else if (pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_MULTI_STATEMENTS, 1 TSRMLS_CC)) { + connect_opts |= CLIENT_MULTI_STATEMENTS; + } +#endif + PDO_DBG_ENTER("pdo_mysql_handle_factory"); PDO_DBG_INF_FMT("dbh=%p", dbh); #ifdef CLIENT_MULTI_RESULTS @@ -709,6 +714,20 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ efree(ssl_cipher); } } + +#if MYSQL_VERSION_ID > 50605 || defined(PDO_USE_MYSQLND) + { + char *public_key = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SERVER_PUBLIC_KEY, NULL TSRMLS_CC); + if (public_key) { + if (mysql_options(H->server, MYSQL_SERVER_PUBLIC_KEY, public_key)) { + pdo_mysql_error(dbh); + efree(public_key); + goto cleanup; + } + efree(public_key); + } + } +#endif } #ifdef PDO_MYSQL_HAS_CHARSET diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c index 697e7c0b58..cabbc8f572 100644 --- a/ext/pdo_mysql/pdo_mysql.c +++ b/ext/pdo_mysql/pdo_mysql.c @@ -123,6 +123,10 @@ static PHP_MINIT_FUNCTION(pdo_mysql) REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_SSL_CA", (long)PDO_MYSQL_ATTR_SSL_CA); REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_SSL_CAPATH", (long)PDO_MYSQL_ATTR_SSL_CAPATH); REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_SSL_CIPHER", (long)PDO_MYSQL_ATTR_SSL_CIPHER); +#if MYSQL_VERSION_ID > 50605 || defined(PDO_USE_MYSQLND) + REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_SERVER_PUBLIC_KEY", (long)PDO_MYSQL_ATTR_SERVER_PUBLIC_KEY); +#endif + REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_MULTI_STATEMENTS", (long)PDO_MYSQL_ATTR_MULTI_STATEMENTS); #ifdef PDO_USE_MYSQLND mysqlnd_reverse_api_register_api(&pdo_mysql_reverse_api TSRMLS_CC); diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h index 7533467cab..36604b8dce 100644 --- a/ext/pdo_mysql/php_pdo_mysql_int.h +++ b/ext/pdo_mysql/php_pdo_mysql_int.h @@ -170,7 +170,11 @@ enum { PDO_MYSQL_ATTR_SSL_CERT, PDO_MYSQL_ATTR_SSL_CA, PDO_MYSQL_ATTR_SSL_CAPATH, - PDO_MYSQL_ATTR_SSL_CIPHER + PDO_MYSQL_ATTR_SSL_CIPHER, +#if MYSQL_VERSION_ID > 50605 || defined(PDO_USE_MYSQLND) + PDO_MYSQL_ATTR_SERVER_PUBLIC_KEY, +#endif + PDO_MYSQL_ATTR_MULTI_STATEMENTS, }; #endif diff --git a/ext/pdo_mysql/tests/bug_39858.phpt b/ext/pdo_mysql/tests/bug_39858.phpt index 47457180a5..cb9cafd9f5 100644 --- a/ext/pdo_mysql/tests/bug_39858.phpt +++ b/ext/pdo_mysql/tests/bug_39858.phpt @@ -18,6 +18,8 @@ if ($version < 50000) die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n", $matches[0], $matches[1], $matches[2], $version)); ?> +--XFAIL-- +nextRowset() problem with stored proc & emulation mode & mysqlnd --FILE-- <?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); diff --git a/ext/pdo_mysql/tests/bug_41997.phpt b/ext/pdo_mysql/tests/bug_41997.phpt index 38d55a0190..56cbe4b087 100644 --- a/ext/pdo_mysql/tests/bug_41997.phpt +++ b/ext/pdo_mysql/tests/bug_41997.phpt @@ -1,5 +1,7 @@ --TEST-- PDO MySQL Bug #41997 (stored procedure call returning single rowset blocks future queries) +--XFAIL-- +nextRowset() problem with stored proc & emulation mode & mysqlnd --SKIPIF-- <?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); diff --git a/ext/pdo_mysql/tests/bug_44454.phpt b/ext/pdo_mysql/tests/bug_44454.phpt index 89a4e2a3f7..eb93d97952 100644 --- a/ext/pdo_mysql/tests/bug_44454.phpt +++ b/ext/pdo_mysql/tests/bug_44454.phpt @@ -73,8 +73,6 @@ require dirname(__FILE__) . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> ---XFAIL-- -For some reason the exception gets thrown at the wrong place --EXPECTF-- Native Prepared Statements ... SELECT has returned 1 row... diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt index c3f12df7a9..0cabfe6aa3 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt @@ -49,7 +49,8 @@ MySQLPDOTest::skip(); // should fail $dsn = 'mysql:'; - print tryandcatch(10, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); + // don't print the message since it can be different + tryandcatch(10, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); $dsn = PDO_MYSQL_TEST_DSN; $user = PDO_MYSQL_TEST_USER; @@ -57,14 +58,15 @@ MySQLPDOTest::skip(); // should work... $db = new PDO($dsn, $user, $pass); + // Reaction on host not specified differs for different configs, so no printing $dsn = 'mysql:invalid=foo'; - print tryandcatch(11, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); + tryandcatch(11, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); $dsn = 'mysql:' . str_repeat('howmuch=canpdoeat;', 1000); - print tryandcatch(12, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); + tryandcatch(12, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); $dsn = 'mysql:' . str_repeat('abcdefghij', 1024 * 10) . '=somevalue'; - print tryandcatch(13, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); + tryandcatch(13, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); if (PDO_MYSQL_TEST_HOST) { $host = PDO_MYSQL_TEST_HOST; @@ -295,6 +297,5 @@ MySQLPDOTest::skip(); [006] invalid data source name, [n/a] n/a [007] could not find driver, [n/a] n/a [009] SQLSTATE[%s] [1045] Access denied for user 'dont%s'@'%s' (using password: YES), [n/a] n/a -[010] SQLSTATE[%s] [1045] Access denied for user 'dont%s'@'%s' (using password: YES), [n/a] n/a [017] DSN=%s, SQLSTATE[%s] [%d] %s done! diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_multi_statements.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_multi_statements.phpt new file mode 100644 index 0000000000..312deddb81 --- /dev/null +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_multi_statements.phpt @@ -0,0 +1,95 @@ +--TEST-- +PDO::MYSQL_ATTR_MULTI_STATEMENTS +--SKIPIF-- +<?php +require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +MySQLPDOTest::skip(); +$db = MySQLPDOTest::factory(); +?> +--INI-- +error_reporting=E_ALL +--FILE-- +<?php + require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + + $dsn = MySQLPDOTest::getDSN(); + $user = PDO_MYSQL_TEST_USER; + $pass = PDO_MYSQL_TEST_PASS; + + $table = sprintf("test_%s", md5(mt_rand(0, PHP_INT_MAX))); + $db = new PDO($dsn, $user, $pass); + $db->exec(sprintf('DROP TABLE IF EXISTS %s', $table)); + $create = sprintf('CREATE TABLE %s(id INT)', $table); + $db->exec($create); + $db->exec(sprintf('INSERT INTO %s(id) VALUES (1)', $table)); + $stmt = $db->query(sprintf('SELECT * FROM %s; INSERT INTO %s(id) VALUES (2)', $table, $table)); + $stmt->closeCursor(); + $info = $db->errorInfo(); + var_dump($info[0]); + $stmt = $db->query(sprintf('SELECT id FROM %s', $table)); + var_dump($stmt->fetchAll(PDO::FETCH_ASSOC)); + // A single query with a trailing delimiter. + $stmt = $db->query('SELECT 1 AS value;'); + var_dump($stmt->fetchAll(PDO::FETCH_ASSOC)); + + // New connection, does not allow multiple statements. + $db = new PDO($dsn, $user, $pass, array(PDO::MYSQL_ATTR_MULTI_STATEMENTS => false)); + $stmt = $db->query(sprintf('SELECT * FROM %s; INSERT INTO %s(id) VALUES (3)', $table, $table)); + var_dump($stmt); + $info = $db->errorInfo(); + var_dump($info[0]); + + $stmt = $db->query(sprintf('SELECT id FROM %s', $table)); + var_dump($stmt->fetchAll(PDO::FETCH_ASSOC)); + // A single query with a trailing delimiter. + $stmt = $db->query('SELECT 1 AS value;'); + var_dump($stmt->fetchAll(PDO::FETCH_ASSOC)); + + $db->exec(sprintf('DROP TABLE IF EXISTS %s', $table)); + print "done!"; +?> +--EXPECTF-- +string(5) "00000" +array(2) { + [0]=> + array(1) { + ["id"]=> + string(1) "1" + } + [1]=> + array(1) { + ["id"]=> + string(1) "2" + } +} +array(1) { + [0]=> + array(1) { + ["value"]=> + string(1) "1" + } +} +bool(false) +string(5) "42000" +array(2) { + [0]=> + array(1) { + ["id"]=> + string(1) "1" + } + [1]=> + array(1) { + ["id"]=> + string(1) "2" + } +} +array(1) { + [0]=> + array(1) { + ["value"]=> + string(1) "1" + } +} +done! + diff --git a/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt b/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt index 17fa5d6059..f3d0fa6313 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt @@ -3,6 +3,11 @@ PDO MySQL specific class constants --SKIPIF-- <?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); +if (!extension_loaded('mysqli') && !extension_loaded('mysqlnd')) { + /* Need connection to detect library version */ + require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + MySQLPDOTest::skip(); +} ?> --FILE-- <?php @@ -21,6 +26,7 @@ require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); "MYSQL_ATTR_SSL_CAPATH" => true, "MYSQL_ATTR_SSL_CIPHER" => true, "MYSQL_ATTR_COMPRESS" => true, + "MYSQL_ATTR_MULTI_STATEMENTS" => true, ); if (!MySQLPDOTest::isPDOMySQLnd()) { @@ -29,6 +35,19 @@ require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); $expected['MYSQL_ATTR_READ_DEFAULT_GROUP'] = true; } + if (extension_loaded('mysqlnd')) { + $expected['MYSQL_ATTR_SERVER_PUBLIC_KEY'] = true; + } else if (extension_loaded('mysqli')) { + if (mysqli_get_client_version() > 50605) { + $expected['MYSQL_ATTR_SERVER_PUBLIC_KEY'] = true; + } + } else if (MySQLPDOTest::getClientVersion(MySQLPDOTest::factory()) > 50605) { + /* XXX the MySQL client library version isn't exposed with any + constants, the single possibility is to use the PDO::getAttribute(). + This however will fail with no connection. */ + $expected['MYSQL_ATTR_SERVER_PUBLIC_KEY'] = true; + } + /* TODO diff --git a/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt b/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt new file mode 100644 index 0000000000..f327aa4089 --- /dev/null +++ b/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt @@ -0,0 +1,261 @@ +--TEST-- +MySQL PDOStatement->nextRowSet() with PDO::MYSQL_ATTR_MULTI_STATEMENTS either true or false +--SKIPIF-- +<?php +require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +MySQLPDOTest::skip(); +$db = MySQLPDOTest::factory(); +$row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC); +$matches = array(); +if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches)) + die(sprintf("skip Cannot determine MySQL Server version\n")); + +$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2]; +if ($version < 50000) + die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n", + $matches[0], $matches[1], $matches[2], $version)); + +if (!MySQLPDOTest::isPDOMySQLnd()) + die("skip This will not work with libmysql"); +?> +--FILE-- +<?php + require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + $db = MySQLPDOTest::factory(); + $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); + + MySQLPDOTest::createTestTable($db); + + function test_proc($db) { + + $db->exec('DROP PROCEDURE IF EXISTS p'); + $db->exec('CREATE PROCEDURE p() BEGIN SELECT id FROM test ORDER BY id ASC LIMIT 3; SELECT id, label FROM test WHERE id < 4 ORDER BY id DESC LIMIT 3; END;'); + $stmt = $db->query('CALL p()'); + do { + var_dump($stmt->fetchAll(PDO::FETCH_ASSOC)); + } while ($stmt->nextRowSet()); + var_dump($stmt->nextRowSet()); + + } + + try { + + // Using native PS for proc, since emulated fails. + printf("Native PS...\n"); + foreach (array(false, true) as $multi) { + $value = $multi ? 'true' : 'false'; + echo "\nTesting with PDO::MYSQL_ATTR_MULTI_STATEMENTS set to {$value}\n"; + $dsn = MySQLPDOTest::getDSN(); + $user = PDO_MYSQL_TEST_USER; + $pass = PDO_MYSQL_TEST_PASS; + $db = new PDO($dsn, $user, $pass, array(PDO::MYSQL_ATTR_MULTI_STATEMENTS => $multi)); + $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); + $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1); + $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0); + test_proc($db); + + $db = new PDO($dsn, $user, $pass, array(PDO::MYSQL_ATTR_MULTI_STATEMENTS => $multi)); + $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); + $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 0); + $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0); + + test_proc($db); + + // Switch back to emulated prepares to verify multi statement attribute. + $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1); + // This will fail when $multi is false. + $stmt = $db->query("SELECT * FROM test; INSERT INTO test (id, label) VALUES (99, 'x')"); + if ($stmt !== false) { + $stmt->closeCursor(); + } + $info = $db->errorInfo(); + var_dump($info[0]); + } + @$db->exec('DROP PROCEDURE IF EXISTS p'); + + } catch (PDOException $e) { + printf("[001] %s [%s] %s\n", + $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo())); + } + + print "done!"; +?> +--CLEAN-- +<?php +require dirname(__FILE__) . '/mysql_pdo_test.inc'; +MySQLPDOTest::dropTestTable(); +?> +--EXPECTF-- +Native PS... + +Testing with PDO::MYSQL_ATTR_MULTI_STATEMENTS set to false +array(3) { + [0]=> + array(1) { + ["id"]=> + string(1) "1" + } + [1]=> + array(1) { + ["id"]=> + string(1) "2" + } + [2]=> + array(1) { + ["id"]=> + string(1) "3" + } +} +array(3) { + [0]=> + array(2) { + ["id"]=> + string(1) "3" + ["label"]=> + string(1) "c" + } + [1]=> + array(2) { + ["id"]=> + string(1) "2" + ["label"]=> + string(1) "b" + } + [2]=> + array(2) { + ["id"]=> + string(1) "1" + ["label"]=> + string(1) "a" + } +} +bool(false) +array(3) { + [0]=> + array(1) { + ["id"]=> + string(1) "1" + } + [1]=> + array(1) { + ["id"]=> + string(1) "2" + } + [2]=> + array(1) { + ["id"]=> + string(1) "3" + } +} +array(3) { + [0]=> + array(2) { + ["id"]=> + string(1) "3" + ["label"]=> + string(1) "c" + } + [1]=> + array(2) { + ["id"]=> + string(1) "2" + ["label"]=> + string(1) "b" + } + [2]=> + array(2) { + ["id"]=> + string(1) "1" + ["label"]=> + string(1) "a" + } +} +bool(false) +string(5) "42000" + +Testing with PDO::MYSQL_ATTR_MULTI_STATEMENTS set to true +array(3) { + [0]=> + array(1) { + ["id"]=> + string(1) "1" + } + [1]=> + array(1) { + ["id"]=> + string(1) "2" + } + [2]=> + array(1) { + ["id"]=> + string(1) "3" + } +} +array(3) { + [0]=> + array(2) { + ["id"]=> + string(1) "3" + ["label"]=> + string(1) "c" + } + [1]=> + array(2) { + ["id"]=> + string(1) "2" + ["label"]=> + string(1) "b" + } + [2]=> + array(2) { + ["id"]=> + string(1) "1" + ["label"]=> + string(1) "a" + } +} +bool(false) +array(3) { + [0]=> + array(1) { + ["id"]=> + string(1) "1" + } + [1]=> + array(1) { + ["id"]=> + string(1) "2" + } + [2]=> + array(1) { + ["id"]=> + string(1) "3" + } +} +array(3) { + [0]=> + array(2) { + ["id"]=> + string(1) "3" + ["label"]=> + string(1) "c" + } + [1]=> + array(2) { + ["id"]=> + string(1) "2" + ["label"]=> + string(1) "b" + } + [2]=> + array(2) { + ["id"]=> + string(1) "1" + ["label"]=> + string(1) "a" + } +} +bool(false) +string(5) "00000" +done! diff --git a/ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt b/ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt index eb0fff13e6..5990ab812e 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt @@ -64,7 +64,7 @@ MySQLPDOTest::skip(); $tmp = $stmt->fetch(PDO::FETCH_ASSOC); $con1 = $tmp['_con1']; - $db2 = new PDO($dsn, $user, $pass, array(PDO::ATTR_PERSISTENT => true)); + @$db2 = new PDO($dsn, $user, $pass, array(PDO::ATTR_PERSISTENT => true)); $stmt = $db2->query('SELECT CONNECTION_ID() as _con2'); $tmp = $stmt->fetch(PDO::FETCH_ASSOC); $con2 = $tmp['_con2']; @@ -94,4 +94,4 @@ MySQLPDOTest::skip(); print "done!"; ?> --EXPECTF-- -done!
\ No newline at end of file +done! diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt index 7996245431..9165e70551 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt @@ -1,5 +1,7 @@ --TEST-- MySQL PDOStatement->nextRowSet() +--XFAIL-- +nextRowset() problem with stored proc & emulation mode & mysqlnd --SKIPIF-- <?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); @@ -310,4 +312,4 @@ array(3) { } } bool(false) -done!
\ No newline at end of file +done! diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt index c34f4a9d35..e58d4a6578 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt @@ -1,5 +1,7 @@ --TEST-- MySQL Prepared Statements and different column counts +--XFAIL-- +nextRowset() problem with stored proc & emulation mode & mysqlnd --SKIPIF-- <?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); @@ -120,4 +122,4 @@ if ($version < 50000) print "done!"; ?> --EXPECTF-- -done!
\ No newline at end of file +done! |
