| Bug #45273 | optimizer_switch docs should state that spaces can't be present in SET statement | ||
|---|---|---|---|
| Submitted: | 2 Jun 2009 18:19 | Modified: | 3 Jun 2009 15:03 |
| Reporter: | Patrick Crews | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
| Version: | 5.1+ | OS: | Any |
| Assigned to: | Paul DuBois | CPU Architecture: | Any |
| Tags: | documentation, Optimizer, optimizer_switch, system variables, whitespace | ||
[2 Jun 2009 18:19]
Patrick Crews
[2 Jun 2009 18:23]
Paul DuBois
This isn't a bug. The docs say "comma separated." Spaces are not commas, so they're not allowed, just like #, *, %, etc. are not allowed. Similar considerations apply to other variables such as sql_mode.
[2 Jun 2009 18:39]
Paul DuBois
Alternatively, reclassify as feature request and change parsing for system variables that take SET-style values to produce a warning, the same way you get a warning if you assign a SET column a value containing spaces:
mysql> insert t values('a, b, c');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> show warnings;
+---------+------+----------------------------------------+
| Level | Code | Message |
+---------+------+----------------------------------------+
| Warning | 1265 | Data truncated for column 's' at row 1 |
+---------+------+----------------------------------------+
1 row in set (0.00 sec)
mysql> insert t values('a,b,c');
Query OK, 1 row affected (0.00 sec)
