fixed a bug when using DATE type for column definition in SQL