Let's consider two following definitions of locally Lipschitz mapping.
Let $f: D\subset \mathbb R^n \rightarrow \mathbb R$.
We say that $f$ is localy Lipschitz in 1. sense, if for each $a\in D$ there exist a neighbourhood $U_x$ of $a$ and a constant $K_a>0$ such that $$ |f(x)-f(a)| \leq K_a \|x-a\|\textrm{ for } x\in U_x. $$
We say that $f$ is localy Lipschitz in 2. sense, if for each $a\in D$ there exist a neighbourhood $U_x$ of $a$ and a constant $K_a>0$ such that $$ |f(x)-f(y)| \leq K_a \|x-y\|\textrm{ for } x,y \in U_x. $$
If $f$ is locally Lipschitz in the 2.sense then also is in the 1. sense. Are these conditions equivalent on compacts in $D$ ?