@@ -116,29 +116,29 @@ def pivotDumpTable(table, colList, count=None, blind=True):
116116 pivotValue = " "
117117 breakRetrieval = False
118118
119+ def _ (column , pivotValue ):
120+ if column == colList [0 ]:
121+ query = dumpNode .query .replace ("'%s'" , "%s" ) % (agent .preprocessField (table , column ), table , agent .preprocessField (table , column ), unescaper .escape (pivotValue , False ))
122+ else :
123+ query = dumpNode .query2 .replace ("'%s'" , "%s" ) % (agent .preprocessField (table , column ), table , agent .preprocessField (table , colList [0 ]), unescaper .escape (pivotValue , False ))
124+
125+ query = whereQuery (query )
126+ return unArrayizeValue (inject .getValue (query , blind = blind , time = blind , union = not blind , error = not blind ))
127+
119128 try :
120129 for i in xrange (count ):
121130 if breakRetrieval :
122131 break
123132
124133 for column in colList :
125- def _ (pivotValue ):
126- if column == colList [0 ]:
127- query = dumpNode .query .replace ("'%s'" , "%s" ) % (agent .preprocessField (table , column ), table , agent .preprocessField (table , column ), unescaper .escape (pivotValue , False ))
128- else :
129- query = dumpNode .query2 .replace ("'%s'" , "%s" ) % (agent .preprocessField (table , column ), table , agent .preprocessField (table , colList [0 ]), unescaper .escape (pivotValue , False ))
130-
131- query = whereQuery (query )
132-
133- return unArrayizeValue (inject .getValue (query , blind = blind , time = blind , union = not blind , error = not blind ))
134-
135- value = _ (pivotValue )
134+ value = _ (column , pivotValue )
136135 if column == colList [0 ]:
137136 if isNoneValue (value ):
138137 for pivotValue in filter (None , (" " if pivotValue == " " else None , "%s%s" % (pivotValue [0 ], unichr (ord (pivotValue [1 ]) + 1 )) if len (pivotValue ) > 1 else None , unichr (ord (pivotValue [0 ]) + 1 ))):
139- value = _ (pivotValue )
138+ value = _ (column , pivotValue )
140139 if not isNoneValue (value ):
141140 break
141+
142142 if isNoneValue (value ):
143143 breakRetrieval = True
144144 break
0 commit comments