Details
Description
JSON_LENGTH documented (both for MariaDB and MySQL) as taking one mandatory and one optional parameter:
JSON_LENGTH(json_doc[, path])
|
However, in MariaDB it accepts extra parameters without complaining:
10.5 1b12e251 |
MariaDB [test]> SELECT JSON_LENGTH('{"a":"b"}','$','$', 'foo'); |
+-----------------------------------------+ |
| JSON_LENGTH('{"a":"b"}','$','$', 'foo') | |
+-----------------------------------------+ |
| 1 |
|
+-----------------------------------------+ |
1 row in set (0.000 sec) |
MySQL returns an error:
MySQL [test]> SELECT JSON_LENGTH('{"a":"b"}','$','$', 'foo'); |
ERROR 1582 (42000): Incorrect parameter count in the call to native function 'JSON_LENGTH' |