comment-syntax: add TiDB-specific comment syntax (#3238)#3249
Merged
Conversation
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
5 tasks
yikeke
reviewed
Jul 13, 2020
yikeke
reviewed
Jul 13, 2020
| SELECT STRAIGHT_JOIN col1 FROM table1,table2 WHERE ... | ||
| ``` | ||
|
|
||
| <<<<<<< HEAD |
yikeke
reviewed
Jul 13, 2020
Comment on lines
+140
to
+141
| * `/*T! Specific code */`: This syntax can only be parsed and executed by TiDB, and be ignored in other databases. | ||
| * `/*T![feature_id] Specific code */`: This syntax is used to ensure compatibility between different versions of TiDB. TiDB can parse the SQL fragment in this comment only if it implements the corresponding feature of `feature_id` in the current version. For example, as the `AUTO_RANDOM` feature is introduced in v3.1.1, this version of TiDB can parse `/*T![auto_rand] auto_random */` into `auto_random`. Because the `AUTO_RANDOM` feature is not implemented in v3.0.0, the SQL statement fragment above is ignored. |
Contributor
There was a problem hiding this comment.
Please remove changes from https://github.com/pingcap/docs-cn/pull/3477/files to align the English doc https://docs.pingcap.com/zh/tidb/v3.0/comment-syntax. @ireneontheway
Contributor
|
LGTM @yikeke |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cherry-pick #3238 to release-3.0
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?