Skip to content

Commit e04d5e4

Browse files
committed
replaced 'LIMIT 0' by 'WHERE 0=1' (fixes #13731)
1 parent f184ec9 commit e04d5e4

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

python/plugins/db_manager/db_plugins/oracle/TODO.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
* SQL Window - "Retrieve columns" don't work => problem in
44
dlg_sql_window.py (not enough abstraction for connectors).
55

6-
* SQL Window - Can't retrieve column: dlg_sql_window.py launch an
7-
invalid request for Oracle (no LIMIT operator in Oracle). Should
8-
patch dlg_sql_window.py to use a connector method to grab columns.
9-
106
* Query-builder - Add date functions menu (needs to change the main
117
code of query builder).
128

python/plugins/db_manager/dlg_sql_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def fillColumnCombos(self):
287287
cols = []
288288
quotedCols = []
289289
connector = self.db.connector
290-
sql = u"SELECT * FROM (%s\n) AS %s LIMIT 0" % (unicode(query), connector.quoteId(alias))
290+
sql = u"SELECT * FROM (%s\n) AS %s WHERE 0=1" % (unicode(query), connector.quoteId(alias))
291291

292292
c = None
293293
try:

0 commit comments

Comments
 (0)