Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for deprecate-integer-display-length=true #19159

Merged
merged 6 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update the warning
  • Loading branch information
qiancai committed Nov 18, 2024
commit 391dd3e590c49776f1b3bb5bc780812a75bb2c73
8 changes: 4 additions & 4 deletions data-type-numeric.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ TiDB supports all the MySQL numeric types, including:

## Integer types

> **Warning:**
>
> Note that specifying an integer display width is not recommended.

TiDB supports all the MySQL integer types, including `INTEGER`/`INT`, `TINYINT`, `SMALLINT`, `MEDIUMINT`, and `BIGINT`. For more information, see [Integer Data Type Syntax in MySQL](https://dev.mysql.com/doc/refman/8.0/en/integer-types.html).

The following table summarizes field descriptions:

> **Warning:**
>
> Starting from v8.5.0, integer display width is deprecated ([`deprecate-integer-display-length`](/tidb-configuration-file.md#deprecate-integer-display-length) is true by default). Specifying display width for integer types is NOT recommended.

| Syntax Element | Description |
| -------- | ------------------------------- |
| M | the display width of the type. Optional. |
Expand Down
5 changes: 5 additions & 0 deletions data-type-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@ The definitions used for datatypes are specified as `T(M[, D])`. Where by:

- `T` indicates the specific data type.
- `M` indicates the maximum display width for integer types. For floating-point and fixed-point types, `M` is the total number of digits that can be stored (the precision). For string types, `M` is the maximum length. The maximum permissible value of M depends on the data type.

> **Warning:**
>
> Starting from v8.5.0, integer display width is deprecated ([`deprecate-integer-display-length`](/tidb-configuration-file.md#deprecate-integer-display-length) is true by default). Specifying display width for integer types is NOT recommended.

- `D` applies to floating-point and fixed-point types and indicates the number of digits following the decimal point (the scale).
- `fsp` applies to the `TIME`, `DATETIME`, and `TIMESTAMP` types and represents the fractional seconds precision. The `fsp` value, if given, must be in the range 0 to 6. A value of 0 signifies that there is no fractional part. If omitted, the default precision is 0.
Loading