Commit 48600cf8 authored by Julien Muchembled's avatar Julien Muchembled

ZMySQLDA: fix condition to detect disallowed multiple select schema

parent c74309cf
...@@ -383,16 +383,13 @@ class DB(TM): ...@@ -383,16 +383,13 @@ class DB(TM):
qs = "%s LIMIT %d" % (qs,max_rows) qs = "%s LIMIT %d" % (qs,max_rows)
r=0 r=0
c = self._query(qs) c = self._query(qs)
if desc is not None: if c:
if c and (c.describe() != desc): if desc is not None is not c.describe():
raise 'Query Error', ( raise 'Query Error', (
'Multiple select schema are not allowed' 'Multiple select schema are not allowed'
) )
if c:
desc=c.describe() desc=c.describe()
result=c.fetch_row(max_rows) result=c.fetch_row(max_rows)
else:
desc=None
if desc is None: return (),() if desc is None: return (),()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment