sqlite-database-integration icon indicating copy to clipboard operation
sqlite-database-integration copied to clipboard

Wordpress sqlite driver throw constraint exception when updating options

Open flymonkey00 opened this issue 2 years ago • 2 comments

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.

flymonkey00 avatar Nov 30 '23 06:11 flymonkey00

Confirm, I have the same error. It look like on missing param1 instead of NULL.

mati75 avatar Dec 23 '23 22:12 mati75

Same issue. I just found a temporary working solution https://github.com/aaemnnosttv/wp-sqlite-db/issues/18#issuecomment-1031902955

hawm avatar Oct 09 '24 12:10 hawm