now --tables work for MaxDB

This commit is contained in:
Miroslav Stampar 2010-11-02 22:11:45 +00:00
parent b761523f3f
commit 4b56fa4f8f
2 changed files with 4 additions and 1 deletions

View File

@ -796,7 +796,7 @@ class Enumeration:
infoMsg += "database '%s'" % db infoMsg += "database '%s'" % db
logger.info(infoMsg) logger.info(infoMsg)
if kb.dbms in (DBMS.SQLITE, DBMS.FIREBIRD): if kb.dbms in (DBMS.SQLITE, DBMS.FIREBIRD, DBMS.MAXDB):
query = rootQuery.blind.count query = rootQuery.blind.count
else: else:
query = rootQuery.blind.count % db query = rootQuery.blind.count % db
@ -819,6 +819,8 @@ class Enumeration:
for index in indexRange: for index in indexRange:
if kb.dbms == DBMS.SYBASE: if kb.dbms == DBMS.SYBASE:
query = rootQuery.blind.query % (db, (kb.data.cachedTables[-1] if kb.data.cachedTables else " ")) query = rootQuery.blind.query % (db, (kb.data.cachedTables[-1] if kb.data.cachedTables else " "))
elif kb.dbms == DBMS.MAXDB:
query = rootQuery.blind.query % (kb.data.cachedTables[-1] if kb.data.cachedTables else " ")
elif kb.dbms in (DBMS.SQLITE, DBMS.FIREBIRD): elif kb.dbms in (DBMS.SQLITE, DBMS.FIREBIRD):
query = rootQuery.blind.query % index query = rootQuery.blind.query % index
else: else:

View File

@ -440,6 +440,7 @@
</users> </users>
<tables> <tables>
<inband query="SELECT tablename FROM domain.tables WHERE schemaname='%s' AND type='TABLE'"/> <inband query="SELECT tablename FROM domain.tables WHERE schemaname='%s' AND type='TABLE'"/>
<blind query="SELECT MIN(tablename) FROM domain.tables WHERE schemaname=user AND type='TABLE' AND name > '%s'" count="SELECT CHR(COUNT(*)) FROM domain.tables WHERE schemaname=user AND type='TABLE'"/>
</tables> </tables>
<roles> <roles>
<inband query="SELECT owner, role FROM domain.roles" condition="owner"/> <inband query="SELECT owner, role FROM domain.roles" condition="owner"/>