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

FB8-172: Add variable to disable full table/index scans #970

Closed
wants to merge 1 commit into from

Conversation

inikep
Copy link
Contributor

@inikep inikep commented Feb 22, 2019

Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: b90e801
Reference Patch: ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

TODO: Because of conflicts I removed changes in mysql-test/t/all_persisted_variables.test. This test has to be modified at let $total_persistent_vars=XXX; (+1 increase) and it should be re-recorded.

mysql-test/t/optimizer_full_scan.test Outdated Show resolved Hide resolved
mysql-test/t/optimizer_full_scan.test Outdated Show resolved Hide resolved
mysql-test/t/optimizer_full_scan.test Outdated Show resolved Hide resolved
mysql-test/t/optimizer_full_scan.test Outdated Show resolved Hide resolved
sql/sys_vars.cc Outdated Show resolved Hide resolved
@inikep inikep force-pushed the FB8-172 branch 2 times, most recently from 725d793 to ae38647 Compare February 26, 2019 16:04
@inikep
Copy link
Contributor Author

inikep commented Feb 26, 2019

PR was updated

Copy link
Contributor

@percona-ysorokin percona-ysorokin left a comment

Choose a reason for hiding this comment

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

LGTM

@inikep inikep force-pushed the FB8-172 branch 2 times, most recently from 47d811f to f04ee34 Compare March 15, 2019 16:49
@inikep inikep changed the title WIP FB8-172: Add variable to disable full table/index scans FB8-172: Add variable to disable full table/index scans Mar 18, 2019
Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

@facebook-github-bot
Copy link

@inikep has updated the pull request. Re-import the pull request

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

@@ -18728,6 +18728,9 @@ ER_RPL_FAILED_IN_RLI_INIT_INFO
ER_SEMISYNC_FORCE_SHUTDOWN
eng "Force shutdown: Semi-sync master is being switched off while there are active un-acked transactions"

ER_FULL_SCAN_DISABLED
Copy link
Contributor

Choose a reason for hiding this comment

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

We should reuse the 5.6 error number: 50077.

Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

---------- facebook@b90e801 ----------

Add variable to disable full table/index scans

Summary:
There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

Originally Reviewed By: hermanlee

fbshipit-source-id: 94fcd07

---------- facebook@ecef4b2 ----------

Fix optimizer_full_scan to not error for explain queries

Summary:
EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Squash with: D7528820

fbshipit-source-id: b62bcf1
@facebook-github-bot
Copy link

@inikep has updated the pull request. Re-import the pull request

@inikep
Copy link
Contributor Author

inikep commented Mar 25, 2019

PR was updated with ER_FULL_SCAN_DISABLED moved to 50077

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

@hermanlee hermanlee closed this Mar 30, 2019
facebook-github-bot pushed a commit that referenced this pull request Mar 30, 2019
Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: b90e801
Reference Patch: ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: #970

Reviewed By: lth

Differential Revision: D14567846

Pulled By: lth

fbshipit-source-id: 9669768
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 23, 2023
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
hermanlee pushed a commit to hermanlee/mysql-5.6 that referenced this pull request Oct 3, 2023
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
hermanlee pushed a commit to hermanlee/mysql-5.6 that referenced this pull request Oct 18, 2023
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 17, 2024
…percona#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook/mysql-5.6@b90e801
Reference Patch: facebook/mysql-5.6@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook/mysql-5.6#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Apr 23, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Apr 23, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Apr 25, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 7, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 8, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 9, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 10, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 13, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 15, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 16, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 17, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 17, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 21, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 21, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 30, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 14, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 19, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 20, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 21, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 25, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 2, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 19, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 19, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 31, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 2, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 6, 2024
facebook#970)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-172

Reference Patch: facebook@b90e801
Reference Patch: facebook@ecef4b2

There are cases where it is always unacceptable for a client to be doing full table scans. To prevent this from happening, add a new variable optimizer_full_scan. When it is turned off, it will return a new error code ER_FULL_SCAN_DISABLED.

For best results, use with optimizer_force_index_for_range. Currently, it does not fallback to alternative plans because we check at the end of query planning.

EXPLAIN queries with derived tables do not populate select_options in the JOIN structure properly. This means that we could error if we tried to run an explain on a query with derived tables.

Instead of reading from the JOIN struct, read from the LEX struct on the THD, as this is where the flag is original set on during query parsing.

This bug also means that in upstream, we increment some status variables tracking full table scans despite the fact that only an explain statement was done. This seems to have been fixed in 8.0 though.

Pull Request resolved: facebook#970

Reviewed By: lloyd

Differential Revision: D14567846

Pulled By: lth
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.

6 participants