Skip to content

Commit

Permalink
replaced 'LIMIT 0' by 'WHERE 0=1' (fixes #13731)
Browse files Browse the repository at this point in the history
  • Loading branch information
SebDieBln committed Nov 17, 2015
1 parent f184ec9 commit e04d5e4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions python/plugins/db_manager/db_plugins/oracle/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
* SQL Window - "Retrieve columns" don't work => problem in
dlg_sql_window.py (not enough abstraction for connectors).

* SQL Window - Can't retrieve column: dlg_sql_window.py launch an
invalid request for Oracle (no LIMIT operator in Oracle). Should
patch dlg_sql_window.py to use a connector method to grab columns.

* Query-builder - Add date functions menu (needs to change the main
code of query builder).

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/db_manager/dlg_sql_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def fillColumnCombos(self):
cols = []
quotedCols = []
connector = self.db.connector
sql = u"SELECT * FROM (%s\n) AS %s LIMIT 0" % (unicode(query), connector.quoteId(alias))
sql = u"SELECT * FROM (%s\n) AS %s WHERE 0=1" % (unicode(query), connector.quoteId(alias))

c = None
try:
Expand Down

0 comments on commit e04d5e4

Please sign in to comment.