Opened 18 years ago
Last modified 18 years ago
#1155 closed defect (fixed)
mysql driver doesn't detect tiniyint, smallint field types
Reported by: | Owned by: | hobu | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
DESCRIBE returns sizes for these types, but the test doesn't take this into account. 'smallint' and 'tinyint' don't get caught and the field ends up with a string type of length 0. In ogrsf_frmts/mysql/ ogrmysqltablelayer.cpp/OGRFeatureDefn *OGRMySQLTableLayer::ReadTableDefinition( const char *pszTable ), the tests should be (tested on a smallint field, this works): else if( EQUALN(pszType,"tinyint",7) ) { oField.SetType( OFTInteger ); } else if( EQUALN(pszType,"smallint",8) ) { oField.SetType( OFTInteger ); }
Note:
See TracTickets
for help on using tickets.