Let X be a scheme. U is an open subscheme of X. Assume f is a global section on X which is not a zero divisor, then the restriction of f to U is still an non-zero divisor?

If X is affine, the answer is obvious true. I don't know the answer for a general scheme.

This is a question raised in the definition of sheaf of total fraction rings. Some author claim U|-> total fraction ring of sections over U is a presheaf, but I can't see the reason.