In the exercise section of the integration chapter of Bartles's book it says that if we define the function
$$f(x)=\begin{cases}0&x\in [0,1) \\ 1 & x\in [1,2]\;,\end{cases}$$
this Riemann-integrable function is not the derivative of any function. But
$$F(x)=\begin{cases}1 & x\in [0,1)\;\\x &x\in [1,2]\end{cases}$$ has f as a derivative, right? Then am I wrong? This is in the context of verifying the hypothesis for the Fundamental Theorem of Calculus.
Thanks in advance for the answers.