This line does not work correctly with partitions in MySQL databases.
Example
If the SQL file contains a partitioned table like the one below:
CREATE TABLE my_table (
id mediumint(8) NOT NULL DEFAULT 0,
field_code int(3) NOT NULL DEFAULT 0,
field_subcode int(3) NOT NULL DEFAULT 0,
value text NOT NULL,
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci
PARTITION BY KEY (field_code, field_subcode)
PARTITIONS 50;
The current mechanism produces an incorrect line such as
Problem Description
https://github.com/ifsnop/mysqldump-php/blob/2d3a43fc0c49f23bf7dee392b0dd1f8c799f89d3/src/Ifsnop/Mysqldump/Mysqldump.php#L302
This line does not work correctly with partitions in MySQL databases.
Example
If the SQL file contains a partitioned table like the one below:
The current mechanism produces an incorrect line such as
Solution
Remove the
trim
function.