Let $A$ be an Artin local ring and let $f:A \to B$ a local ring homomorphism to a Noetherian local one dimensional $A$-algebra $B$. 



> 
> If $B$ is Cohen--Macaulay and the localization of $B$ at any minimal prime is flat over $A$, then is $B$ flat over $A$? 
> 
> 
> 


As far as I can see, this doesn't follow from any of the standard flatness criteria, but I could have missed something simple. 


(I am mostly interested in the case that $B$ is the localization of a finite type $A$-algebra at some maximal ideal, but it seems likely that the answer to the question is the same with or without this extra assumption.)



Flatness and Cohen-Macaulay rings
That is not true. Let $k$ be a field. A module over the ring of dual numbers, $A=k[\epsilon]/\langle \epsilon^2 \rangle,$ is equivalent to a $k$-vector space $B$ with a square-zero $k$-linear self-map $L\_\epsilon:B\to B.$ For every integer $q\geq 1$, the Tor module equals, $$\text{Tor}^A\_{q\geq 1}(A/\langle \overline{\epsilon}\rangle,B) = H(L\_\epsilon,B) = \text{Ker}(L\_\epsilon)/\text{Image}(L\_\epsilon).$$ Now let $B$ be the following one-dimensional, local, Noetherian $k$-algebra that is a local complete intersection, hence Cohen-Macaulay, $$B=k[x,y]\_{\langle x,y \rangle}/ \langle y^2\rangle,$$ where $L\_\epsilon$ is multiplication by $\overline{xy}.$


The localization of $B$ at the unique minimal prime $\mathfrak{p}=\langle \overline{y}\rangle$ is $$B\_\mathfrak{p} = k(x)[y]/\langle y^2\rangle.$$ The homology module for this localization is $$H(L\_\epsilon,B\_{\mathfrak{p}}) = \{0\}.$$ Thus, $B\_{\mathfrak{p}}$ is $A$-flat. However, $B$ is not flat since $\text{Tor}\_{q\geq 1}^A(B,A/\mathfrak{m})$ equals
$$ \text{Ker}(L\_{\overline{xy}}:k[x,y]/\langle y^2\rangle \to k[x,y]/\langle y^2\rangle)/\text{Image}(L\_{\overline{xy}}:k[x,y]/\langle y^2\rangle \to k[x,y]/\langle y^2\rangle) = $$ $$\langle \overline{y}\rangle / \langle \overline{xy} \rangle = k\cdot \overline{y},$$ which is one-dimensional. 


