IP Library › Granted Patent US 9,823,995
Granted Patent B2
US 9,823,995 · App. 14/471,453 · Granted Nov 21, 2017

Structured query language debugger

Inventors: Tamir Menahem (Ramat Gan, IL); Ohad Navon (Kiryat Tivon, IL); Amiram Wingarten (Rehovot, IL); Inbal Zilberman Kubovsky (Ramat Gan, IL)
Assignee: SAP SE
G06F11/362G06F11/3636G06F11/3664
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,823,995
App. No.
14/471,453
Granted
Nov 21, 2017
Kind
B2
Abstract

The present disclosure describes methods, systems, and computer program products for debugging structured query language (SQL) statements. One computer-implemented method includes receiving a request to fetch a debug execution plan considering different structured query language (SQL) execution optimization levels and including a mapping for a SQL statement, receiving a request to initialize a debugging process of the SQL statement, verifying received and attached filter criteria provided using a SQL debug channel, setting SQL statement breakpoints, triggering the SQL statement, transmitting a notification that a SQL process is attached to a debugger associated and ready for external execution control, providing state details and an intermediate result upon reaching a particular breakpoint associated with the SQL process, providing an ability to change the process state and influence the process, and providing a SQL final execution response after reaching the end of the execution of the triggered SQL statement.

Claims (57)

1. A computer-implemented method, comprising:

receiving a request to fetch a debug execution plan, the debug execution plan comprising a plurality of structured query language (SQL) execution optimization levels, a mapping for a SQL statement, and a plurality of plan operators;

receiving a request to initialize a debugging process of the SQL statement based on the debug execution plan;

verifying filter criteria comprising received filter criteria and attached filter criteria the filter criteria being customized based on properties provided using a SQL debug channel distinct from a unidirectional communicative SQL execution channel, the SQL debug channel supporting bi-directional communication with a client-side SQL debugger and used by a server-side SQL debugger to issue commands to a SQL query engine to assume control over execution of the SQL statement;

setting breakpoints associated with the SQL statement based on the debug execution plan, before or after the execution of each of the plurality of plan operators;

triggering the SQL statement;

transmitting a notification that a SQL process associated with the SQL statement is attached to a debugger associated with the debugging process and ready for external execution control;

providing information associated with a process state and an intermediate result upon reaching a particular breakpoint associated with a portion of the SQL process executing the triggered SQL statement, the process state comprising one of the plurality of plan operators associated with the portion of the SQL process and a related original portion of the SQL process;

receiving, during a suspension of execution of the SQL process, a change to the process state to influence the SQL process indicated by the mapping that provides a match between the change to the process and the portion of the SQL process; and

providing a SQL final execution response after reaching an end of the debug execution plan for the SQL statement.

2. The method of claim 1 , comprising loading a SQL debug view of the selected SQL statement based on the debug execution plan.

3. The method of claim 1 , wherein the debugging process is associated with a plurality of contexts.

4. The method of claim 3 , comprising:

viewing intermediate results; and

evaluating expressions associated with the SQL process based on the intermediate results, a context of the plurality of contexts, data tables in a data store, and a context change which influences the rest of debugged process execution.

5. The method of claim 1 , wherein newly attached filter criteria overrides previous filter criteria as long as the debugging process is active.

6. The method of claim 1 , comprising initializing a query engine to execute the SQL statement using the debug execution plan and filter criteria.

7. The method of claim 1 , comprising providing a break notification when a particular breakpoint associated with the SQL statement is reached.

8. A non-transitory, computer-readable medium storing computer-readable instructions executable by a computer and configured to:

receive a request to fetch a debug execution plan, the debug execution plan comprising a plurality of structured query language (SQL) execution optimization levels, a mapping for a SQL statement, and a plurality of plan operators;

receive a request to initialize a debugging process of the SQL statement based on the debug execution plan;

verify filter criteria comprising received filter criteria and attached filter criteria, the filter criteria being customized based on properties provided using a SQL debug channel distinct from a unidirectional communicative SQL execution channel, the SQL debug channel supporting bi-directional communication with a client-side SQL debugger and used by a server-side SQL debugger to issue commands to a SQL query engine to assume control over execution of the SQL statement;

set breakpoints associated with the SQL statement based on the debug execution plan, before or after the execution of each of the plurality of plan operators;

trigger the SQL statement;

transmit a notification that a SQL process associated with the SQL statement is attached to a debugger associated with the debugging process and ready for external execution control;

provide information associated with a process state and an intermediate result upon reaching a particular breakpoint associated with a portion of the SQL process executing the triggered SQL statement, the process state comprising one of the plurality of plan operators associated with the portion of the SQL process and a related original portion of the SQL process;

receiving, during a suspension of execution of the SQL process, a change to the process state to influence the SQL process indicated by the mapping that provides a match between the change to the process and the portion of the SQL process; and

provide a SQL final execution response after reaching an end of the debug execution plan for the SQL statement.

9. The computer-readable medium of claim 8 , comprising instructions to load a SQL debug view of the selected SQL statement based on the debug execution plan.

10. The computer-readable medium of claim 8 , wherein the debugging process is associated with a plurality of contexts.

11. The computer-readable medium of claim 10 , comprising instructions to:

view intermediate results; and

evaluate expressions associated with the SQL process based on the intermediate results, a context of the plurality of contexts, data tables in a data store, and a context change which influences the rest of debugged process execution.

12. The computer-readable medium of claim 8 , wherein newly attached filter criteria overrides previous filter criteria as long as the debugging process is active.

13. The computer-readable medium of claim 8 , comprising instructions to initialize a query engine to execute the SQL statement using the debug execution plan and filter criteria.

14. The computer-readable medium of claim 8 , comprising instructions to provide a break notification when a particular breakpoint associated with the SQL statement is reached.

15. A computer system, comprising:

a memory;

at least one hardware processor interoperably coupled with the memory and configured to:

receive a request to fetch a debug execution plan, the debug execution plan comprising a plurality of structured query language (SQL) execution optimization levels, a mapping for a SQL statement, and a plurality of plan operators;

receive a request to initialize a debugging process of the SQL statement based on the debug execution plan;

verify filter criteria comprising received filter criteria and attached filter criteria, the filter criteria being customized based on properties provided using a SQL debug channel distinct from a unidirectional communicative SQL execution channel, the SQL debug channel supporting bi-directional communication with a client-side SQL debugger and used by a server-side SQL debugger to issue commands to a SQL query engine to assume control over execution of the SQL statement;

set breakpoints associated with the SQL statement based on the debug execution plan, before or after the execution of each of the plurality of plan operators;

trigger the SQL statement;

transmit a notification that a SQL process associated with the SQL statement is attached to a debugger associated with the debugging process and ready for external execution control;

provide information associated with a process state and an intermediate result upon reaching a particular breakpoint associated with a portion of the SQL process executing the triggered SQL statement, the process state comprising one of the plurality of plan operators associated with the portion of the SQL process and a related original portion of the SQL process;

receiving, during a suspension of execution of the SQL process, a change to the process state to influence the SQL process indicated by the mapping that provides a match between the change to the process and the portion of the SQL process; and

provide a SQL final execution response after reaching an end of the debug execution plan for the SQL statement.

16. The computer system of claim 15 , configured to load a SQL debug view of the selected SQL statement based on the debug execution plan.

17. The computer system of claim 15 , wherein the debugging process is associated with a plurality of contexts.

18. The computer system of claim 17 , configured to:

view intermediate results; and

evaluate expressions associated with the SQL process based on the intermediate results, a context of the plurality of contexts, data tables in a data store, and a context change which influences the rest of debugged process execution.

19. The computer system of claim 15 , wherein newly attached filter criteria overrides previous filter criteria as long as the debugging process is active.

20. The computer system of claim 15 , configured to:

initialize a query engine to execute the SQL statement using the debug execution plan and filter criteria; and

provide a break notification when a particular breakpoint associated with the SQL statement is reached.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 28, 2014
From: MENAHEM, TAMIR; NAVON, OHAD; WINGARTEN, AMIRAM; KUBOVSKY, INBAL ZILBERMAN
To: SAP SE
Reel/Frame 033633/0725 →
Continuity (1)
Related Publication 20160062870A1 · Mar 3, 2016