Commit f777d41
Prevent user and system variables in column default and generated values
This change adds validation to prevent user variables (@variable) and system
variables (@@variable) from being used in column default value expressions
and generated column expressions, matching MySQL's behavior.
Added ErrColumnDefaultUserVariable error and validation logic in
validateColumnDefault function to detect UserVar and SystemVar expressions.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 1af0f6e commit f777d41
2 files changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
236 | 239 | | |
237 | 240 | | |
238 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
| |||
0 commit comments