Let $f:[a,b] \to \mathbb{R}$ be a (Riemann) integrable function, which is nowhere locally constant (i.e $f$ is not constant on any open subinterval).
Let $P_n$ be a sequence of partitions of $[a,b]$. Suppose that the upper-Darboux sums $\lim_{n \to \infty}U(f,P_n)=\int_a^b f(x)dx$. Is it true that $\lambda(P_n) \to 0$?
($\lambda(P_n)$ is the parameter of the partition, i.e the maximal length of a subinterval in the partition).
One could probably replace the upper-sums with lower-sums or even arbitrary Riemann sum, to get variants of the question...
I almost wrote down a proof of your statement, but then realize that the negative of the Thomae's function $f$ is a counterexample: It's nowhere locally constant, and
$$\sup_{x\in [c,d]} f(x) = 0$$
for all intervals $[c,d]$. Thus
$$U(f,P_n) = 0 = \int_0^1 f$$
for all partition $P_n$.