[MDEV-19728] Comments in SQL Created: 2019-06-11 Updated: 2019-06-12 Resolved: 2019-06-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | N/A |
| Affects Version/s: | 10.4.5 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Wolfgang Draxler | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows |
||
| Issue Links: |
|
||||||||
| Description |
|
I have found the following problem: e.g.
Error:
then I get no error and get the correct result. |
| Comments |
| Comment by Alice Sherepa [ 2019-06-11 ] | ||||||||||||||||||||||||||||||||||
|
This is not a bug, a comment requires the second dash to be followed by at least one whitespace or control character (such as a space, tab, newline, and so on) (https://mariadb.com/kb/en/library/comment-syntax/ ) to prevent problems with negative numbers
| ||||||||||||||||||||||||||||||||||
| Comment by Wolfgang Draxler [ 2019-06-11 ] | ||||||||||||||||||||||||||||||||||
|
For numbers, this is also the case with the Oracle database.
But if after the --a sign comes, then it's a comment. And so that is a bug. In Oracle mode at all (SET SESSION sql _ mode = ORACLE; ) | ||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2019-06-11 ] | ||||||||||||||||||||||||||||||||||
|
I am not sure what do you mean. It works the same way in Oracle mode.
| ||||||||||||||||||||||||||||||||||
| Comment by Wolfgang Draxler [ 2019-06-11 ] | ||||||||||||||||||||||||||||||||||
|
by numbers works MariaDB and Oralce equal. That ist correct.
But what I mean is, that by characters is not equal
by MariaDB I get the error "ERROR 1064 (42000): ...." by Oracle I get no error, because oracle interpret this is as a comment | ||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2019-06-11 ] | ||||||||||||||||||||||||||||||||||
|
I see, you are right. There is a task to implement it - MDEV-12087. | ||||||||||||||||||||||||||||||||||
| Comment by Wolfgang Draxler [ 2019-06-12 ] | ||||||||||||||||||||||||||||||||||
|
Thank you. |