| Bug #74834 | int variable in LEFT() reported as not valid | ||
|---|---|---|---|
| Submitted: | 13 Nov 2014 8:23 | Modified: | 13 Nov 2014 8:53 |
| Reporter: | Stian Skjerveggen | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Workbench: SQL Editor | Severity: | S3 (Non-critical) |
| Version: | 6.2.3 | OS: | Windows (Microsoft Windows 7 Ultimate) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | WBBugReporter | ||
[13 Nov 2014 8:53]
MySQL Verification Team
Thank you for the bug report. This issue is most likely fixed post Bug #74439 Marking as duplicate of Bug #74439 which is fixed as of the upcoming MySQL Workbench 6.2.4 release Thanks, Umesh

Description: The statement SET @input = 'lorem-ipsum'; SELECT LEFT(@input, LOCATE('-', @input) - 1); gives the following error: LOCATE(identifier) is not valid input at this position - but it runs fine, and show the 'lorem' part as it should. The following statement SELECT SUBSTRING(@input, 1, LOCATE('-', @input) - 1); does not give any warnings. Why are you registering input from identifiers as errors for LEFT()? See also http://stackoverflow.com/questions/26159059/cannot-use-int-variable-in-mysql-left-function (not mine) How to repeat: paste SET @input = 'lorem-ipsum'; SELECT LEFT(@input, LOCATE('-', @input) - 1); into a mysql workbench SQL tab Suggested fix: remove errortext