The question is based on [Chapter $5$, Section $q$, Remark $5.65$ of] Milne's Algebraic Geometry notes. I will try to make the question self-contained and be consistent with Milne. Assume all schemes contain a field $k$. The category of finitely generated reduced $k$-algebras is denoted $Alg_k$.
The functor of points formalism in algebraic geometry allows us to consider the data of a variety $X$ to be equivalent to a functor $Alg_k\to Sets$ by sending $X$, a variety, to the functor $X(R):=\hom(mSpec(R),X)$. Here morphisms are in the category of ringed spaces.
Now we may also define a variety $X$ to be a functor which can be written as union of "open" affine varieties $\{ U_i\}$ and which satisfies the sheaf condition for the Zariski topology for each object $R$ in $Alg_k$. Here union is defined as the condition that for each field $K$, containing $k$, we must have $X(K)= \bigcup U_i(K)$.
Now my question is the following. Under the notation as above is it true that $X(R)=\bigcup_i U_i(R)$ where $R$ is any object in $Alg_k$.
Here's an alleged counterexample. Please let me know what you think.
Let $k=\mathbb{C}$ and $X=\mathbb{A}^2\setminus V(x,y)$. It can be covered by open affines $D(x)$ and $D(y)$ satisfying the above definition of a scheme. Now suppose $R=\mathbb{C}[x,y]/(x+y-1)$. Then there is a natural closed embedding $mSpec(R)\to X$. If indeed $X(R)=D(x)(R)\cup D(y)(R)$ then the natural map $mSpec(R)\to X$ must factor through $D(x)$ or $D(y)$. Without loss of generality we assume the map factors as $mSpec(R) \to D(x)\to X$. Then for example the point $(x-0,y-1)$ must map to a point in $D(x)$ meaning that $\mathbb{C}[x^{\pm 1},y]/(x,y-1)\cong \mathbb{C}$. This is impossible.