Suppose we have $g:S'\to S$, $f:X\to S$, $g':X'\to X$ and $f':X'\to S'$ forming a fiber product diagram. It is proved that when $f$ is affine, we have isomorphism $g^*f_*(F)\cong f'_*g'^*(F)$, where $F$ is a quasi-coherent sheaf on $X$. Is there counterexample for this when $f$ is not affine? Especially, is there a counterexample for this when $S'=\text{Spec}(k(s))$?(Take fiber is not commutative with take direct image)
I try to find an example, take $S=\mathbb{A}^1$,$S'=\text{Spec}(k)$ at the origin, $X=\mathbb{A^1\times P^1}$,$X'=\mathbb{P}^1$.And the sheaf $F$ to be structure sheaf.
Try to write out $f^*g'_*(O_{\mathbb{A^1\times P^1}})=f^*(O_\mathbb{A^1})$ which is the constant module sheaf $k[x]$ on $S'$.
Try to write out $g_*f'^*(O_{\mathbb{A^1\times P^1}})=g_*(O_\mathbb{P^1})$ which is the constant module sheaf $k$ on $S'$.
Is the reasoning all correct?