You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PDO::FETCH_KEY_PAIR on a result with a number of columns other than two throws a different exception message/shape than php. #301
PDO::FETCH_KEY_PAIR on a result with a number of columns other than two throws a different exception message/shape than php.
Repro
<?php$db = newPDO('sqlite::memory:', null, null, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
$st = $db->query('select 1 as a, 2 as b, 3 as c');
try { $st->fetchAll(PDO::FETCH_KEY_PAIR); } catch (PDOException$e) { echo$e->getMessage(), '', json_encode($e->errorInfo), "\n"; }
Expected (php)
SQLSTATE[HY000]: General error: PDO::FETCH_KEY_PAIR fetch mode requires the result set to contain exactly 2 columns. ["HY000",0]
Actual (manticore e1d451af, Darwin arm64)
PDO::FETCH_KEY_PAIR needs a result set with exactly 2 columns null
Tracking
Known-bug repro: tests/aot/repro/wrong/pdo_fetch_key_pair_wrong_column_count_message.php — bash tests/aot/xfail.sh -k pdo_fetch_key_pair_wrong_column_count_message reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.
Activity