Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.11, 11.4, 11.8, 12.3, 13.0, 13.1
Description
SELECT LPAD('abc', 10, ''), RPAD('abc', 10, '');
– MariaDB: NULL NULL <-- empty padstr makes the whole function NULL
– MySQL: abc abc <-- returns the original string when padding is impossible/unneeded
SELECT LPAD('abc', 3, '') AS l2; – length already satisfied, no pad needed at all:
– MariaDB: NULL MySQL: abc