Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sleep injection fails on NOT EXISTS queries #17

Open
valhallasw opened this issue Feb 10, 2021 · 0 comments
Open

sleep injection fails on NOT EXISTS queries #17

valhallasw opened this issue Feb 10, 2021 · 0 comments

Comments

@valhallasw
Copy link

Example: https://quarry.wmflabs.org/query/52344

SELECT page_namespace, page_title, il_to
	FROM imagelinks
	JOIN page on page_id = il_from
	WHERE
		NOT EXISTS (SELECT * FROM image WHERE img_name = il_to)
   	AND NOT EXISTS (SELECT * FROM commonswiki_p.image WHERE img_name = il_to)
		AND NOT EXISTS (SELECT * FROM page WHERE page_namespace = 6
					AND page_title = il_to)
		AND NOT EXISTS (SELECT * FROM commonswiki_p.page WHERE page_namespace = 6
					AND page_title = il_to)
	ORDER BY page_namespace ASC LIMIT 1000

or, a more minimal example,

SELECT page_namespace, page_title, il_to
	FROM imagelinks
	JOIN page on page_id = il_from
	WHERE
		NOT EXISTS (SELECT * FROM image WHERE img_name = il_to)
	ORDER BY page_namespace ASC LIMIT 1000

The sleep seems to be injected into the subquery rather than the main query, and this seems to break the syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant