Plasma wave and second-harmonic generation of intense laser beams due to relativistic effects