Hi, I'm working on migrating a populated gerrit H2 database to mariadb and although I got this to work originally by using the H2 SCRIPT command and a script to modify the file to fit mysql syntax it's sloppy. A better solution I feel is to do a CSVWRITE on each table and import that directly into my new db. Every table works perfectly except one, PATCH_COMMENTS, which has a column MESSAGE with user entered data. There are new lines, tabs, spaces, etc in this MESSAGE column. When I do a CSVWRITE the newlines are not escaped (which is stated in http://www.h2database.com/html/grammar.html#csv_options) so my csv has actual new lines breaking up the csv entries.
My initial try was to use a series of special character strings to separate fields and rows vs new lines. Again every table worked except PATCH_COMMENTS In my script my $uniqueSepartor = "\@#!!#\@"; my $lineEnding = "#%#"; ...... charset=UTF-8 fieldDelimiter=\\\^ fieldSeparator=$uniqueSepartor rowSeparator=$lineEnding .... Ideally the new lines would show up as literal \n as they do with the SCRIPT command or other dump commads like mysqldump I tried modifying the escape field, but I don't think this does what I expect. escape=\\\n Any advice would be appreciated. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
