Track down a failed test


MySQL PDO->exec(), affected rows [ext/pdo_mysql/tests/pdo_mysql_exec.phpt]
Files generated when a test fails

~> ls ext/pdo_mysql/tests/pdo_mysql_exec.*
ext/pdo_mysql/tests/pdo_mysql_exec.diff
ext/pdo_mysql/tests/pdo_mysql_exec.exp
ext/pdo_mysql/tests/pdo_mysql_exec.log
ext/pdo_mysql/tests/pdo_mysql_exec.out
ext/pdo_mysql/tests/pdo_mysql_exec.php
ext/pdo_mysql/tests/pdo_mysql_exec.phpt
ext/pdo_mysql/tests/pdo_mysql_exec.sh*
Check the diff

~> cat ext/pdo_mysql/tests/pdo_mysql_exec.diff
003+ [020] Expecting '0'/integer got '1'/integer when running 'CALL p(@version)', [00000] 00000 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'THIS IS NOT VALID SQL, I HOPE' at line 1
Run the test program

~> ext/pdo_mysql/tests/pdo_mysql_exec.sh

Warning: PDO::exec(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'THIS IS NOT VALID SQL, I HOPE' at line 1 in /home/rasmus/src/54/ext/pdo_mysql/tests/pdo_mysql_exec.php on line 6
[016] [42000] 42000 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'THIS IS NOT VALID SQL, I HOPE' at line 1
[020] Expecting '0'/integer got '1'/integer when running 'CALL p(@version)', [00000] 00000 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'THIS IS NOT VALID SQL, I HOPE' at line 1
[035] With emulated PS it works but makes no sense given that exec() returns sort of affected rows...
done!
Fix the test

Then re-run tests just for that section

~> make test TESTS=ext/pdo_mysql