Closed arvidfm closed 1 month ago
Hey @arvidfm, fix is in vitess repo (our parsing code) and making its way to dolt. Expect to see a release with the fix later this week.
With these new changes, we should be a more lenient than MySQL for backticks now. In addition to the explams you provided above, you can
tmp/main*> set @abc.`def ghi` = 100;
tmp/main*> select @abc.`def ghi`;
+--------------+
| @abc.def ghi |
+--------------+
| 100 |
+--------------+
1 row in set (0.00 sec)
in dolt, while that would result in syntax errors in MySQL, so that's useful I guess.
MySQL allows for escaping variable names with backticks using the following syntax:
Dolt, however, appears to interpret the backticks as part of the variable name:
Not much of a problem in practice as you can simply remove the backticks, but it can cause issues if using a query builder that automatically escapes idents, or if you for whatever godforsaken reason need to include spaces in your variable name: