Paste P7927

RC query filtering on Jade
ActivePublic

Authored by awight on Mon, Dec 17, 11:45 PM.
SELECT
rc_id,
rc_timestamp,
rc_namespace,
rc_title,
rc_minor,
rc_bot,
rc_new,
rc_cur_id,
rc_this_oldid,
rc_last_oldid,
rc_type,
rc_source,
rc_patrolled,
rc_ip,
rc_old_len,
rc_new_len,
rc_deleted,
rc_logid,
rc_log_type,
rc_log_action,
rc_params,
comment_rc_comment.comment_text AS `rc_comment_text`,
comment_rc_comment.comment_data AS `rc_comment_data`,
comment_rc_comment.comment_id AS `rc_comment_cid`,
rc_user,
rc_user_text,
NULL AS `rc_actor`,
wl_user,
wl_notificationtimestamp,
page_latest,
(SELECT GROUP_CONCAT(ctd_name SEPARATOR ',') FROM `change_tag` INNER JOIN `change_tag_def` ON ((ct_tag_id=ctd_id)) WHERE ct_rc_id=rc_id ) AS `ts_tags`
FROM `recentchanges`
JOIN `comment` `comment_rc_comment`
ON ((comment_rc_comment.comment_id = rc_comment_id))
LEFT JOIN `watchlist`
ON (wl_user = '1' AND (wl_title=rc_title) AND (wl_namespace=rc_namespace))
LEFT JOIN `page`
ON rc_cur_id = page_id
+JOIN `jade_diff_judgment`
+ ON rc_this_oldid = jaded_revision
WHERE
rc_bot = '0'
AND (rc_timestamp >= '20181210232653')
AND rc_new IN ('0','1')
+ AND jade_diff_judgment.jaded_damaging = 1
ORDER BY rc_timestamp DESC
LIMIT 50;