I was debugging a SQL query when I ran across a strange error. After some work we obtained the following minimal query to cause the bug.
select /** :'*/ dummy --'
from dual;
Running this in VS Code with the extension Oracle Developer Tools for VS Code (SQL and PLSQL) v21.5.0 results in the following error.
TTCExecuteSql:ReceiveExecuteResponse - Unexpected Packet received.
The query runs entirely fine in SQL Developer on the same databases. I have run this against multiple 19c databases, and one 12c database as well.
Any character in the comments of the query can be removed and the query will run correctly. Almost any character can be replaced with 'a' and the query will run as well--except for the space after the colon.
I can fix the error by removing parts of the offending query. Strangely enough, you can insert a lot of text within the comments and the error will persist. We originally found the error in a working query.
Why does this happen, and how can it be fixed?