Bug #20171 t/prepare_noerror.t failure with mysql 4.0.x
Submitted: 31 May 2006 17:00 Modified: 19 Mar 2007 21:09
Reporter: Ray Zimmerman Email Updates:
Status: Closed Impact on me:
None 
Category:Connectors: DBD::mysql ( Perl ) Severity:S3 (Non-critical)
Version:3.0003, 3.0004 OS:Linux (Linux)
Assigned to: Jim Winstead CPU Architecture:Any

[31 May 2006 17:00] Ray Zimmerman
Description:
I'm getting a "not ok" for test 2 of t/prepare_noerror.t when run against a 4.0.27 server on Linux. All other tests pass.

Identical results when running the tests on 3 different machines connecting to the same Linux server:

    local client, 4.0.27 client libs, Linux
    remote client, 4.1.12 client libs, Linux
    remote client, 4.1.19 client libs, Mac OS X

How to repeat:
With a 4.0.27 server running ...

1. perl Makefile.PL
2. make
3. make test TEST_VERBOSE=1 TEST_FILES="t/prepare_noerror.t"
[31 May 2006 21:14] Valeriy Kravchuk
Thank you for a problem report. As far as I remember, version 3.0004 (not sure about 3.0003) has server-side prepared statements support enabled by default. While support for server-side prepared statements was added only in MySQL 4.1.

So, please, check with a newer versions of MySQL server (4.1.19, e.g.) or try to disable server-side prepared statements support and run tests again. Inform about the results.
[1 Jun 2006 14:46] Ray Zimmerman
According to the release announcements both 3.0003 and 3.0004 have server-side prepare statements turned off by default (3.0003_1 and 3.0004_1 have them on by default).

However, I did forget to mention that I verified that the tests pass fine for me when connecting to a 4.1.x server from the same client, so it is related to the older server.

Should this test be skipped completely for older servers?
[1 Jun 2006 14:52] Ray Zimmerman
Actually, while the drivers 3.0003, 3.0004 have server-side prepared statements turned off by default, it looks like this test turns it on explicitly ...

$dbh = DBI->connect("$test_dsn;mysql_server_prepare=1", $test_user, $test_password,
                           {RaiseError => 0})

Again, it appears to me that maybe the whole point of this test is irrelevant for older servers, and the test should simply be skipped in that case.
[1 Jun 2006 19:46] Valeriy Kravchuk
So, t/prepare_noerror.t test should be skipped for 4.0.x and 3.23.x versions of MySQL server. I'd call this a reasonable feature request.
[1 Jun 2006 21:45] Ray Zimmerman
Well, a failing test sounds like a bug to me, not a feature request ... a bug in the test suite, but a bug nevertheless.
[19 Mar 2007 21:09] Jim Winstead
This test is skipped on pre-4.1 servers. (It is not expected to pass, since it relies on features not supported by such old versions.)