diff --git a/functions-and-operators/bit-functions-and-operators.md b/functions-and-operators/bit-functions-and-operators.md index 1430d63bcdb6b..3760495c08e54 100644 --- a/functions-and-operators/bit-functions-and-operators.md +++ b/functions-and-operators/bit-functions-and-operators.md @@ -6,7 +6,7 @@ aliases: ['/docs/dev/functions-and-operators/bit-functions-and-operators/','/doc # Bit Functions and Operators -TiDB supports all of the [bit functions and operators](https://dev.mysql.com/doc/refman/5.7/en/bit-functions.html) available in MySQL 5.7. +TiDB supports all of the [bit functions and operators](https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html) available in MySQL 8.0. **Bit functions and operators:** @@ -19,3 +19,14 @@ TiDB supports all of the [bit functions and operators](https://dev.mysql.com/doc | [^](https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html#operator_bitwise-xor) | Bitwise XOR | | [<<](https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html#operator_left-shift) | Left shift | | [>>](https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html#operator_right-shift) | Right shift | + +## MySQL compatibility + +There are some differences between MySQL 8.0 and earlier versions of MySQL in handling bit functions and operators. TiDB aims to follow the behavior of MySQL 8.0. + +## Known issues + +In the following cases, the query results in TiDB are the same as MySQL 5.7 but different from MySQL 8.0. + +- Bitwise operations with binary arguments. For more information, see [#30637](https://github.com/pingcap/tidb/issues/30637). +- The result of the `BIT_COUNT()` function. For more information, see [#44621](https://github.com/pingcap/tidb/issues/44621).