v16 uses the same jtds driver as v15.
AQDebugSessionStateImpl.java Line 141. Cause of NPE...
AQDebugSessionStateImpl.java Line 141. Cause of NPE...
Bug occurs in ADS-16-dev-21, but not latest 15.0 builds. Problem was caused in 16 code changes between 10/3/2014 and 10/31/2014. Changes were made to DebugTarget.java and DebugeeThread.java. Changes were made by Ivan but they were minor. The changes to DebugTarget.java probably caused the bug. It was a fix made to fix issue #12576. See line 155.
Bug occurs in ADS-16-dev-21, but not latest 15.0 builds. Problem was caused in 16 code changes between 10/3/2014 and 10/31/2014. Changes were made to DebugTarget.java and DebugeeThread.java. Changes were made by Ivan but they were minor. The changes to DebugTarget.java probably caused the bug. It was a fix made to fix issue #12576. See line 155.
I have made changes that will fix this code to run as it used to except for sybase ASE 16, where it will check to see if the object is an instance of a function. Sybase ASE 16 added the create function statement and we needed to have the ScriptFunction.xxx run instead of scriptProcedure.xxx when its syb ase 16 function object. I am not sure if this is the best way about going about this but it will fix the issue.
the change made is to DebugTarget.java line 159
I have made changes that will fix this code to run as it used to except for sybase ASE 16, where it will check to see if the object is an instance of a function. Sybase ASE 16 added the create function statement and we needed to have the ScriptFunction.xxx run instead of scriptProcedure.xxx when its syb ase 16 function object. I am not sure if this is the best way about going about this but it will fix the issue.
the change made is to DebugTarget.java line 159
@tariq: Ivan's fix will be in rc-9. pls verify
@tariq: Ivan's fix will be in rc-9. pls verify
If I remember correctly, DebugTarget.java uses ScriptProcedure.debuggerScriptEXECUTE as the starting point to generate debug execute scripts. The idea is to collect all debug-specific script generation code in one place. If you look at the content of ScriptProcedure.debuggerScriptEXECUTE, you will notice it starts with a special section for Sybase ASE, but it simply calls ScriptProcedure.scriptEXECUTEBIND for all other databases.
Also, note that from an object modeling perspective, an AFFunction is an AFProcedure.
The fact that Ivan needed to call ScriptFunction.scriptEXECUTE (which is just a wrapper of ScriptProcedure.scriptEXECUTE) in DebugTarget.java for Sybase ASE 16 functions meant that the special section for Sybase ASE in ScriptProcedure.debuggerScriptEXECUTE did not work for Sybase ASE 16 for debug purpose.
Therefore, may be a better way is to understand why that special section doesn't work - either merge the relevant code in ScriptProcedure.scriptEXECUTE into the special section, or have another special Sybase ASE 16 -only section in ScriptProcedure.debuggerScriptEXECUTE. In this case, we continue to keep the original intent of separating debug execution scripts code.
If I remember correctly, DebugTarget.java uses ScriptProcedure.debuggerScriptEXECUTE as the starting point to generate debug execute scripts. The idea is to collect all debug-specific script generation code in one place. If you look at the content of ScriptProcedure.debuggerScriptEXECUTE, you will notice it starts with a special section for Sybase ASE, but it simply calls ScriptProcedure.scriptEXECUTEBIND for all other databases.
Also, note that from an object modeling perspective, an AFFunction is an AFProcedure.
The fact that Ivan needed to call ScriptFunction.scriptEXECUTE (which is just a wrapper of ScriptProcedure.scriptEXECUTE) in DebugTarget.java for Sybase ASE 16 functions meant that the special section for Sybase ASE in ScriptProcedure.debuggerScriptEXECUTE did not work for Sybase ASE 16 for debug purpose.
Therefore, may be a better way is to understand why that special section doesn't work - either merge the relevant code in ScriptProcedure.scriptEXECUTE into the special section, or have another special Sybase ASE 16 -only section in ScriptProcedure.debuggerScriptEXECUTE. In this case, we continue to keep the original intent of separating debug execution scripts code.
Re-opening for Ivan to investigate Kin-Hong's comments
Re-opening for Ivan to investigate Kin-Hong's comments
I've seperated the scripting specific code from debugtarget to scriptprocudure. Inside script procedure we do the check to see if the object is an instance of affunction and the connection is sybase ase 16. If this is the case it will fire scriptexecute, the special section of code for sybase ase before was only working with procedures. This section of code will only affect how sybase ase function is called, fixing the poor call on functions calls for other databases. Should no longer get the NPE exception.
I've seperated the scripting specific code from debugtarget to scriptprocudure. Inside script procedure we do the check to see if the object is an instance of affunction and the connection is sybase ase 16. If this is the case it will fire scriptexecute, the special section of code for sybase ase before was only working with procedures. This section of code will only affect how sybase ase function is called, fixing the poor call on functions calls for other databases. Should no longer get the NPE exception.
Issue #13115 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build v16.0.0-rc-10 |
No time estimate |
4 issue links |
is a duplicate of #12659
Issue #12659SQLSERVER 2014: Exception is thrown on Debug Function in Debugger. |
is broken by #12576
Issue #12576Sybase ASE 16 : Alter Table: In Row sql script is generated though we didn't alter it. |
relates to #12659
Issue #12659SQLSERVER 2014: Exception is thrown on Debug Function in Debugger. |
relates to #12576
Issue #12576Sybase ASE 16 : Alter Table: In Row sql script is generated though we didn't alter it. |
v16 uses the same jtds driver as v15.