Following the implementation of RFC 21 many test suite tests are failing for OGR. In an attempt to isolate it I found the following odd behavior (using autotest/ogr/data/poly.shp).
ogrinfo data/poly.shp -sql 'select prfedea from poly'
...
OGRFeature(poly):9
prfedea (String) = 35043413
...
ogrinfo data/poly.shp -sql 'select * from poly'
...
OGRFeature(poly):9
AREA (Integer) = 5268
EAS_ID (Integer) = 170
PRFEDEA (Integer) = 35043413
The odd thing here is that PRFEDEA in the original file is Integer. If I select it explicitly by name, the type is changed to string for some reason. If I implicitly select it via "select *" it remains an integer.
The test suite failures also seem to related unexpected changes in types in ExecuteSQL results though I haven't review them all.