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

Allow "EXPLAIN..." queries to be recorded properly as well #8139

Closed
wants to merge 2 commits into from
Closed

Allow "EXPLAIN..." queries to be recorded properly as well #8139

wants to merge 2 commits into from

Conversation

demon
Copy link
Contributor

@demon demon commented Feb 23, 2018

Similar to #3760 and #3761, EXPLAIN queries are not being properly gathered by the stats collector. Add them as an optional non-capturing part of the query for all CRUD operations.

cc @lavagetto who reported & fixed the original issues referenced.

Similar to #3760 and #3761, EXPLAIN queries are not being properly
gathered by the stats collector. Add them as an optional non-capturing
part of the query for all CRUD operations.
Copy link
Contributor

@hhvm-bot hhvm-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fredemmott has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@fredemmott
Copy link
Contributor

Sorry for the slow response; started the internal test run.

@fredemmott
Copy link
Contributor

test run had infra issues, rescheduled.

"(?:explain\\s|describe\\s)?(update|set|show)\\s+([^\\s\\(,]+)|"
"(?:explain\\s|describe\\s)?(replace).*?\\s+into\\s+([^\\s\\(,]+)|"
"(?:explain\\s|describe\\s)?(delete).*?\\s+from\\s+([^\\s\\(,]+)|"
"(?:explain\\s|describe\\s)?(select).*?[\\s`]+from\\s+([^\\s\\(,]+)|"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restructure to < 80 columns, then this is good to go; sorry for the delay

Could be a little creative here and add another non-capturing group, but wanted to keep diff small from what had already been reviewed.
@facebook-github-bot
Copy link
Contributor

@demon has updated the pull request. View: changes, changes since last import

Copy link
Contributor

@hhvm-bot hhvm-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fredemmott is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@hhvm-bot hhvm-bot closed this in d4c8dc4 Apr 27, 2018
facebook-github-bot pushed a commit that referenced this pull request Oct 18, 2019
Summary:
Pull Request resolved: facebook/flow#8139

the tests were sending invalid URIs on Windows:

`C:\foo\bar` should become `file:///C%3A/foo/bar`, but was `file:///C:\foo\bar`. when decoded, the backslashes are escaped so this becomes a file named "C:\foo\bar" in the root directory.

since URIs always use forward slashes, `<PLACEHOLDER_PROJECT_URL_SLASH>` is redundant with `<PLACEHOLDER_PROJECT_URL>/`, so I replaced it.

node 10.12 added `url.pathToFileURL` which should do what we want here, but to avoid bumping the required node version, I went with `vscode-uri` instead.

Reviewed By: gabelevi, samwgoldman

Differential Revision: D18001370

fbshipit-source-id: 15f1cf19c164578ae4747c9c97dc911baeb80bf9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants