Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3.25
-
ALL
Description
When using trim() with remove_str (for example trim(leading '*' from col_a)) using the spider storage engine, it fails with ERROR 1582 (42000): Incorrect parameter count in the call to native function 'ltrim')
How to Repeat
1. Create tables on backends:
bk.sql |
CREATE TABLE t1 (
|
id int,
|
info varchar(30)
|
)ENGINE=InnoDB;
|
2. Create the table on spider:
spider.sql |
CREATE TABLE t1 (
|
id int,
|
info varchar(30)
|
)ENGINE=Spider COMMENT='wrapper "mysql", table "t1"'
|
PARTITION BY LIST (id%2) (
|
PARTITION pt1 VALUES IN (0) COMMENT = 'srv "backend0"' ENGINE=SPIDER,
|
PARTITION pt2 VALUES IN (1) COMMENT = 'srv "backend1"' ENGINE=SPIDER
|
);
|
3. Then, execute a SQL with trim() on spider:
trim.sql |
MariaDB [test]> UPDATE t1 SET info = trim(LEADING '[' FROM info) WHERE id = 12345;
|
Then, it fails with error
ERROR 1582 (42000): Incorrect parameter count in the call to native function 'ltrim'