For Acetoacetic Ester Synthesis, http://www.chem.ucalgary.ca/courses/351/Carey5th/Ch21/ch21-5-1.html
in the 3rd step (which is the 2nd step if you look at the btm pic), if I add base to transform the ester to a carboxylate, I understand the mechanism by itself (-OH add to the ester's carbonyl carbon and kick off the -OR group, which fast deprotonate the carboxylic acid to carboxylate.).
But my question is that why don't the -OH attack the ketone carbonyl carbon as well, which is more reactive than the ester carbonyl carbon. In my opinion, the ester side will be transformed into a carboxylate and the ketone side will be transformed into a diol after protonation.