Steps to Reproduce:
Note that this is very extreme case of rendering 19K grids.
-- Declare a cursor for a Table or a View 'Address' in schema 'Person'
DECLARE @Column1 NVARCHAR(50), @Column2 NVARCHAR(50)
DECLARE db_cursor CURSOR FOR
SELECT addr.City, addr.AddressID
FROM Person.Address addr
OPEN db_cursor
FETCH NEXT FROM db_cursor INTO @Column1, @Column2
WHILE @@FETCH_STATUS = 0
BEGIN
-- add instructions to be executed for every row
SELECT @Column1, @Column2
FETCH NEXT FROM db_cursor INTO @Column1, @Column2
END
CLOSE db_cursor
DEALLOCATE db_cursor
GO
Executing the same using a PRINT-Statement several times (the first two times it works and quite fast, the third time it slows down and eventually crashes) in the same session may also lead to hangs and a crash.
-- Declare a cursor for a Table or a View 'Address' in schema 'Person'
DECLARE @Column1 NVARCHAR(50), @Column2 NVARCHAR(50)
DECLARE db_cursor CURSOR FOR
SELECT addr.City, addr.AddressID
FROM Person.Address addr
OPEN db_cursor
FETCH NEXT FROM db_cursor INTO @Column1, @Column2
WHILE @@FETCH_STATUS = 0
BEGIN
-- add instructions to be executed for every row
PRINT @Column1 + N';' + @Column2
FETCH NEXT FROM db_cursor INTO @Column1, @Column2
END
CLOSE db_cursor
DEALLOCATE db_cursor
GO
Just wanted to note that I can reproduce the same behavior and make the application generally unresponsive with a much smaller set.
Version 0.27.3
Commit 9474415ad68b5a70e8b851698c8c836664a9d5b5
Date 2018-03-27T05:25:59.481Z
Shell 1.7.11
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
-- repro1.sql
select *
from sys.objects
go 20
--repro2.sql
select *
from sys.objects
There are 268 rows in sys.objects on this server.
Here's an example of me clicking between the two tabs while this is running.
https://i.imgur.com/nZ0yLla.gif
This should be fixed in the next release
Most helpful comment
This should be fixed in the next release