Skip to content

signed tinyint fields are read as unsigned #30

@cyberhuman

Description

@cyberhuman
create table test (
  field1 tinyint not null
);

insert into test ( field1 ) values ( -1 );

select field1 from test; -- returns 255

The issue is that tinyint fields are always considered unsigned:
https://github.com/andrenth/ocaml-mariadb/blob/59b6eec1a2880747d92d3edc35c6cf20e829d516/lib/field.ml#L77

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions