You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method getString() assumed that every string buffer read from InnoDB is null-ended, which holds for string values written by com.g414.haildb.TupleStorage.storeString but not for real InnoDB databases. So when I use the package to parse a InnoDB backup data file, there are always unexpected trailing characters beyond the real data.
I wonder if TupleStorage.loadString could use getByteArray() instead of getString() to read exactly the same size of string data as field length specified, like the following code snippets doing:
Of course TupleStorage.storeString also need to be changed to stop writing a extra null if this modification is made. By doing this, this project could be used to correctly parse offline MySQL InnoDB backups instead of just as a private storage engine.
The text was updated successfully, but these errors were encountered:
com.g414.haildb.TupleStorage.loadString
usedgetString()
to convert JNA pointer to Java string like this:The method
getString()
assumed that every string buffer read from InnoDB is null-ended, which holds for string values written bycom.g414.haildb.TupleStorage.storeString
but not for real InnoDB databases. So when I use the package to parse a InnoDB backup data file, there are always unexpected trailing characters beyond the real data.I wonder if
TupleStorage.loadString
could usegetByteArray()
instead ofgetString()
to read exactly the same size of string data as field length specified, like the following code snippets doing:Of course
TupleStorage.storeString
also need to be changed to stop writing a extra null if this modification is made. By doing this, this project could be used to correctly parse offline MySQL InnoDB backups instead of just as a private storage engine.The text was updated successfully, but these errors were encountered: