Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does SQLite return different values if run with Administrator access?

Tags:

sqlite

When I run the official SQLite binary provided from the authors website with the query: SELECT DISTINCT f.id FROM foo f, bar b WHERE f.id=b.id AND b.type='baz' it returns different results whether sqlite was run as administrator or normal. How/why can this happen?

I have no idea how to replicate this behavior to show you without providing the actual database itself (which i cannot do). Therefore any ideas to help me solve this would be greatly appreciated.

EDIT: the query SELECT name, rootpage FROM sqlite_master; is also returning different results: there are rows missing and page indexes are also different.

like image 627
chacham15 Avatar asked Mar 03 '26 05:03

chacham15


1 Answers

(moving from the comments)

That's due to automatic folder redirection. If a non-Vista aware program tries to write in Program Files with an unprivileged account, Windows silently redirects the new files into a user-specific folder, to enforce security settings without breaking old applications. In general, your application shouldn't write in Program Files.

See http://blogs.windows.com/windows/archive/b/developers/archive/2009/08/04/user-account-control-data-redirection.aspx for more info.

like image 194
Matteo Italia Avatar answered Mar 06 '26 17:03

Matteo Italia



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!