-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Currently, the logic check for invalid table names is:
SET @AcceptableSymbols = '_$' TABLE_NAME COLLATE SQL_LATIN1_GENERAL_CP1_CI_AI Like '%[^a-z' + @AcceptableSymbols + ']%'
The way I read that is if the table name has any character, anywhere in the table name that isn't an underscore, dollar sign, or the letters a through z, fail. A few problems in that logic:
Tables that start with underscore or dollar sign would require brackets.
Tables can have numerics in the name (just not for the first character)
Tables could have a space if they are bracketed.
Should this test assume brackets are in use when needed? Should this test actually attempt to create a table with the given name to test it's valiidty like this solution on StackOverflow?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels