sql-parser icon indicating copy to clipboard operation
sql-parser copied to clipboard

Don't add too many spaces when replacing clauses

Open MoonE opened this issue 1 year ago • 1 comments

There were unnecessary spaced included in the statement when

  • a clause is removed (replaced with empty string)
  • the replacement string already has spaces
  • the replacement was at the start or end of the statement

This will require some tests to be updated in phpMyAdmin. e. g.: https://github.com/phpmyadmin/phpmyadmin/blob/99c2939eda6c1c3ab9ffe4b1f903bab182d686db/test/classes/Display/ResultsTest.php#L1469

MoonE avatar May 09 '24 22:05 MoonE

I think this should target the master branch.

MauricioFauth avatar May 23 '24 18:05 MauricioFauth