Is the restriction map of structure sheaf on an irreducible scheme injective? Suppose $X$ is an irreducible scheme, $U \subset V$ open subsets of $X$, does it hold that $\rho_U^V:O(V)\to O(U)$ injective? Generally under what conditions does it hold? 
Actually it is related to an exercise in Liu Qing's book p67,Ex4.11: 
Let $f：X\to Y $ be a morphism of irreducible schemes, show that the following are equivalent:
(2)$f^{\#}:O_Y \to f_*O_X$ is injective
(3)for every open subset $V$ of $Y$ and every open subset $U\subset f^{-1}(V)$, the map is injective.
to deduce (3) from (2) I had hoped the restriction map should be injective.
But now I don't know how to deal with it.. 
 A: No, the restrictions needn't be injective, even for affine schemes. Here is a counterexample:  
Let $k$ be a field, $A$  the ring $A=k[X,Y]/(Y^2,XY)=k[x,y]$ and $S=\operatorname {Spec} (A)$ the corresponding affine scheme.
The restriction morphism from $U=S$ to $V=D(x)$$$\rho:\mathcal O(S)=A \to \mathcal O (D(x))=A_x$$ is not injective because it sends $y\neq 0\in \mathcal O(S)=A$ to $y|D(x)=\frac {y}{1}=0\in \mathcal O (D(x))=A_x$ .
[Why is  $\frac {y}{1}=0\in A_x$ ? Because $xy=0$ and $x$ is invertible in $A_x$]
The existence  of the  nontrivial nilpotent $y$ in this example is not coincidental: in a scheme that is irreducible and reduced (such schemes are called integral) all restriction maps between open subsets are indeed injective.  
Edit
In answer to a request of the OP in his comment below, the quickest  way to prove that the restriction map $\rho_U^V:O(V)\to O(U)$ is injective in the integral case is to compose it with the canonical morphism $\mathcal O(U)\to O_{X,\xi}$ into the generic stalk and to remark that the composition $\mathcal O(V)\to O_{X,\xi}$ is injective as a consequence of Qing Liu's Proposition 4.18 (b), page 65.
[Some kid on the block will remind you that $v\circ u$ injective $\implies u$ injective]
A: Think of the affine case. So let $X= Spec\,  A$ for some ring $A$. Then the basic open sets are the sets of the form $D_f = Spec \, A_f$. The restriction map $O(X) \to O(D_f)$ is precisely the localization map $A \to A_f$. This is injective precisely when $f$ is a non-zero divisor.
This argument could be globalized to the case when $X$ is a scheme. So at least when $X$ is an integral scheme, the restriction maps should in general be injective.
Edit: Of course, as Zhen Lin points out, if $U=\emptyset$, then the restriction map is just the zero map $A \to 0$, so it is not injective in that case.
