Skip to content

Releases: jimmyalcala/clean-sql

v1.2.0

Choose a tag to compare

@jimmyalcala jimmyalcala released this 07 Apr 23:01

What's New

  • Null byte stripping — removes \0 bytes that cause ASCII '\0' appeared in the statement errors
  • Double-escaped quote fix — detects and fixes \\'\' from backup tool bugs (e.g. hold\\'emhold\'em)
  • Trailing backslash fix — detects values ending with \ where the dump writes \' instead of \\', causing the string to never close
  • Progress bar — real-time progress showing percentage, bytes processed, and fix count when processing files
  • Smart CSS-safe heuristic — the escape-fix look-ahead correctly ignores CSS properties inside HTML email templates (e.g. gradient(startColorstr=\'#fff\'))

Errors Resolved

Error Fix
Reserved words as column names (ERROR 1064) Backtick-quotes them
Literal newlines in strings (Unknown command '\') Escapes as \n
Foreign key constraints (ERROR 1451) --disable-fk flag
Null bytes (ASCII '\0') Strips them
Double-escaped quotes (ERROR 1064) \\'\'
Trailing backslash values (Unknown command '\') \'\\'

Install

curl -sSL https://raw.githubusercontent.com/jimmyalcala/clean-sql/main/install.sh | sh

Or download a binary below for your platform.

v1.1.0

Choose a tag to compare

@jimmyalcala jimmyalcala released this 26 Mar 16:52

What's New

  • --update: Self-update to the latest release (clean-sql --update)
  • --disable-fk: Wrap output with SET FOREIGN_KEY_CHECKS=0/1 to fix foreign key constraint errors (ERROR 1451) during import

Install / Update

# First install
curl -sSL https://raw.githubusercontent.com/jimmyalcala/clean-sql/main/install.sh | sh

# Update existing install
clean-sql --update

v1.0.0

Choose a tag to compare

@jimmyalcala jimmyalcala released this 26 Mar 16:42

Initial release — fixes MySQL/MariaDB ERROR 1064 caused by reserved words used as unquoted column names in INSERT...SET statements.

Install

curl -sSL https://raw.githubusercontent.com/jimmyalcala/clean-sql/main/install.sh | sh