Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question on using in memory db for examples/update.cpp #369

Closed
leonyu1010 opened this issue Sep 2, 2019 · 9 comments
Closed

Question on using in memory db for examples/update.cpp #369

leonyu1010 opened this issue Sep 2, 2019 · 9 comments

Comments

@leonyu1010
Copy link

Hi there, I am trying out the examples/update.cpp. It works fine as-is. However, if I change to in memory db as follows

stor = std::make_unique(initStorage(":memory:"));

then it would throw exception on the first call of stor->replace().

In comparison, examples/in_memory.cpp works fine for me.

What is the difference in terms of using in-memory DB between the two examples?

thank you for your time and help.

@fnc12
Copy link
Owner

fnc12 commented Sep 2, 2019

Yeah, I can reproduce it too. This is strange cause different example (iteration.cpp) works well with same steps. I need to investigate it more. Thank you

@unclevlad
Copy link

We are seeing the same issue after updating to the dev branch to use the new backup functionality. We had to work around it by always using files, which is fine, but destroys our performance, meaning we cannot release. Any idea on cause or estimate on fix?

@fnc12
Copy link
Owner

fnc12 commented Oct 16, 2019

I shall look through it in a few days. I am busy right now with reviewing the PR with code formatting and prepared statements feature. Sorry for waiting

@unclevlad
Copy link

unclevlad commented Oct 17, 2019

I have gone through all of the examples in the dev branch, and I cannot get a single one to work when using the "initStorage" technique with an in memory database. They all work fine with a file. The call to sync_schema passes, but any CRUD method causes an exception with no such table: [table name]: SQL logic error.

@fnc12
Copy link
Owner

fnc12 commented Oct 17, 2019

oops. Looks like something critical. Thank you. I shall look through it today or tomorrow

@fnc12
Copy link
Owner

fnc12 commented Oct 18, 2019

fix is on its way #402

@fnc12
Copy link
Owner

fnc12 commented Oct 19, 2019

bug is fixed. Please check out dev branch

@fnc12 fnc12 closed this as completed Oct 20, 2019
@helmesjo
Copy link

Any release inc with this fix? @fnc12

@fnc12
Copy link
Owner

fnc12 commented Nov 13, 2019

@helmesjo yes, in a month

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants