segmentation fault caused by sql ?