On Monday, 2 March 2015 at 07:20:49 UTC, Vitalie Colosov wrote:
Now it all makes sense. Thank you.
Maybe it would make also some sense if I would have gotten some
kind of exception trying to access the variable which was not
populated by the running thread, instead of successfully
getting empty string... so this would be observed easily during
the testing, but perhaps there are some reasons for it being
implemented the way it is, will keep learning.
In your case you probably accessed uninitialized variable.
Sentinel values can be used for this, i.e. a value that, when
accessed by sqlite, gives you a descriptive error. So if this
sentinel value is set as default value for a query structure, you
will get it in uninitialized variables by default and receive
errors when they are used by sqlite.