-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken PL/SQL snippets execute forever #31
Comments
I don't know why you don't have any result. I've tried to reproduce and I always have a result. So, I don't have vim hanging. Could you please check the logs, when VIM is hanging to see what is begin sent to the server. The log is located at In the above mentioned file you should see what the plugin sent to the
This I could reproduce, but it looks like a problem with
As you can see, The servers retrieves the proper query, but instead of the error message it returns directly without any output.
If you select the full sql, then the plugin will send the proper data to the To work-around this, you can set the The default delimiter ( |
To gain a better overview I deleted all tmp files, restartet vim and tried my example one more time. But this time it doesn't hang... Could the problem has hidden in my deleted tmp files? Now in my tmp directory I just have Btw. (Offtopic): Is it possible somehow to see the output of |
Normally that is just logging. Nothing is read from there. Maybe if the OS had a problem writing to those file, then VIM would have to wait for that (being single threaded)
Sorry. I forgot to mention. You have to activate it (the logging). Set 'g:sw_log_to_file` to 1, then restart VIM.
I am seeing the output without problems, after sending these queries:
This should work. |
Thank you for the quick response. dbms_output works now even after restarting VIM without any There must be some bug though. The execution of the PL/SQL runs always differently. (Occasionally correct). I tried to execute a slightly larger PLSQL multiple times and also to enable dbms_output. I also executed broken SQL (just one line of the script). Most of the time I got Ones after executing
VIM appeared to hang counting seconds. But after 1 minute it outputs the desired result. Here is the log:
Note 51.34s! Also I found, that after selecting multiple lines and executing those with
and after pressing ENTER the execution starts and then it works! But most of the time I get no such output. The execution starts immediately and then it doesn't work with |
What I do, is set it (the
Could you please also try this in the GUI of But I would say (judging by your log), that the problem is with the Even more, you can run
Same thing: Could you check the log and see what happens? Thank you. |
The plugin, runs in the background an |
I had the long counting seconds again. I send broken SQL
UPDATE:
|
Ok, it looks, that the finished report saved me last time from hanging forever. Now as I send Log:
|
Checking the log here, it seems that the delimiter is not sent to the server. Do you have a reproductible scenario? Do you know exactly what select you've send and in which context? Because if I just do
Could you please also check in the console version of
Again, could you please check in the console version of
I am not sure I understand exactly what you mean here. |
I will do it later on. One quick note: if I select a part of SQL the delimiter is not always selected. ExecuteSelected (which I vmap to ctrl+space) doesn't add delimiter if it is not present. Right? |
Ok, if I select a line with just a single word
In the log file it looks like this:
I simulated it with the console and was indeed able to reproduce the problem:
It turns out, that if you send
|
And #34. Yes. |
The bug
Create a file with the content:
BEGIN
dbms_output.put_line('Test');
a;
END;
/
Put the cursor on the 'a' line and press
<leader><ctrl>-2
to execute a query.IS: The query starts executing and executes for very long time. Message printed (counting seconds):
Further investigations
Ignoring the counting seconds message I tried to rerun the query multiple times. I got different results
Restarting VIM (important) and rerunning the query but this time selecting everything in the file (
ggVG <leader><ctrl>+2
) delivered the desired results:Conclusion
I think, the problem is somewhere in the detection of the PL/SQL block boundaries.
But the actual bug is, that even if the boundaries are wrong and a peace of junk
was send for execution, the plugin should not hang (counting seconds) but provide
some error message.
Also there should be an official way of canceling the current running query, if the execution
indeed takes longer, as expected.
The text was updated successfully, but these errors were encountered: