aergoio / litetree

SQLite with Branches
MIT License
1.62k stars 35 forks source link

branch PRAGMA not working: SQL logic error #4

Open hanxue opened 6 years ago

hanxue commented 6 years ago

I have compiled the latest litetree on macOS 10.10.5, and I cannot get the branch commands to work. From the output, the new commands are available, but for some reason just not working:

sqlite> PRAGMA new_branch=test at master.2;
Error: SQL logic error
sqlite> PRAGMA new_branch=test at master.1;
Error: SQL logic error
sqlite> PRAGMA new_branch=test at master;
Error: SQL logic error
sqlite> PRAGMA new_branch=test;
Error: SQL logic error
sqlite> PRAGMA new_branch;
Error: argument required
sqlite> PRAGMA branch;
sqlite> PRAGMA branches;
kroggen commented 6 years ago

Hi!

Have you run SQL commands in the database to create these commits?

Do the PRAGMA branch_info(master) returns something?

It appears that your SQLite shell is not using the modified SQLite library. It may be using the native one that comes with MacOSX.

Have you run sudo make install? And make test?

kroggen commented 6 years ago

Another method to check if the SQLite shell is using the LiteTree library is running this command:

PRAGMA journal_mode

It must return branches