holzschu / a-Shell-commands

shell commands, pre-compiled to webAssembly, ready to use in a-Shell
554 stars 21 forks source link

Sqlite3 invalid database #26

Closed 0507spc closed 1 year ago

0507spc commented 1 year ago

I am not sure the command is working as expected:

[~/Documents]$ sqlite3.wasm test.db "create table hello('world');"
[~/Documents]$ ls -l test.db 
-rw-r--r--@ 1 mobile  mobile  8192 Aug 14 22:55 test.db
[~/Documents]$ sqlite3.wasm test.db "select world from hello;"
Error: in prepare, file is not a database (26)
[~/Documents]$ sqlite3.wasm test.db "insert into hello values ('1');"
Error: in prepare, file is not a database (26)
[~/Documents]$ sqlite3.wasm test.db "select world from hello;"
Error: in prepare, file is not a database (26)
[~/Documents]$ 
holzschu commented 1 year ago

Hi, Thanks for reporting that. It was actually an issue when writing to a file with offset 0, which is fixed in the recent TestFlight version: https://testflight.apple.com/join/REdHww5C

If the fix does not introduce any new bugs, I'll make a release.

0507spc commented 1 year ago

Thanks will check. Just realised I am on a-shell TestFlight version 1.9.2 and AppStore is newer at 1.9.4.

Will check out the TestFlight mini version now. Thanks.

holzschu commented 1 year ago

Yes, I haven't had an a-Shell TestFlight build approved since version 1.9.2 (for example, build 253 for version 1.9.5 has been "waiting for review" for 30 days now). Since builds for a-Shell mini have a faster turnaround, I'm relying on them more now.

0507spc commented 1 year ago

That's a shame, but Apple review process for you. :-(

a-shell mini works for the sqlite3 commands. Thank you so much!

mug any other issues arise with that version I will let you know. Thanks again!