The space of Riemann integrable functions with $L^2$ inner product is not complete

Let $q_n$ be an enumeration of the rationals in $[0,1]$. Let $A_n = \cup_{k=1}^n (q_k-\frac{1}{2^{k+2}},q_k+\frac{1}{2^{k+2}})$, $A = \cup_n A_n$.

In the following I will use $A^c$ to denote the complement with respect to the space $[0,1]$. Note that $0<m A <1$, and hence $m A^c >0$.

Then let $f_n = 1_{A_n}$, $f = 1_A$. Then $f_n$ is Riemann integrable and $f_n \to f$ with the $L^2$ norm. However, $f$ is not Riemann integrable.

To show that $f$ is not Riemann integrable, we note that if $x \in A^c$, then $B(x,\epsilon)$ contains points of $A$ for all $\epsilon>0$. In particular, if $I \subset [0,1]$ is an interval that intersects $A^c$, then it also intersects $A$. Furthermore, if $\pi=\{I_1,...,I_k\}$ is a partition of $[0,1]$, and $K = \{i | I_i \cap A^c \neq \emptyset \}$, then $\sum_{i \in K} l(I_i) \geq m A^c$. However, if $i \in K$, then $\inf_{x \in I_i} f(x) = 0$ and $\sup_{x \in I_i} f(x) = 1$, hence we have $U(f,\pi) -L(f,\pi) \geq m A^c >0$. Hence $f$ is not Riemann integrable.

Addendum: The above conclusion is correct, but does not answer the question. Since we are dealing with convergence in $L^2$, we need to make sure that the above conclusion remains valid even if $f$ is redefined on a set of measure zero.

Suppose we have a measurable function $g$ such that $\Omega = \{ x | f(x) \neq g(x) \}$ satisfies $m \Omega = 0$. We note that by definition of $f$, if $f(x) = 1$ (ie, $x \in A$), then there is some small interval $J$ of positive measure such that $x \in J \subset A$. Hence if $\sup_{x \in I_i} f(x) = 1$, then $\sup_{x \in I_i\cap \Omega^c} f(x) = 1$, and hence $\sup_{x \in I_i} g(x) \ge 1$.

Now let $K' = \{i | I_i \cap A^c \cap \Omega^c \neq \emptyset \}$, and repeat the analysis above with $K$ replaced by $K'$. We note that $m A^c = m (A^c \cap \Omega^c)$, and furthermore, if $i \in K'$ we have $\inf_{x \in I_i} g(x) \le \inf_{x \in I_i \cap \Omega^c} g(x) = \inf_{x \in I_i \cap \Omega^c} f(x) = 0$. Hence we arrive at the same conclusion, that $g$ is not Riemann integrable.