Skip to content

Commit 8443fb2

Browse files
authored
functions-and-operators: remove MySQL Reference Manual links (#21821)
1 parent 3a64b22 commit 8443fb2

11 files changed

+129
-127
lines changed

functions-and-operators/bit-functions-and-operators.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ TiDB supports all of the [bit functions and operators](https://dev.mysql.com/doc
2020
| [`<<`](#-left-shift) | Left shift |
2121
| [`>>`](#-right-shift) | Right shift |
2222

23-
## [`BIT_COUNT()`](https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html#function_bit-count)
23+
## `BIT_COUNT()`
2424

2525
The `BIT_COUNT(expr)` function returns the number of bits that are set as 1 in `expr`.
2626

@@ -71,7 +71,7 @@ SELECT BIT_COUNT(INET_ATON('255.255.255.0'));
7171
1 row in set (0.00 sec)
7272
```
7373

74-
## [`&` (bitwise AND)](https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html#operator_bitwise-and)
74+
## `&` (bitwise AND)
7575

7676
The `&` operator performs a bitwise AND operation. It compares the corresponding bits of two numbers: if both corresponding bits are 1, the corresponding bit of the result is 1; otherwise, it is 0.
7777

@@ -129,7 +129,7 @@ SELECT INET_NTOA(INET_ATON('192.168.1.2') & INET_ATON('255.255.255.0'));
129129
1 row in set (0.00 sec)
130130
```
131131

132-
## [`~` (bitwise inversion)](https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html#operator_bitwise-invert)
132+
## `~` (bitwise inversion)
133133

134134
The `~` operator performs a bitwise inversion (or bitwise NOT) operation on a given value. It inverts each bit of the given value: bits that are 0 become 1, and bits that are 1 become 0.
135135

@@ -169,7 +169,7 @@ SELECT CONV(~ b'1111111111111111111111111111111111111111111111110000111100001111
169169
1 row in set (0.00 sec)
170170
```
171171

172-
## [`|` (bitwise OR)](https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html#operator_bitwise-or)
172+
## `|` (bitwise OR)
173173

174174
The `|` operator performs a bitwise OR operation. It compares the corresponding bits of two numbers: if at least one of the corresponding bits is 1, the corresponding bit in the result is 1.
175175

@@ -197,7 +197,7 @@ SELECT CONV(b'1010' | b'1100',10,2);
197197
1 row in set (0.00 sec)
198198
```
199199

200-
## [`^` (bitwise XOR)](https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html#operator_bitwise-xor)
200+
## `^` (bitwise XOR)
201201

202202
The `^` operator performs a bitwise XOR (exclusive OR) operation. It compares the corresponding bits of two numbers: if the corresponding bits are different, the corresponding bit in the result is 1.
203203

@@ -227,7 +227,7 @@ SELECT CONV(b'1010' ^ b'1100',10,2);
227227

228228
Note that the result is shown as `110` instead of `0110` because the leading zero is removed.
229229

230-
## [`<<` (left shift)](https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html#operator_left-shift)
230+
## `<<` (left shift)
231231

232232
The `<<` operator performs a left shift operation, which shifts the bits of a number to the left by a specified number of positions, filling the vacated bits with zeros on the right.
233233

@@ -261,7 +261,7 @@ SELECT n,1<<n,LPAD(CONV(1<<n,10,2),11,0) FROM cte;
261261
11 rows in set (0.00 sec)
262262
```
263263

264-
## [`>>` (right shift)](https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html#operator_right-shift)
264+
## `>>` (right shift)
265265

266266
The `>>` operator performs a right shift operation, which shifts the bits of a number to the right by a specified number of positions, filling the vacated bits with zeros on the left.
267267

functions-and-operators/encryption-and-compression-functions.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ TiDB supports most of the [encryption and compression functions](https://dev.mys
2626
| [`UNCOMPRESSED_LENGTH()`](#uncompressed_length) | Return the length of a string before compression |
2727
| [`VALIDATE_PASSWORD_STRENGTH()`](#validate_password_strength) | Validate the password strength |
2828

29-
### [`AES_DECRYPT()`](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_aes-decrypt)
29+
### `AES_DECRYPT()`
3030

3131
The `AES_DECRYPT(data, key [,iv])` function decrypts `data` that was previously encrypted using the [`AES_ENCRYPT()`](#aes_encrypt) function with the same `key`.
3232

@@ -47,7 +47,7 @@ SELECT AES_DECRYPT(0x28409970815CD536428876175F1A4923, 'secret');
4747
1 row in set (0.00 sec)
4848
```
4949

50-
### [`AES_ENCRYPT()`](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_aes-encrypt)
50+
### `AES_ENCRYPT()`
5151

5252
The `AES_ENCRYPT(data, key [,iv])` function encrypts `data` with `key` using the [Advanced Encryption Standard (AES)](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) algorithm.
5353

@@ -68,7 +68,7 @@ SELECT AES_ENCRYPT(0x616263,'secret');
6868
1 row in set (0.00 sec)
6969
```
7070

71-
### [`COMPRESS()`](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_compress)
71+
### `COMPRESS()`
7272

7373
The `COMPRESS(expr)` function returns a compressed version of the input data `expr`.
7474

@@ -122,7 +122,7 @@ SELECT LENGTH(a),LENGTH(COMPRESS(a)) FROM x;
122122
1 row in set (0.00 sec)
123123
```
124124

125-
### [`MD5()`](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_md5)
125+
### `MD5()`
126126

127127
The `MD5(expr)` function calculates a 128-bit [MD5](https://en.wikipedia.org/wiki/MD5) hash for the given argument `expr`.
128128

@@ -139,7 +139,7 @@ SELECT MD5('abc');
139139
1 row in set (0.00 sec)
140140
```
141141

142-
### [`PASSWORD()`](https://dev.mysql.com/doc/refman/5.7/en/encryption-functions.html#function_password)
142+
### `PASSWORD()`
143143

144144
> **Warning:**
145145
>
@@ -162,7 +162,7 @@ SELECT PASSWORD('secret');
162162
Warning (Code 1681): PASSWORD is deprecated and will be removed in a future release.
163163
```
164164

165-
### [`RANDOM_BYTES()`](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_random-bytes)
165+
### `RANDOM_BYTES()`
166166

167167
The `RANDOM_BYTES(n)` function returns `n` random bytes.
168168

@@ -179,11 +179,11 @@ SELECT RANDOM_BYTES(3);
179179
1 row in set (0.00 sec)
180180
```
181181

182-
### [`SHA()`](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_sha1)
182+
### `SHA()`
183183

184184
The `SHA()` function is an alias for [`SHA1`](#sha1).
185185

186-
### [`SHA1()`](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_sha1)
186+
### `SHA1()`
187187

188188
The `SHA1(expr)` function calculates a 160-bit [SHA-1](https://en.wikipedia.org/wiki/SHA-1) hash for the given argument `expr`.
189189

@@ -200,7 +200,7 @@ SELECT SHA1('abc');
200200
1 row in set (0.00 sec)
201201
```
202202

203-
### [`SHA2()`](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_sha2)
203+
### `SHA2()`
204204

205205
The `SHA2(str, n)` function calculates a hash using an algorithm from the [SHA-2](https://en.wikipedia.org/wiki/SHA-2) family. The `n` argument is used to select the algorithm. `SHA2()` returns `NULL` if any of the arguments are `NULL` or if the algorithm selected by `n` is unknown or unsupported.
206206

@@ -248,7 +248,7 @@ SELECT SM3('abc');
248248
1 row in set (0.00 sec)
249249
```
250250

251-
### [`UNCOMPRESS()`](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_uncompress)
251+
### `UNCOMPRESS()`
252252

253253
The `UNCOMPRESS(data)` function decompresses the data that was compressed with the [`COMPRESS()`](#compress) function.
254254

@@ -265,7 +265,7 @@ SELECT UNCOMPRESS(0x03000000789C72747206040000FFFF018D00C7);
265265
1 row in set (0.00 sec)
266266
```
267267

268-
### [`UNCOMPRESSED_LENGTH()`](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_uncompressed-length)
268+
### `UNCOMPRESSED_LENGTH()`
269269

270270
The `UNCOMPRESSED_LENGTH(data)` function returns the first 4 bytes of the compressed data, which store the length that the compressed string had before being compressed with the [`COMPRESS()`](#compress) function.
271271

@@ -282,7 +282,7 @@ SELECT UNCOMPRESSED_LENGTH(0x03000000789C72747206040000FFFF018D00C7);
282282
1 row in set (0.00 sec)
283283
```
284284

285-
### [`VALIDATE_PASSWORD_STRENGTH()`](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_validate-password-strength)
285+
### `VALIDATE_PASSWORD_STRENGTH()`
286286

287287
<CustomContent platform="tidb">
288288

functions-and-operators/json-functions/json-functions-aggregate.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ summary: Learn about JSON functions that aggregate JSON values.
77

88
The functions listed on this page are part of the [aggregate functions](/functions-and-operators/aggregate-group-by-functions.md) that TiDB supports, but are specific to working with JSON.
99

10-
## [JSON_ARRAYAGG()](https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_json-arrayagg)
10+
TiDB supports the [two aggregate JSON functions](https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html) available in MySQL 8.0.
11+
12+
## `JSON_ARRAYAGG()`
1113

1214
The `JSON_ARRAYAGG(key)` function aggregates values of keys into a JSON array according to the given `key`. `key` is typically an expression or a column name.
1315

@@ -28,7 +30,7 @@ SELECT JSON_ARRAYAGG(v) FROM (SELECT 1 'v' UNION SELECT 2);
2830
1 row in set (0.00 sec)
2931
```
3032

31-
## [JSON_OBJECTAGG()](https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_json-objectagg)
33+
## `JSON_OBJECTAGG()`
3234

3335
The `JSON_OBJECTAGG(key,value)` function aggregates keys and values of keys into a JSON object according to the given `key` and `value`. Both `key` or `value` are typically an expression or a column name.
3436

functions-and-operators/json-functions/json-functions-create.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ summary: Learn about JSON functions that create JSON values.
55

66
# JSON Functions That Create JSON Values
77

8-
This document describes JSON functions that create JSON values.
8+
TiDB supports all the [JSON functions that create JSON values](https://dev.mysql.com/doc/refman/8.0/en/json-creation-functions.html) available in MySQL 8.0.
99

10-
## [JSON_ARRAY()](https://dev.mysql.com/doc/refman/8.0/en/json-creation-functions.html#function_json-array)
10+
## `JSON_ARRAY()`
1111

1212
The `JSON_ARRAY([val[, val] ...])` function evaluates a (possibly empty) list of values and returns a JSON array containing those values.
1313

@@ -24,7 +24,7 @@ SELECT JSON_ARRAY(1,2,3,4,5), JSON_ARRAY("foo", "bar");
2424
1 row in set (0.00 sec)
2525
```
2626

27-
## [JSON_OBJECT()](https://dev.mysql.com/doc/refman/8.0/en/json-creation-functions.html#function_json-object)
27+
## `JSON_OBJECT()`
2828

2929
The `JSON_OBJECT([key, val[, key, val] ...])` function evaluates a (possibly empty) list of key-value pairs and returns a JSON object containing those pairs.
3030

@@ -41,7 +41,7 @@ SELECT JSON_OBJECT("database", "TiDB", "distributed", TRUE);
4141
1 row in set (0.00 sec)
4242
```
4343

44-
## [JSON_QUOTE()](https://dev.mysql.com/doc/refman/8.0/en/json-creation-functions.html#function_json-quote)
44+
## `JSON_QUOTE()`
4545

4646
The `JSON_QUOTE(str)` function returns a string as a JSON value with quotes.
4747

functions-and-operators/json-functions/json-functions-modify.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ summary: Learn about JSON functions that modify JSON values.
55

66
# JSON Functions That Modify JSON Values
77

8-
This document describes JSON functions that modify JSON values.
8+
TiDB supports all the [JSON functions that modify JSON values](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html) available in MySQL 8.0.
99

10-
## [JSON_APPEND()](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-append)
10+
## `JSON_APPEND()`
1111

1212
An alias to [`JSON_ARRAY_APPEND()`](#json_array_append).
1313

14-
## [JSON_ARRAY_APPEND()](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-array-append)
14+
## `JSON_ARRAY_APPEND()`
1515

1616
The `JSON_ARRAY_APPEND(json_array, path, value [,path, value] ...)` function appends values to the end of the indicated arrays within a JSON document at the specified `path` and returns the result.
1717

@@ -49,7 +49,7 @@ SELECT JSON_ARRAY_APPEND('{"transport_options": ["Car", "Boat", "Train"]}', '$.t
4949
1 row in set (0.00 sec)
5050
```
5151

52-
## [JSON_ARRAY_INSERT()](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-array-insert)
52+
## `JSON_ARRAY_INSERT()`
5353

5454
The `JSON_ARRAY_INSERT(json_array, path, value [,path, value] ...)` function inserts a `value` into the specified position of the `json_array` in the `path` and returns the result.
5555

@@ -87,7 +87,7 @@ SELECT JSON_ARRAY_INSERT('["Car", "Boat", "Train"]', '$[1]', "Airplane") AS "Tra
8787
1 row in set (0.00 sec)
8888
```
8989

90-
## [JSON_INSERT()](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-insert)
90+
## `JSON_INSERT()`
9191

9292
The `JSON_INSERT(json_doc, path, value [,path, value] ...)` function inserts one or more values into a JSON document and returns the result.
9393

@@ -125,7 +125,7 @@ SELECT JSON_INSERT('{"a": 61, "b": 62}', '$.a', 41, '$.c', 63);
125125
1 row in set (0.00 sec)
126126
```
127127

128-
## [JSON_MERGE_PATCH()](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-merge-patch)
128+
## `JSON_MERGE_PATCH()`
129129

130130
The `JSON_MERGE_PATCH(json_doc, json_doc [,json_doc] ...)` function merges two or more JSON documents into a single JSON document, without preserving values of duplicate keys. For `json_doc` arguments with duplicated keys, only the values from the later specified `json_doc` argument are preserved in the merged result.
131131

@@ -150,7 +150,7 @@ SELECT JSON_MERGE_PATCH(
150150
1 row in set (0.00 sec)
151151
```
152152

153-
## [JSON_MERGE_PRESERVE()](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-merge-preserve)
153+
## `JSON_MERGE_PRESERVE()`
154154

155155
The `JSON_MERGE_PRESERVE(json_doc, json_doc [,json_doc] ...)` function merges two or more JSON documents while preserving all values associated with each key and returns the merged result.
156156

@@ -171,15 +171,15 @@ SELECT JSON_MERGE_PRESERVE('{"a": 1, "b": 2}','{"a": 100}', '{"c": 300}');
171171
1 row in set (0.00 sec)
172172
```
173173

174-
## [JSON_MERGE()](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-merge)
174+
## `JSON_MERGE()`
175175

176176
> **Warning:**
177177
>
178178
> This function is deprecated.
179179
180180
A deprecated alias for [`JSON_MERGE_PRESERVE()`](#json_merge_preserve).
181181

182-
## [JSON_REMOVE()](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-remove)
182+
## `JSON_REMOVE()`
183183

184184
The `JSON_REMOVE(json_doc, path [,path] ...)` function removes data of the specified `path` from a JSON document and returns the result.
185185

@@ -215,7 +215,7 @@ SELECT JSON_REMOVE('{"a": 61, "b": 62, "c": 63}','$.b','$.c');
215215
1 row in set (0.00 sec)
216216
```
217217

218-
## [JSON_REPLACE()](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-replace)
218+
## `JSON_REPLACE()`
219219

220220
The `JSON_REPLACE(json_doc, path, value [, path, value] ...)` function replaces values in specified paths of a JSON document and returns the result. If a specified path does not exist, the value corresponding to the path is not added to the result.
221221

@@ -253,7 +253,7 @@ SELECT JSON_REPLACE('{"a": 41, "b": 62}','$.b',42,'$.c',43);
253253
1 row in set (0.00 sec)
254254
```
255255

256-
## [JSON_SET()](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-set)
256+
## `JSON_SET()`
257257

258258
The `JSON_SET(json_doc, path, value [,path, value] ...)` function inserts or updates data in a JSON document and returns the result.
259259

@@ -291,7 +291,7 @@ SELECT JSON_SET('{"version": 1.1, "name": "example"}','$.version',1.2,'$.branch'
291291
1 row in set (0.00 sec)
292292
```
293293

294-
## [JSON_UNQUOTE()](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-unquote)
294+
## `JSON_UNQUOTE()`
295295

296296
The `JSON_UNQUOTE(json)` function unquotes a JSON value and returns the result as a string. This is the opposite of the [`JSON_QUOTE()`](/functions-and-operators/json-functions/json-functions-create.md#json_quote) function.
297297

functions-and-operators/json-functions/json-functions-return.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ summary: Learn about JSON functions that return JSON values.
55

66
# JSON Functions That Return JSON Values
77

8-
This document describes JSON functions that return JSON values.
8+
TiDB supports all the [JSON functions that return JSON value attributes](https://dev.mysql.com/doc/refman/8.0/en/json-attribute-functions.html) available in MySQL 8.0.
99

10-
## [JSON_DEPTH()](https://dev.mysql.com/doc/refman/8.0/en/json-attribute-functions.html#function_json-depth)
10+
## `JSON_DEPTH()`
1111

1212
The `JSON_DEPTH(json_doc)` function returns the maximum depth of a JSON document.
1313

@@ -32,7 +32,7 @@ SELECT JSON_DEPTH('{"weather": {"current": "sunny"}}');
3232
1 row in set (0.00 sec)
3333
```
3434

35-
## [JSON_LENGTH()](https://dev.mysql.com/doc/refman/8.0/en/json-attribute-functions.html#function_json-length)
35+
## `JSON_LENGTH()`
3636

3737
The `JSON_LENGTH(json_doc [,path])` function returns the length of a JSON document. If a `path` argument is given, it returns the length of the value within the path.
3838

@@ -68,7 +68,7 @@ SELECT JSON_LENGTH('{"weather": {"current": "sunny", "tomorrow": "cloudy"}}','$.
6868
1 row in set (0.01 sec)
6969
```
7070

71-
## [JSON_TYPE()](https://dev.mysql.com/doc/refman/8.0/en/json-attribute-functions.html#function_json-type)
71+
## `JSON_TYPE()`
7272

7373
The `JSON_TYPE(json_val)` function returns a string indicating [the type of a JSON value](/data-type-json.md#json-value-types).
7474

@@ -132,7 +132,7 @@ SELECT JSON_TYPE('"2025-06-14"'),JSON_TYPE(CAST(CAST('2025-06-14' AS date) AS js
132132
1 row in set (0.00 sec)
133133
```
134134

135-
## [JSON_VALID()](https://dev.mysql.com/doc/refman/8.0/en/json-attribute-functions.html#function_json-valid)
135+
## `JSON_VALID()`
136136

137137
The `JSON_VALID(str)` function checks if the argument is valid JSON. This can be useful for checking a column before converting it to the `JSON` type.
138138

0 commit comments

Comments
 (0)