This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 138850 - SQL History: Not saved statements come back to the list
Summary: SQL History: Not saved statements come back to the list
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: John Baker
URL:
Keywords:
Depends on: 138847
Blocks:
  Show dependency tree
 
Reported: 2008-07-02 18:15 UTC by Roman Mostyka
Modified: 2008-07-29 17:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2008-07-02 18:15:46 UTC
1. Open SQL History and set 0 records to save.
2. Execute bunch of statements against different DBs.
3. Open SQL History again and set 10000 records to save.

Result: All executed statements are in the list.
Comment 1 John Baker 2008-07-15 02:09:23 UTC
Can't reproduce.
If you reset to 10000 then execute more statements then there will be > 0 statements appearing
Comment 2 Roman Mostyka 2008-07-15 11:21:16 UTC
John, as I wrote in steps to reproduce, first set 0, then execute bunch of statements and ONLY THEN set 10000 records to
save. That's all. I execute statements with null, but after this, if I set more than 0, all statements, which were
executed before this change (set to more than 0) are in the list. There is no need to execute any statement after change
of number records to save.
If you can't reproduce, try to reopen "SQL History" dialog.
Comment 3 John Baker 2008-07-24 08:34:43 UTC
I think it's fixed now
http://hg.netbeans.org/main?cmd=changeset;node=16acdbb872cb

138847 is not quite fixed. 
Comment 4 Roman Mostyka 2008-07-24 17:24:48 UTC
I still can reproduce this issue. The situation is better now, because statements appear in the list only after
reopening of the "SQL History" dialog, before they appear right after set number to save.
Comment 6 Quality Engineering 2008-07-25 15:45:25 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #344 build
Changeset: http://hg.netbeans.org/main/rev/02ff30b5c3b7
User: John Baker <jbaker@netbeans.org>
Log: #138850 SQL History: Not saved statements come back to the list
Comment 7 Roman Mostyka 2008-07-28 16:57:34 UTC
I still similar behavior. The difference now is that not all executed statements appears in the list, but only  (all
executed statements - 1). So I think the fix in the right direction. ;)
Comment 8 John Baker 2008-07-28 18:07:12 UTC
I see all executed statements listed.

You're using the latest trunk build ?   I'm not sure the fix went into the nightly build.

If so, please provide the steps, thanks
Comment 9 Roman Mostyka 2008-07-28 18:18:41 UTC
I always use for verification IDE, which I build with fresh sources. I don't use daily builds, which are available on
the web.
And I see changes from the changeset.
Here are the steps (they are almost the same):
1. Execute statement against some DB.
2. Open SQL History and set 0 records to save.
3. Execute bunch of statements against different DBs.
4. Open SQL History again and set 10000 records to save.
5. Close and reopen "SQL History" dialog.

Result: All executed statements minus 1 are in the list.
Comment 10 John Baker 2008-07-28 18:50:02 UTC
I still can't reproduce.

Once save statements is set to 0 , sql_history.xml file is cleared of all statements.

Then upon resetting back to 10000 ( I tried typing in the value and clearing ), still no statements appear.

At 10000, I executed more statements and the correct number of statements appears in the table.
Comment 11 John Baker 2008-07-28 22:19:39 UTC
if the same database is used then SQL is not saved is the limit is 0

Otherwise, if different databases are used then SQL is saved
Comment 12 John Baker 2008-07-28 23:33:48 UTC
Should be fixed now.
I was removing only one statement when save limit was set to 0

http://hg.netbeans.org/main?cmd=changeset;node=2511874f2e74
Comment 13 Quality Engineering 2008-07-29 03:56:20 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #352 build
Changeset: http://hg.netbeans.org/main/rev/2511874f2e74
User: John Baker <jbaker@netbeans.org>
Log: #138850 SQL History: Not saved statements come back to the list
Comment 14 Roman Mostyka 2008-07-29 17:14:35 UTC
Verified with build 080729.