Skip to content

Wordpress sqlite driver throw constraint exception when updating options #59

Open
@flymonkey00

Description

@flymonkey00

WordPress version: 6.4.1
sqlite-database-integration version: 2.1.2

After using the sqlite db driver, when I try to update Default post settings (Settings-Discussion) it always failed. And I can see the error log like this:

MySQL query:
UPDATE wp_options SET option_value = NULL WHERE option_name = 'comment_registration'
Queries made or created this session were:
Executing: BEGIN | (no parameters)
Executing: UPDATE wp_options SET option_value = NULL WHERE option_name = :param0 | parameters: comment_registration
Executing: ROLLBACK | (no parameters)

and

Error occurred at line 3373 in Function handle_error. Error message was: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: wp_options.option_value.

This issue appears to be caused by a misalignment of metadata for certain database tables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions