A question about integration by substitution 
$f(x)$ is defined on $[a, b]$.
$\phi(t)$ is defined on $[\alpha, \beta]$ and differentiable on $[\alpha, \beta]$ and $\phi'(t)$ is countinuous on $[\alpha, \beta]$ and $\phi(t) \in [a, b]$ for all $t \in [\alpha, \beta]$.
  Let $x_1 = \phi(t_1)$, $x_2 = \phi(t_2)$.
Then, the following equation is true:  
$$\int_{x_1}^{x_2} f(x) dx = \int_{t_1}^{t_2} f(\phi(t))\phi'(t)dt.$$

Let $F(x)$ be a differentiable function defined on $[a,b]$ and $F'(x) = f(x)$ on $[a,b]$.
Let $\phi(t)$ be a function defined on $[\alpha, \beta]$ and differentiable on $[\alpha, \beta]$ and $\phi(t) \in [a, b]$ for all $t \in [\alpha, \beta]$.
Let $\phi'(t)$ be a function which is not continuous on $[\alpha, \beta]$.
Then, $\frac{d}{dt} F(\phi(t)) = f(\phi(t))\phi'(t)$ on $[\alpha, \beta]$.  
Now my question is here:  

Is there a function $g(x)$ such that $g(x)$ is a function defined on $[a, b]$ and $g(x)$ is not a continuous function on $[a,b]$ and has a primitive function $G(x)$ on $[a, b]$ and $g(x)$ is integrable on $[a,b]$ and $\int_a^b g(x) dx \neq G(b) - G(a)$ ?  

 A: Without the condition that $g(x)$ be Riemann integrable, then such functions $g(x)$ do exist. Take for example the derivative of Volterra's function, $V'$, which admits a primitive $V$ differentiable everywhere, but $V'$ is not Riemann integrable, so technically $\int_a^b V'(x)dx\neq V(b)-V(a)$, since $\int_a^b V'(x)dx$ does not exist.
With the condition that $g(x)$ be Riemann integrable, if we take your assertion that $g(x)$ admits a primitive $G(x)$ to mean that $G(x)$ is differentiable on $[a,b]$ and that $G'(x)=g(x)$ for all $x\in[a,b]$, or even that $G(x)$ is continuous on $[a,b]$, differentiable on $(a,b)$, and $G'(x)=g(x)$ for all $x\in(a,b)$, then no such function $g(x)$ where $\int_a^b g(x)dx\neq G(b)-G(a)$ exists. You will note that this is true regardless of the continuity of $g$. This is forced by the fundamental theorem of calculus.
A: If $g$ has a primitive $G$ then for any partition $P = (x_0,x_1,\ldots,x_n)$ of $[a,b]$ we have by the mean value theorem,
$$G(b) - G(a) = \sum_{k=1}^n \left( \,G(x_k) - G(x_{k-1})\, \right) =\sum_{k=1}^n  G'(t_k)(x_k -x_{k-1}) \\ = \sum_{k=1}^n  g(t_k)(x_k -x_{k-1}) $$
Since $g$ is integrable the Riemann sum on the RHS converges as $\|P\| \to 0$ to the integral and the LHS is unchanged.
Thus, 
$$G(b) - G(a) = \int_a^b g(x) \, dx$$
The answer to your question is no, and this is the fundamental theorem of calculus.
