Opened 10 years ago

Closed 10 years ago

#5426 closed defect (fixed)

[PATCH] Date/Time values cannot be inserted into an empty SQLite layer

Reported by: ermite Owned by: warmerdam
Priority: normal Milestone: 1.11.0
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: SQLite, Datetime


The date/time values couldn't be inserted into an empty SQLite layer during my recent experience. The ogrinfo reports the date/time columns as string if the layer is empty. Further testing shows that the column type (retrieved by sqlite3_column_type) is SQLITE_NULL, rather than expected SQLITE_TEXT, therefore the insertion failure. Patch attached.

Attachments (1)

ogrsqlite20140328.patch (1.1 KB ) - added by ermite 10 years ago.

Download all attachments as: .zip

Change History (2)

by ermite, 10 years ago

Attachment: ogrsqlite20140328.patch added

comment:1 by Even Rouault, 10 years ago

Milestone: 1.11.0
Resolution: fixed
Status: newclosed

trunk r27102 "SQLite: ensure fields of type DATETIME, DATE or TIME are properly recognized if the table is empty (patch by ermite, #5426)"

Note: See TracTickets for help on using tickets.