You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many users are running MySQL with this flag turned off, and it's
non-trivial to turn it on due to legacy reasons. This flag allows
you to keep going. The associated risk of using this flag is in
the description of the command line argument.
Copy file name to clipboardExpand all lines: go/vt/vttablet/tabletserver/tabletenv/config.go
+7-1
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ func init() {
54
54
flag.BoolVar(&Config.TerseErrors, "queryserver-config-terse-errors", DefaultQsConfig.TerseErrors, "prevent bind vars from escaping in returned errors")
55
55
flag.StringVar(&Config.PoolNamePrefix, "pool-name-prefix", DefaultQsConfig.PoolNamePrefix, "pool name prefix, vttablet has several pools and each of them has a name. This config specifies the prefix of these pool names")
56
56
flag.BoolVar(&Config.WatchReplication, "watch_replication_stream", false, "When enabled, vttablet will stream the MySQL replication stream from the local server, and use it to support the include_event_token ExecuteOptions.")
57
-
flag.BoolVar(&Config.EnableAutoCommit, "enable-autocommit", DefaultQsConfig.EnableAutoCommit, "if the flag is on, a DML outsides a transaction will be auto committed.")
57
+
flag.BoolVar(&Config.EnableAutoCommit, "enable-autocommit", DefaultQsConfig.EnableAutoCommit, "if the flag is on, a DML outsides a transaction will be auto committed. This flag is deprecated and is unsafe. Instead, use the VTGate provided autocommit feature.")
58
58
flag.BoolVar(&Config.TwoPCEnable, "twopc_enable", DefaultQsConfig.TwoPCEnable, "if the flag is on, 2pc is enabled. Other 2pc flags must be supplied.")
59
59
flag.StringVar(&Config.TwoPCCoordinatorAddress, "twopc_coordinator_address", DefaultQsConfig.TwoPCCoordinatorAddress, "address of the (VTGate) process(es) that will be used to notify of abandoned transactions.")
60
60
flag.Float64Var(&Config.TwoPCAbandonAge, "twopc_abandon_age", DefaultQsConfig.TwoPCAbandonAge, "time in seconds. Any unresolved transaction older than this time will be sent to the coordinator to be resolved.")
@@ -69,6 +69,8 @@ func init() {
69
69
70
70
flag.BoolVar(&Config.HeartbeatEnable, "heartbeat_enable", DefaultQsConfig.HeartbeatEnable, "If true, vttablet records (if master) or checks (if replica) the current time of a replication heartbeat in the table _vt.heartbeat. The result is used to inform the serving state of the vttablet via healthchecks.")
71
71
flag.DurationVar(&Config.HeartbeatInterval, "heartbeat_interval", DefaultQsConfig.HeartbeatInterval, "How frequently to read and write replication heartbeat.")
72
+
73
+
flag.BoolVar(&Config.EnforceStrictTransTables, "enforce_strict_trans_tables", DefaultQsConfig.EnforceStrictTransTables, "If true, vttablet requires MySQL to run with STRICT_TRANS_TABLES on. It is recommended to not turn this flag off. Otherwise MySQL may alter your supplied values before saving them to the database.")
72
74
}
73
75
74
76
// Init must be called after flag.Parse, and before doing any other operations.
@@ -115,6 +117,8 @@ type TabletConfig struct {
115
117
116
118
HeartbeatEnablebool
117
119
HeartbeatInterval time.Duration
120
+
121
+
EnforceStrictTransTablesbool
118
122
}
119
123
120
124
// DefaultQsConfig is the default value for the query service config.
@@ -162,6 +166,8 @@ var DefaultQsConfig = TabletConfig{
162
166
163
167
HeartbeatEnable: false,
164
168
HeartbeatInterval: 1*time.Second,
169
+
170
+
EnforceStrictTransTables: true,
165
171
}
166
172
167
173
// defaultTxThrottlerConfig formats the default throttlerdata.Configuration
0 commit comments