lahwaacz / wiki-scripts

Framework for writing bots, maintenance scripts or performing data analysis on wikis powered by MediaWiki
http://lahwaacz.github.io/wiki-scripts/
GNU General Public License v3.0
27 stars 12 forks source link

Fix synchronization of rc_deleted, log_deleted, ipb_deleted, ar_deleted, rev_deleted #62

Open lahwaacz opened 4 years ago

lahwaacz commented 4 years ago

For these two log events: https://wiki.archlinux.org/api.php?action=query&list=logevents&letype=delete&lestart=20200528T084046Z&lelimit=2

The first event set bits 1 and 2, the second event unset bit 2, so the resulting value should be 1 - but wiki-scripts set 0, i.e. the value of the new bitmask.

If some bits are set and others unset in the same event, the log will be even harder to understand... Detailed testing is needed!

lahwaacz commented 3 years ago

PostgreSQL bitwise operators: https://www.postgresql.org/docs/current/functions-math.html