This is a degenerate case, no? where all observations are positive. The area under the curve is 0 for any classifier because false positive rate is always 0 for any threshold. AUC can't discriminate at all between classifiers in this corner case, yes. But that's not a problem with the formula I think, just a property of AUC?