Skip to content

Perform conversions in GetByte #695

@bgrainger

Description

@bgrainger

MySqlDataReader.GetByte() doesn't perform conversions from any other integral type, but GetInt16, GetInt32, etc. will perform narrowing conversions (with overflow checks) from MEDIUMINT, BIGINT, etc.

SqlClient and MySql.Data don't support implicit conversions in GetByte, but Npgsql and Microsoft.Data.Sqlite do. It doesn't seem like it would be that wrong to be internally consistent with GetInt16/GetInt32.

This may also be helpful for PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#820.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions