replaced 'LIMIT 0' by 'WHERE 0=1' (fixes #13731)

This commit is contained in:
Sebastian Dietrich 2015-11-17 21:29:19 +01:00
parent f184ec9794
commit e04d5e4d70
2 changed files with 1 additions and 5 deletions

View File

@ -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).

View File

@ -287,7 +287,7 @@ class DlgSqlWindow(QWidget, Ui_Dialog):
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: