diff options
author | Wez Furlong <wez@php.net> | 2005-07-14 02:21:03 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-07-14 02:21:03 +0000 |
commit | 8c446726cf4dbd2f7ecae552c99216f5d4ea2d3a (patch) | |
tree | 961bb2100f6e7d569a39355484777ac083795d94 /ext/pdo_mysql/tests | |
parent | fc48f9096d3530fc6d33891a96f690fbe190fb69 (diff) | |
download | php-git-8c446726cf4dbd2f7ecae552c99216f5d4ea2d3a.tar.gz |
Add test case
Diffstat (limited to 'ext/pdo_mysql/tests')
-rw-r--r-- | ext/pdo_mysql/tests/bug_33689.phpt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/ext/pdo_mysql/tests/bug_33689.phpt b/ext/pdo_mysql/tests/bug_33689.phpt new file mode 100644 index 0000000000..5d584a36f9 --- /dev/null +++ b/ext/pdo_mysql/tests/bug_33689.phpt @@ -0,0 +1,47 @@ +--TEST-- +PDO MySQL Bug #33689 +--SKIPIF-- +<?php # vim:ft=php +if (!extension_loaded('pdo_mysql')) print 'skip not loaded'; +?> +--FILE-- +<?php +require 'ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory('ext/pdo_mysql/tests/common.phpt'); + +$db->exec('CREATE TABLE test (bar INT NOT NULL)'); +$db->exec('INSERT INTO test VALUES(1)'); + +var_dump($db->query('SELECT * from test')); +foreach ($db->query('SELECT * from test') as $row) { + print_r($row); +} + +$stmt = $db->prepare('SELECT * from test'); +print_r($stmt->getColumnMeta(0)); +$stmt->execute(); +print_r($stmt->getColumnMeta(0)); + +--EXPECTF-- +object(PDOStatement)#%d (1) { + ["queryString"]=> + string(18) "SELECT * from test" +} +Array +( + [bar] => 1 + [0] => 1 +) +Array +( + [native_type] => LONG + [flags] => Array + ( + [0] => not_null + ) + + [name] => bar + [len] => 11 + [precision] => 0 + [pdo_type] => 2 +) |