Skip Menu |

This queue is for tickets about the DBD-Sybase CPAN distribution.

Report information
The Basics
Id: 92963
Status: new
Priority: 0/
Queue: DBD-Sybase

People
Owner: Nobody in particular
Requestors: sferencik [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.15
Fixed in: (no value)



Subject: exec.t - 'execute fail mode 3' failing
In exec.t, the 'execute fail mode 3' test is failing. I have debugged into it and I can't see how it could actually be passing for anyone. I wonder if the expected value of the test shouldn't be *inverted*, i.e. we should expect the execute to fail rather than to succeed. Here is what I see happening: 0001 $sth->{syb_do_proc_status} = 1; 0002 $dbh->{syb_flush_finish} = 0; 0003 # ... 0004 $rc = $sth->execute("raise", 1, 3.2234, "jan 3 2001", 5.4); 0005 # ... 0006 get_all_results($sth); 0007 $rc = $sth->execute(undef, 0, 3.2234, "jan 3 2001", 5.4); In line 4 we call the dbitest procedure. It returns the value of @two, which in this case is 1. This means an error state for the procedure. Of course, execute() itself succeeds, as described in the DBD-Sybase docs for syb_do_proc_status, but we then proceed to fetch all the results (line 6), and the last fetch returns the non-zero return status of dbitest(). This non-zero return status is fetched in st_next_result. We then check that restype == CS_PARAM_RESULT (== 4042) and set the failFlag. Then, based on the failFlag, we call syb_st_finish(). Yes, this actually finishes the $sth. As a result, the subsequent call to execute (line 7) refuses to ct_send. My question is: should we A) rebase the test, expecting the execute on line 7 to fail? B) try to fix this in DBD-Sybase so that we don't finish the statement handle? Any comments welcome. Thanks, Sam