magnusmanske / listeria_rs

Repo for the Wikimedia Listeria bot
https://listeria.toolforge.org/
25 stars 6 forks source link

Running an overweight query results in "There was an error running the query [Field 'message' doesn't have a default value]`" #106

Open backache opened 1 year ago

backache commented 1 year ago

I created query that was too much for listeria, that' fine, but just want to log that perhaps it doesn't have an error in en-gb (British-English) stored in its dictionary

`Trying to update Talk:Q2722764...

Killed by OS for overloading memory.

Return to Talk:Q2722764

Also, check out the current bot status!

Status: OK

There was an error running the query [Field 'message' doesn't have a default value]`

backache commented 1 year ago

I don't know the code (nor rust) but it looks like an issue with the code accessed to use MySQL rather than the main code

looking at ‎src/listeria_bot.rs it seems to be perhaps to be line 314 and that for whatever reason the value of the variable being pushed into the message is empty, and perhaps there are two ways forward, to find out why the variable is empty and/or to set a default for that column in the update statement

let sql = "UPDATEpagestatusSETstatus=:status,message=:message,timestamp=:timestamp,bot_version=2 WHEREwiki=(SELECT id FROMwikisWHEREname=:wiki) ANDpage=:page".to_string() ;