@@ -784,11 +784,6 @@ def getColumns(self, onlyColNames=False):
784
784
785
785
786
786
def dumpTable (self ):
787
- if kb .dbms == "MySQL" and not self .has_information_schema :
788
- errMsg = "information_schema not available, "
789
- errMsg += "back-end DBMS is MySQL < 5.0"
790
- raise sqlmapUnsupportedFeatureException , errMsg
791
-
792
787
if not conf .tbl :
793
788
errMsg = "missing table parameter"
794
789
raise sqlmapMissingMandatoryOptionException , errMsg
@@ -804,27 +799,32 @@ def dumpTable(self):
804
799
805
800
rootQuery = queries [kb .dbms ].dumpTable
806
801
807
- logMsg = "fetching"
808
- if conf .col :
809
- colList = conf .col .split ("," )
810
- colString = ", " .join (column for column in colList )
811
- logMsg += " columns '%s'" % colString
812
- logMsg += " entries for table '%s'" % conf .tbl
813
- logMsg += " on database '%s'" % conf .db
814
- logger .info (logMsg )
815
-
816
802
if conf .col :
817
803
self .cachedColumns [conf .db ] = {}
818
804
self .cachedColumns [conf .db ][conf .tbl ] = {}
819
805
for column in colList :
820
806
self .cachedColumns [conf .db ][conf .tbl ][column ] = None
821
807
elif not self .cachedColumns :
808
+ if kb .dbms == "MySQL" and not self .has_information_schema :
809
+ errMsg = "information_schema not available, "
810
+ errMsg += "back-end DBMS is MySQL < 5.0"
811
+ raise sqlmapUnsupportedFeatureException , errMsg
812
+
822
813
self .cachedColumns = self .getColumns (onlyColNames = True )
823
814
824
815
colList = self .cachedColumns [conf .db ][conf .tbl ].keys ()
825
816
colList .sort (key = lambda x : x .lower ())
826
817
colString = ", " .join (column for column in colList )
827
818
819
+ logMsg = "fetching"
820
+ if conf .col :
821
+ colList = conf .col .split ("," )
822
+ colString = ", " .join (column for column in colList )
823
+ logMsg += " columns '%s'" % colString
824
+ logMsg += " entries for table '%s'" % conf .tbl
825
+ logMsg += " on database '%s'" % conf .db
826
+ logger .info (logMsg )
827
+
828
828
if conf .unionUse :
829
829
if kb .dbms == "Oracle" :
830
830
query = rootQuery ["inband" ]["query" ] % (colString , conf .tbl .upper ())
0 commit comments