Open sowebio opened 1 year ago
The abstract function Escape_String has 2 implementations:
The mysql_real_escape_string documentation has a note which points out the NO_BACKSLASH_ESCAPES SQL mode. In this mode is enabled the function cannot escape quote characters except by doubling them.
Before making changes in Gnoga, how to deal with this mode?
In gnoga-database-server-sqlite.adb, the Escape_String function was outputting nonsense.
Below is the corrected version, which is consistent with the version of gnoga-database-server-mysql.adb gnoga-database-server-mysql.adb using an internal function of libmysql/libmariadb.I confess I didn't look to see if it handles more cases than I did and which correspond to the Ada example...
Example before/after correction with the db_sqlite.adb test