4paradigm / 4paradigm/OpenMLDB
SQL: Add Identifier Length Limits
- Vorherrschende Sprache
- C++
- Sterne
- 1.7k
- Forks
- 331
- Ø Merge
- 12 T. 12 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
**Is your feature request related to a problem? Please describe.**
Certain objects within OpenMLDB, including database, table, index, column, etc are known as identifiers.
Now the identifiers in OpenMLDB do not have specific string limits which might introduce risks into our system.
In this issue, we are going to apply restrictions on the maximum length of each type of identifier.
#### reference
https://dev.mysql.com/doc/refman/8.0/en/identifier-length.html
**Describe the solution you'd like**
- Assert identifier length size in ASTNodeConverter.
- Identifier size should be <= 64
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
Beitragsleitfaden
Rechercherichtung
The issue mentions adding length checks in ASTNodeConverter. Start by locating this converter in the codebase, likely in the SQL parser or compiler module. Examine how identifiers are currently handled and where validation can be added. Refer to the MySQL documentation link for length limits. Write tests to verify that identifiers longer than 64 characters are rejected.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- sql
- Bereich
- backend, database
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100