python-database-sanitizer
python-database-sanitizer copied to clipboard
mysql decoder doesn't recognise negative ints
I had a dump fail on an int field with -1 in it. I'm afraid I haven't put together an MRE, but it's very obvious that in https://github.com/andersinno/python-database-sanitizer/blob/master/database_sanitizer/utils/mysql.py#L67 MIN_INT_PATTERN doesn't cover negative numbers.
MYSQL_FLOAT_PATTERN = re.compile(r"^[+-]?\d*\.\d+([eE][+-]?\d+)?$")
MYSQL_INT_PATTERN = re.compile(r"^\d+$")