PHP  
 PHP_5_5
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/pdo_odbc/tests/pdo_033.phpt ('ODBC PDO Common: PDO::quote()')

Script

1: <?php
2:
if (getenv('REDIR_TEST_DIR') === falseputenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/');
3: require_once 
getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
4:
$db PDOTest::factory();
5:
6:
$unquoted ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~';
7:
8:
$quoted $db->quote($unquoted);
9:
10:
$len strlen($unquoted);
11:
12: @
$db->exec("DROP TABLE test");
13:
14:
$db->query("CREATE TABLE test (t char($len))");
15:
$db->query("INSERT INTO test (t) VALUES($quoted)");
16:
17:
$stmt $db->prepare('SELECT * from test');
18:
$stmt->execute();
19:
20:
print_r($stmt->fetchAll(PDO::FETCH_ASSOC));
21:
22:
$db->exec("DROP TABLE test");
23:
24:
?>
25:

Expected

Array
(
    [0] => Array
        (
            [t] =>  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
        )

)

Output

Warning: PDO::query(): SQLSTATE[HY000]: General error: 1136 [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]Column count doesn't match value count at row 1 (SQLExecute[1136] at /var/php_gcov/PHP_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_033.php on line 15
Array
(
)

Diff

# original source file: ext/pdo/tests/pdo_033.phpt
001+ Warning: PDO::query(): SQLSTATE[HY000]: General error: 1136 [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]Column count doesn't match value count at row 1 (SQLExecute[1136] at /var/php_gcov/PHP_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_033.php on line 15
003-     [0] => Array
004-         (
005-             [t] =>  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
006-         )
007- 

 

Generated at Tue, 26 Aug 2014 07:13:55 +0000 (29 hours ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.