The Arithmetic Overflow Warning thrown by SQL Server does not provide line number or error description in Aqua Data Studio whereas it does in SQL Server Management Studio. Would there be a way to incorporate better information regarding this warning in ADS to improve debugging focus?
|
29 KB
|
76 KB
|
184 KB
Executing this :
select 1, 1/0
go
select 1, 2
select 1, 1/0
go
Gives results of this :
>[Error] Script lines: 1-2 --------------------------
Divide by zero error encountered.
Msg: 8134, Level: 16, State: 1, Procedure: , Line: 1
[Executed: 4/29/2014 10:37:08 AM] [Execution: 1ms]
>[Error] Script lines: 3-6 --------------------------
Divide by zero error encountered.
[Executed: 4/29/2014 10:37:08 AM] [Execution: 1ms]
Looks like the jTDS JDBC driver is not returning the line number for some queries. We will need to trace the jTDS source code.
Where this is problematic for me is when the warning gets thrown when a stored procedure execution completes. I have no way of knowing where the warning was encountered during execution.
Where this is problematic for me is when the warning gets thrown when a stored procedure execution completes. I have no way of knowing where the warning was encountered during execution.
SVN r#4439 (Pune v18 ADS component branch) :
Showing line number in error message.Fixed.
SVN r#4439 (Pune v18 ADS component branch) :
Showing line number in error message.Fixed.
Verified in ADS- 18.0.dev-13. Refer updated screenshot '11981-ADS-18-dev-13.png' file
Verified in ADS- 18.0.dev-13. Refer updated screenshot '11981-ADS-18-dev-13.png' file
I have created new directory for jtds code,called as aqua-jtds in the Pune v18 ADS component branch.Added all source code from GitHub , Also made necessary changes to show the line number in error message and checked-in with SVN r#8056(Pune v18 ADS component branch) .
Also checked-in newly changed jtds jars in to the Pune v18 trunk with SVN r#8080
I have created new directory for jtds code,called as aqua-jtds in the Pune v18 ADS component branch.Added all source code from GitHub , Also made necessary changes to show the line number in error message and checked-in with SVN r#8056(Pune v18 ADS component branch) .
Also checked-in newly changed jtds jars in to the Pune v18 trunk with SVN r#8080
Verified in ADS- 18.0.dev-146. Refer updated screenshot 'Updated11981-ADS-18-dev-146.png' file
Verified in ADS- 18.0.dev-146. Refer updated screenshot 'Updated11981-ADS-18-dev-146.png' file
This fix caused the following issue:
Execute the below SQL:
DECLARE @COUNT INT = 0 WHILE(@COUNT < 5) BEGIN print(@COUNT) SET @COUNT = @COUNT + 1 END
After the fix, the output is as shown below. This output is incorrect.
======
Command was executed successfully
Warnings: --->
W (1): Id 0, Level 0, State 1, Line 5
0
W (2): Id 0, Level 0, State 1, Line 5
1
W (3): Id 0, Level 0, State 1, Line 5
2
W (4): Id 0, Level 0, State 1, Line 5
3
W (5): Id 0, Level 0, State 1, Line 5
4
<---
[Executed: 9/20/2016 9:12:48 AM] [Execution: 9s]
======
Prior to the fix, the output was as shown below. This is the correct output.
Command was executed successfully Warnings: ---> W (1): 0 W (2): 1 W (3): 2 W (4): 3 W (5): 4 <--- [Executed: 9/20/2016 8:50:29 AM] [Execution: 14ms]
This fix caused the following issue:
Execute the below SQL:
DECLARE @COUNT INT = 0 WHILE(@COUNT < 5) BEGIN print(@COUNT) SET @COUNT = @COUNT + 1 END
After the fix, the output is as shown below. This output is incorrect.
======
Command was executed successfully
Warnings: --->
W (1): Id 0, Level 0, State 1, Line 5
0
W (2): Id 0, Level 0, State 1, Line 5
1
W (3): Id 0, Level 0, State 1, Line 5
2
W (4): Id 0, Level 0, State 1, Line 5
3
W (5): Id 0, Level 0, State 1, Line 5
4
<---
[Executed: 9/20/2016 9:12:48 AM] [Execution: 9s]
======
Prior to the fix, the output was as shown below. This is the correct output.
Command was executed successfully Warnings: ---> W (1): 0 W (2): 1 W (3): 2 W (4): 3 W (5): 4 <--- [Executed: 9/20/2016 8:50:29 AM] [Execution: 14ms]
Verified in ADS v18.0.0-devi-240 with the jtds Driver and output are the same now. Both issues are now resolved.
Verified in ADS v18.0.0-devi-240 with the jtds Driver and output are the same now. Both issues are now resolved.
Issue #11981 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 17.0.8-7, devi-144, SVN r#8056 |
No time estimate |
Executing this :
select 1, 1/0
go
select 1, 2
select 1, 1/0
go
Gives results of this :
>[Error] Script lines: 1-2 --------------------------
Divide by zero error encountered.
Msg: 8134, Level: 16, State: 1, Procedure: , Line: 1
[Executed: 4/29/2014 10:37:08 AM] [Execution: 1ms]
>[Error] Script lines: 3-6 --------------------------
Divide by zero error encountered.
[Executed: 4/29/2014 10:37:08 AM] [Execution: 1ms]
Looks like the jTDS JDBC driver is not returning the line number for some queries. We will need to trace the jTDS source code.