chore: make Prefer_ordering_index=on default value for optimizer_switch

This commit is contained in:
Cyril Levis 2022-12-28 10:12:28 +01:00
parent 4fa7c865ad
commit 73bbd549cf
No known key found for this signature in database
GPG Key ID: 6DB88737C11F5A48
2 changed files with 3 additions and 3 deletions

View File

@ -288,9 +288,9 @@ Makes the _old_ table include a timestamp value. The _old_ table is what the ori
### optimizer-switch
Default is "", this allow to override a `SET GLOBAL optimizer_switch=key=value` by one set on the session with `SET SESSION optimizer_switch=key=value`.
Default is "prefer_ordering_index=on", this allow to override a `SET GLOBAL optimizer_switch=key=value` by one set on the session with `SET SESSION optimizer_switch=key=value`.
You can find values on https://dev.mysql.com/doc/refman/8.0/en/switchable-optimizations.html.
Example: `--optimizer-switch="prefer_ordering_index=on"`.
Example: `--optimizer-switch="prefer_ordering_index=off"`.
### tungsten

View File

@ -139,7 +139,7 @@ func main() {
criticalLoad := flag.String("critical-load", "", "Comma delimited status-name=threshold, same format as --max-load. When status exceeds threshold, app panics and quits")
flag.Int64Var(&migrationContext.CriticalLoadIntervalMilliseconds, "critical-load-interval-millis", 0, "When 0, migration immediately bails out upon meeting critical-load. When non-zero, a second check is done after given interval, and migration only bails out if 2nd check still meets critical load")
flag.Int64Var(&migrationContext.CriticalLoadHibernateSeconds, "critical-load-hibernate-seconds", 0, "When non-zero, critical-load does not panic and bail out; instead, gh-ost goes into hibernation for the specified duration. It will not read/write anything from/to any server")
flag.StringVar(&migrationContext.OptimizerSwitch, "optimizer-switch", "", "Optimizer switch params, eg: prefer_ordering_index=on")
flag.StringVar(&migrationContext.OptimizerSwitch, "optimizer-switch", "prefer_ordering_index=on", "optimizer_switch param")
quiet := flag.Bool("quiet", false, "quiet")
verbose := flag.Bool("verbose", false, "verbose")
debug := flag.Bool("debug", false, "debug mode (very verbose)")