The CNOC2 field galaxy redshift survey