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

[mysql] Querying optimizer_switch needs to be non-fatal #8545

Merged
merged 1 commit into from Dec 18, 2015

Conversation

@MilhouseVH
Copy link
Contributor

MilhouseVH commented Dec 10, 2015

The optimizer_switch system variable isn't supported by really crusty versions of MySQL, eg. v5.0.33 as it seems to have been backported only as far as v5.1.

Some of our users are using these really old versions with no option to update.

Needs Jarvis backport.

@MilhouseVH MilhouseVH force-pushed the MilhouseVH:nonfatalsqlinit branch from 4c8f3f9 to 77d3fbf Dec 10, 2015
@koying

This comment has been minimized.

Copy link
Contributor

koying commented Dec 11, 2015

Is it on purpose that you're checking first rather than just directly doing `SET SESSION optimizer_switch = 'derived_merge=off`` ?

P.S. I mean if it's non-fatal anyway

@MilhouseVH

This comment has been minimized.

Copy link
Contributor Author

MilhouseVH commented Dec 11, 2015

Yes, because setting derived_merge=off when derived_merge is not supported will result in an error, so it's only being set when it is supported (ie. present in the list). Could have just set it to off and ignored any error, but this approach (parsing the list) seemed cleaner and also potentially more extensible - we'll only be changing those properties that need to be changed, potentially none in most cases.

@koying

This comment has been minimized.

Copy link
Contributor

koying commented Dec 11, 2015

Fair enough. Just wanted to be sure you investigated the option ;)

@MartijnKaijser

This comment has been minimized.

Copy link
Member

MartijnKaijser commented Dec 18, 2015

jenkins build this please
status?

@MilhouseVH

This comment has been minimized.

Copy link
Contributor Author

MilhouseVH commented Dec 18, 2015

Not aware of any further issues.

MartijnKaijser added a commit that referenced this pull request Dec 18, 2015
[mysql] Querying optimizer_switch needs to be non-fatal
@MartijnKaijser MartijnKaijser merged commit 8221170 into xbmc:master Dec 18, 2015
1 check passed
1 check passed
default Merged build finished.
Details
@MartijnKaijser MartijnKaijser modified the milestone: K***** 17.0-alpha1 Dec 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.