Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.2.33, 10.3.24, 10.4.14, 10.5.5
-
None
Description
If you specify a space before the parenthesis, then some built-in functions will fail.
For example, see TRIM():
MariaDB [(none)]> SELECT TRIM ( 'foo' ); |
ERROR 1305 (42000): FUNCTION TRIM does not exist |
MariaDB [(none)]> SELECT TRIM( 'foo' ); |
+---------------+ |
| TRIM( 'foo' ) | |
+---------------+ |
| foo |
|
+---------------+ |
1 row in set (0.000 sec) |
And NOW():
MariaDB [(none)]> SELECT NOW (); |
ERROR 1305 (42000): FUNCTION NOW does not exist |
MariaDB [(none)]> SELECT NOW(); |
+---------------------+ |
| NOW() |
|
+---------------------+ |
| 2020-08-28 23:02:43 |
|
+---------------------+ |
1 row in set (0.005 sec) |
However, some built-in functions seem to work just fine in this case.
For example, see TRUNCATE():
MariaDB [(none)]> SELECT TRUNCATE ( 0.01, 2 ); |
+----------------------+ |
| TRUNCATE ( 0.01, 2 ) | |
+----------------------+ |
| 0.01 |
|
+----------------------+ |
1 row in set (0.000 sec) |
MariaDB [(none)]> SELECT TRUNCATE(0.01, 2); |
+-------------------+ |
| TRUNCATE(0.01, 2) | |
+-------------------+ |
| 0.01 |
|
+-------------------+ |
1 row in set (0.000 sec) |