|P is for Practical|
fetchall_arrayref hangs with placeholders query with no resultsby TieUpYourCamel (Scribe)
|on Apr 15, 2021 at 14:39 UTC||Need Help??|
TieUpYourCamel has asked for the wisdom of the Perl Monks concerning the following question:
I have a situation with DBI and the Sybase drivers. If I specify a TDS level, and I use a query with placeholders, and that query returns no results, the fetchall_arrayref() call hangs. If I don't do all three of those things, the call returns an array, as expected.
Steps to reproduce on Ubuntu 20.04:
Install DBI and Sybase
run test script
The test code above runs a total of six queries with different combinations of (1) specifying the TDS level (2), running a query with or without placeholders , and (3) running a query that does or does not return results. The test query that produces the hang is run last.
Full disclosure: I first wrote this test script on one computer and then created a virtual machine to test the "steps to reproduce" shown above. On the second computer, the connection with no TDS level specified does not work. However, I believe this to be a separate issue.
The SQL Server here is MS SQL Server Standard version 12.0.5223.6