-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Option -t in Version 3.11.99 (Feb 3 2020) does not load given table #2113
Comments
Was it working before in earlier versions and stopped in "Feb 3 2020" version? If yes then it's weird since nothing was changed other than updating SQLite version to the latest version (3.31.1). I tested both the 32-bit and 64-bit versions (latest nightly) and they are working without problems. Do you have a project file (.sqbpro) for this database that might be forcing a specific view on this database when it is opened? Do you use options other than |
It was working in my previous installation (current DB Browser for SQLite - PortableApp [SQLiteDatabaseBrowserPortable_3.11.2_English.paf.exe] from https://sqlitebrowser.org/dl/#windows -- downloaded that version again today and it works). I haven't been updating with every single nightly to know when it broke. No, just the -t option to go directly to the table of interest. |
Well, that's definitely a bug of some sort. 😉 |
Would you mind testing these two versions and tell us what each one of them does? |
Both versions do not work at all (with respect to the -t option.) Blank grid and table selection (drop-down). I have to Open the database from the top menu to see it. When opening from the top menu (as the -t option is ignored):
BTW, because I use a 32-bit and a 64-bit PC, I tend to use the 32-bit versions on both so I can compare behaviors of identical versions. So, I had only tried with the 32-bit versions up to now. |
Problem is still there with the latest nightly [dated 2020-02-10]. The header shows correct table but grid shows contents of first table in list of tables. |
I get different results than yours. The Aug 18, 2019 version does not work for me. It shows the first table in the list of tables and no content at all. Hitting refresh or switching to another tab then back to Browse Data tab will reload the first table content. I think #1701 might be related. The Aug 19, 2019 till the latest one work without problems though. Pinging @mgrojo and @MKleusberg. |
I downloaded the latest nightly releases. (I'm on Win7 Home Premium in both cases, BTW) |
Are you on Windows too, @karim ? |
Yes. Windows 7 64-bit. |
@karim Can you point me to the same exact download you're using for me to try on my Win7 64-bit? |
They are in my earlier comment above (#2113 (comment)). I tested both 64-bit and 32-bit version and both are same. Aug 18 doesn't work, and Aug 19 works. There were no fixes around that time (August 2019) regarding the You said the v3.11.2 portable version (from https://sqlitebrowser.org/dl/#windows) is working, right? Can you also try the .zip version from the same link and see if it is working? As I'm unable to reproduce the same bug, would you mind trying different versions of nightlies (https://nightlies.sqlitebrowser.org/win32/) and try to point to the date where the |
I just tried them, and they both work OK. |
I did a bisect for you (i.e., binary search by date, so I skipped versions in between), and was surprised to find the problem appeared in a quite older version (unless, of course, it was fixed and re-appeared, but that would require a sequential search of all versions from now going back.) So, P.S. I thought the stable portable version that works for me was after these so I'm puzzled! |
Thanks Tony, that was very helpful.
That seems to be the case here. I believe this bug might be related to the changes @MKleusberg did in #1575 around that date (4~6 Dec 2018). I enabled the SQL Logging (
PRAGMA foreign_keys = '1';
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM "main".sqlite_master;
PRAGMA encoding
SELECT COUNT(*) FROM (SELECT "_rowid_",* FROM "main"."table_name");
SELECT "_rowid_",* FROM "main"."table_name" LIMIT 0, 49999;
PRAGMA foreign_keys = '1';
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM "main".sqlite_master;
PRAGMA encoding |
Suggestion for quick fix: I noticed that simply pressing the Refresh button (to the right of the table drop down list) resolves the problem. So, a quick fix would probably be to simply call that button's event as the last step during startup. |
@MKleusberg This one seems like your kind of thing. 😄 |
I have no idea to be honest 😉 Simply calling the refresh button event unfortunately will not solve the problem consistently because it looks like a timing issue with the multi-threading and whatever it is that isn't finished in time might not be finished a few milliseconds later either. Because it works for me, I might have to add a ton of debug output to the code to narrow this down. @justinclift Would you be ok to build a new exe from a test branch including sometime soon-ish? And @tonypdmtr Would you be ok to give that extra build a try when it is done and paste the output here? |
I'm about to hit the sack atm, but am happy to make a test build from whatever branch is needed sometime tomorrow. 😄 |
Certainly will try. New data: I don't know since when exactly, but this problem happens only on my Win7-64 machine, not my Win7-32. If that matters at all to help solve the problem. Both cases use the 32-bit version, though. |
For completeness, I also just tried with |
I just noticed the -t option is also ignored when specifying a project file instead of a DB file. (This is in Win32 machine that otherwise worked OK.) |
Latest download seems to work OK on both Win32 and Win64. So, this issue is closed in terms of the original problem. (Was it fixed?) Only the new observation that it does not work when loading a project file is still valid. |
k, that sounds like something we should be able to fix. 😄 |
The ultimate cause of this not working as before is unknown, but this should be enough as workaround for v3.12.1. In the master branch the issue is not reproducible. See issue #2113.
@tonypdmtr Can you try again using the nightly build? The -t/--table parameter should now work when using a project file. It will just open an extra tab with the table. Tomorrow's nightly build will also make sure to bring this tab to the foreground and allows you to pass multiple -t/--table parameters. |
Just downloaded and it seems to work OK! |
So this is fixed (and improved indeed) in master and worked-around in v3.12.x, so we can finally close it. |
While -t does work, for the Windows version, --help and -v (version) still doesn't. There was a long discussion about commandline arguments here: #1069 |
This message should be gone in tomorrow's nightly build. Not sure about your other point though. What do you mean by "correct table but blank"? |
After I press OK to remove this popup, the -t option selected table is indeed selected in the dropdown list. But there is nothing showing in the window (blank). If I re-select the table from the dropdown list, the data appears. |
Ah ok, you're right. I can reproduce that. I'll see what I can do about that 😄 |
This should also be fixed in tomorrow's nightly build 😄 Thanks for pointing this out! |
Details for the issue
What did you do?
Option -t stopped working with this version.
What did you expect to see?
Normal operation. The specified table to be opened.
What did you see instead?
The table in the title is correct but the table shown in the grid is the first table of the list of tables.
Useful extra information
The info below often helps, please fill it out if you're able to. :)
What operating system are you using?
What is your DB4S version?
Did you also
The text was updated successfully, but these errors were encountered: