[Cod-bugs] COD to sqlite3 error

Antanas Vaitkus antanas.vaitkus90 at gmail.com
Mon Jan 27 14:08:52 EET 2025


Dear Nicola,

I am glad to hear it worked. I have updated our documentation accordingly.

Sincerely
Antanas

On Mon, 27 Jan 2025 at 10:01, Nicola Döbelin <support at profex-xrd.org> wrote:

> Dear Antanas,
>
> The modified script works perfectly. Thanks a lot for your help!
>
> Best regards,
> Nicola
>
>
> On 1/24/25 21:23, Antanas Vaitkus wrote:
>
> Dear Nicola,
>
> The issue seems to arise due to inline comments output by MariaDB,
> (e.g. "`time` time /* mariadb-5.3 */ DEFAULT NULL,") since sqlt MySQL
> parser does not know how to handle them.
>
> I have updated the script you sent to circumvent the issue. Please give
> it a try and let us know if this fully solves your issue. The script does
> work correctly on my machine.
>
> If this solution works for you, I will update the documentation
> accordingly.
>
> Sincerely,
> Antanas
>
> On Fri, 24 Jan 2025 at 15:22, Nicola Döbelin <support at profex-xrd.org>
> wrote:
>
>> Hello,
>>
>> I am the programmer of the Rietveld refinement software Profex. In the
>> past few years, I used to convert the COD to sqlite3 to bundle it with
>> Profex. For the conversion I used the attached bash script, which I
>> created based on the information given on the COD wiki:
>>
>> https://wiki.crystallography.net/creatingSQLdatabase/
>>
>> However, this year the script no longer works and generates the
>> following error message:
>>
>> #-- begin output --
>>
>> updating svn
>> Updating '.':
>> At revision 297460.
>> converting mysql to sqlite
>>
>>        ERROR (line 13): Invalid statement: Was expecting comment, or use,
>> or
>>                         set, or drop, or create, or alter, or insert, or
>>                         delimiter, or empty statement
>> Error: translate: Error with parser 'SQL::Translator::Parser::MySQL':
>> no results at /usr/bin/sqlt line 353.
>> replacing escape sequences
>> importing data
>> CREATE TABLE data(...) failed: duplicate column name: 90
>> creating cod-250124.db
>> compressing
>>    adding: cod-250124.db3 (stored 0%)
>>
>> #-- end output --
>>
>> The resulting *.db3 file is empty. I always update the sqlite3 COD
>> version in January, so the break must have occurred some time between
>> Jan 2024 and Jan 2025. I also tried to run the script on an older Ubuntu
>> 20.04 system on which it used to work in the past, but to no avail.
>> Since I am not familiar with MySQL and have very limited experience with
>> sqlite, I would like to ask for help to create an updated sqlite version
>> of the COD that I can bundle with Profex.
>>
>> Any help will be appreciated.
>> Kind regards,
>> Nicola
>>
>> --
>> Nicola Döbelin
>> Web: https://www.profex-xrd.org
>> E-Mail: support at profex-xrd.org
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>> _______________________________________________
>> Cod-bugs mailing list
>> Cod-bugs at lists.crystallography.net
>> http://lists.crystallography.net/cgi-bin/mailman/listinfo/cod-bugs
>>
>
>
> --
> Antanas Vaitkus,
> Vilnius University,
> Life Sciences Center,
> Institute of Biotechnology,
> room C521, Saulėtekio al. 7,
> LT-10257 Vilnius, Lithuania
>
>
>
>

-- 
Antanas Vaitkus,
Vilnius University,
Life Sciences Center,
Institute of Biotechnology,
room C521, Saulėtekio al. 7,
LT-10257 Vilnius, Lithuania

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.crystallography.net/pipermail/cod-bugs/attachments/20250127/9c9720db/attachment.htm>


More information about the Cod-bugs mailing list