| 8059 18.12.2011 17:38:31, by
lester_cheung
Replacing NULL characters with spaces.
Some files log files contains NULL characters and track2sql would happily convert them into SQL statements. This may cause problem when we insert the generated statements into the database. For example:
$ xzcat log.gz| php track2sql.php - -| mysql mydb ERROR 1064 (42000) at line 73164: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '07d4e0a7-1b46-d94f-662d-a69a1ee2266f','trigger',54,0,53,1,0,0,1,1448,0,0,0,1,0,0' at line 1.
... which is not very helpful as it's not referring to the SQL statement which contains the NULL chars. |