[Gravity] Modified the query method of MySQLQueryResult to return a shorter version of the query.

Review Request #433 — Created April 6, 2016 and discarded

rubendgr
Lunr
lunr

Changed MySQLQueryResult method query to return a query string consisting of crud operation (SELECT, INSERT,DELETE, etc) plus table name, replacing the full query. With a SELECT query it would return "SELECT FROM table [..]".



  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
rubendgr
rubendgr
rubendgr
rubendgr
rubendgr
rubendgr
pprkut
  1. Right idea, but several architectural shortcomings. This should give reasonable results with any query you throw at it, not just run-of-the-mill simpleton queries.

    Examples:

    SELECT UUID();
    SELECT DISTINCT SQL_CALC_FOUND_ROWS col1, FUNCTION() as col2 FROM (SELECT * FROM table1) LIMIT 10;
    DELETE LOW_PRIORITY table1 FROM table2 JOIN table1;
    DELETE FROM table1 USING table2 JOIN table1;
    SHOW VARIABLES;

    Additionally, we don't always want the shortened query, so there needs to be still a way to get to the full one.

  2. 
      
rubendgr
rubendgr
rubendgr
pprkut
Review request changed

Status: Discarded

Change Summary:

No longer needed after adding support for canonical query forms

Loading...