libpinyin / ibus-libpinyin

GNU General Public License v3.0
627 stars 90 forks source link

Build fails with sqlite 3.41.0 #413

Closed andreasstieger closed 1 year ago

andreasstieger commented 1 year ago

Build fails with sqlite 3.41.0:

[   69s] gawk -f ./english.awk ./wordlist | /usr/bin/sqlite3 english.db || \
[   69s]    ( rm -f english.db ; exit 1 )
[   69s] Parse error near line 5: no such column: the
[   69s]   INSERT INTO english (word, freq) VALUES ("the", 6.510891);
[   69s]                              error here ---^
[   69s] Parse error near line 6: no such column: of
[   69s]   INSERT INTO english (word, freq) VALUES ("of", 3.095330);
[   69s]                              error here ---^
[   69s] Parse error near line 7: no such column: and
[   69s]   INSERT INTO english (word, freq) VALUES ("and", 2.822903);
[   69s]                              error here ---^

This is due to incorrect SQL and changed enforcement in that version: https://sqlite.org/releaselog/3_41_0.html

  1. Changes to the CLI: [...] f. The double-quoted string misfeature is now disabled by default for CLI builds. Legacy use cases can reenable the misfeature at run-time using the ".dbconfig dqs_dml on" and ".dbconfig dqs_ddl on" commands.

https://sqlite.org/quirks.html#dblquote

In your queries all string literals need to be given with single quotes. openSUSE bug: https://bugzilla.opensuse.org/show_bug.cgi?id=1208636

andreasstieger commented 1 year ago

@hillwoodroc See breakage in https://build.opensuse.org/request/show/1067521

andreasstieger commented 1 year ago

See #414

epico commented 1 year ago

Thanks for the report!