  If $$ \Delta(x) \;:=\; \sum_{n\leqslant x}c_n - Cx\qquad(C>0) $$ denotes the
error term in the classical Rankin-Selberg problem, then we obtain a
non-trivial upper bound for the mean square of $\Delta(x+U) - \Delta(x)$ for a
certain range of $U = U(X)$. In particular, under the Lindel\"of hypothesis for
$\zeta(s)$, it is shown that $$ \int_X^{2X}
\Bigl(\Delta(x+U)-\Delta(x)\Bigr)^2\,{\roman d} x \;\ll_\epsilon\;
X^{9/7+\epsilon}U^{8/7}, $$ while under the Lindel\"of hypothesis for the
Rankin-Selberg zeta-function the integral is bounded by
$X^{1+\epsilon}U^{4/3}$. An analogous result for the discrete second moment of
$\Delta(x+U)-\Delta(x)$ also holds.
