×

Automatic detection of queries missing order-by via unit test

  • US 9,767,219 B2
  • Filed: 10/27/2014
  • Issued: 09/19/2017
  • Est. Priority Date: 10/27/2014
  • Status: Active Grant
First Claim
Patent Images

1. A non-transitory computer-readable storage medium including program code that, when executed by at least one programmable processor, causes the at least one programmable processor to perform operations comprising:

  • intercepting, as part of testing of an application, a query sent by the application to a database, the database comprising a database management system that makes default sort order guarantees;

    modifying the query by at least defining the query to return a plurality of results, the modified query enabling detection of whether the query causes an order by error at the application, the order by error representing an error at the application caused by at least the query not including an order by instruction and caused based on at least whether the plurality of results provided by the database to the application are out of order;

    sending the modified query to the database;

    intercepting a query result provided by the database in response to the modified query, the modified query including the plurality of results;

    modifying, in response to the modified query not including the order by instruction, the intercepted query result by at least re-ordering the plurality of results;

    sending the re-ordered plurality of results to the application to enable the determination of whether the re-ordered plurality of results cause the order by error at the application; and

    detecting the query causes the order by error at the application, in response to the re-ordered plurality of results causing the error at the application.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×