Skip to content

MariaDB - failed select in DbDBI.pm #31

@zbchristian

Description

@zbchristian

I am running the API V2 server in a docker container with MariaDB and ran into a problem.

In the module DbDBI.pm, the selection of the owner from the table ovms_owners fails due to a mistake in the WHERE clause in DbOwnerNameByID, DBOwnerIDByName and DbOwnerNameByID:
SELECT * FROM ovms_owners WHERE owner=? and status=1 AND deleted="0000-00-00 00:00:00"

The column deleted is a tinyint(1) and not of type datetime, so the select is always empty, at least in MariaDB.

So the select statement should look like: SELECT * FROM ovms_owners WHERE owner=? and status=1 AND deleted=0

Not sure, why this was not observed before. Might be related to the treatment by MariaDB

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