As EOS JD says, the significant factor is magnification, not just focal length per se. Subject distance also affects magnification.
In other words, if you frame a portrait at say 2m, but then move back to 4m with a lens of double the focal length, the subject remains the same size on the sensor (same magnification) and depth of field also remains the same.
And yes, you get more depth of field with the smaller formats of crop sensor DSLRs compared to full frame, and with compacts with much smaller sensors still, there is so much DoF it's quite hard not to get everything sharp all the time.
The difference in DoF between formats is equal to the crop factor, so with a Canon having a 1.6x crop factor relative to full frame, the difference is about one and a quarter stops. In the example quoted above, f/1.7 on a crop camera would give the same DoF as f/2.7 (1.7 x 1.6 = 2.72). The 1.5x crop factor on Nikon/Sony is virtually the same.
Canon 1D series cameras have a 1.3x crop factor which is just under one stop difference. The 2x crop factor of Four-Thirds format is two stops. Compacts are usually around 5x crop factor.