Let $k$ be an algebraically closed field and $\mathbb A^2\_k=\operatorname {Spec}k[x,y]$ the affine plane over $k$.  

Consider the ring $R \subset k(x,y)$ of the rational functions on the plane defined and constant on $V(x)$ (the $y$-axis $x=0$).  

What is $\operatorname {Spec}R$ ?  

(This is the geometric translation of an example due, I think, to Krull for which I unfortunately have no reference.)


**Edit**  

Sorry,my definition of $R$ above is a bit ambiguous.
What I mean is that $R$ consists of those fractions $r(x,y)=\frac {p(x,y)}{q(x,y)}$ which can be written as the quotient of two polynomials $p(x,y),q(x,y)\in k[x,y]$ such that $q(0,y)\neq 0\in k[y]$ **and** $\frac {p(0,y)}{q(0,y)}\in k\subset k[y]$.  

For example the rational function $\frac {y+x}{y-x}$ mentioned by @YCor in the comments **does** belong to $R$ since $y-0\neq0\in k[y]$ **and** $\frac {y+0}{y-0}=1\in k \subset k[y]$



Spectrum of a ring (studied by Krull?) of rational functions
(Completing my comments above to an answer. Probably one can simplify this quite a bit.)


**EDIT.** The previous version mistakenly identified the ideal $xA\cap R$ with $xR$. In fact, the maximal ideal $xA\cap R$ of $R$ is not finitely generated: it is generated by $\{xf\,:f\in k(y)\}$ and a finite subset does not suffice. Similarly, $xR$ is not a prime ideal: we have $xy^{-1}, xy\notin xR$ but their product $x^2\in xR$.


The ring has exactly two prime ideals, $(0)\subseteq \mathfrak{m}$ where $\mathfrak{m} = A\cap xk[x,y]$.


Let $A = k[x, y]\_{(x)}$ is the local ring at the generic point of the $y$-axis. This is a discrete valuation ring with maximal ideal $\mathfrak{m}=(x)$ and residue field $A/\mathfrak{m} = k(y)$.


The ring $R$ in question is the preimage of $k\subseteq k(y)= A/\mathfrak{m}$ in $A$. In other words, it is the fiber product $R = A\times\_{A/\mathfrak{m}} k$.


**EDIT** (following Anton's comment below): a better reference for the following two paragraphs is stacks.math.columbia.edu/tag/0D2G Lemma 0B7J: the underlying space of the spectrum of the fiber product of the form $A\times\_{A/I} B$ is the pushout of the corresponding underlying topological spaces of spectra.


By Stacks Project, Tag 07RS <https://stacks.math.columbia.edu/tag/07RS>, $\operatorname{Spec} R$ is the pushout of $\operatorname{Spec}k \leftarrow \operatorname{Spec} A/\mathfrak{m} \to \operatorname{Spec} A$.


By Theorem 3.4 (and its proof) in Schwede's paper [http://www-personal.umich.edu/~kschwede/SchemeWithoutPoints.pdf](http://www-personal.umich.edu/%7Ekschwede/SchemeWithoutPoints.pdf) , we get that the underlying space of $\operatorname{Spec} R$ is the corresponding pushout in spaces. But $\operatorname{Spec} A/\mathfrak{m}\to \operatorname{Spec} k$ is a homeomorphism, and hence so is $\operatorname{Spec} A\to \operatorname{Spec} R$.


