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
Copy file name to clipboardExpand all lines: system-variables.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -324,7 +324,15 @@ Constraint checking is always performed in place for pessimistic transactions (d
324
324
325
325
- Scope: SESSION | GLOBAL
326
326
- Default value: 0
327
-
- This variable is used to control whether to enable `get_lock`and`release_lock` functions. These two functions are not implemented, and always return 1in the current version of TiDB.
327
+
- By default, TiDB returns an error when you attempt to use the syntax for functionality that is not yet implemented. When the variable value is set to `1`, TiDB silently ignores such cases of unavailable functionality, which is helpful if you cannot make changes to the SQL code.
328
+
- Enabling `noop` functions controls the following behaviors:
329
+
*`get_lock`and`release_lock` functions
330
+
*`LOCK IN SHARE MODE` syntax
331
+
*`SQL_CALC_FOUND_ROWS` syntax
332
+
333
+
>**Note:**
334
+
>
335
+
> Only the default value of `0` can be considered safe. Setting `tidb_enable_noop_functions=1` might lead to unexpected behaviors in your application, because it permits TiDB to ignore certain syntax without providing an error.
328
336
329
337
### tidb_enable_slow_log
330
338
@@ -606,7 +614,7 @@ Constraint checking is always performed in place for pessimistic transactions (d
606
614
- This variable is used to set whether the optimizer executes the optimization operation of pushing down the aggregate function with `distinct` (such as`select count(distinct a) from t`) to Coprocessor.
607
615
- When the aggregate function with the `distinct` operation is slow in the query, you can set the variable value to `1`.
608
616
609
-
In the following example, before `tidb_opt_distinct_agg_push_down` is enabled, TiDB needs to read all data from TiKV and execute `disctinct`on the TiDB side. After `tidb_opt_distinct_agg_push_down` is enabled, `distinct a` is pushed down to Coprocessor, and a `group by` column `test.t.a` is added to `HashAgg_5`.
617
+
In the following example, before `tidb_opt_distinct_agg_push_down` is enabled, TiDB needs to read all data from TiKV and execute `distinct`on the TiDB side. After `tidb_opt_distinct_agg_push_down` is enabled, `distinct a` is pushed down to Coprocessor, and a `group by` column `test.t.a` is added to `HashAgg_5`.
0 commit comments