Re: [Firebird-devel] Nightmare debugging FB3

2014-03-08 Thread Dmitry Yemanov
09.03.2014 12:00, Claudio Valderrama C. wrote:

 Ok, as I said, this restriction already exists, but the message is not good.
 Unlike Ann, I'm not a debugging wizard, but because I couldn't make sense of
 it by reading the sources, I had to call VS and found that an ACL is corrupt
 when walk_acl() thinks so and in turn this happens because that function
 walks uninitialized memory beyond the end of the ACL. The code used in
 INI_format() needs a second ACL_end and if you debug walk_acl() you will see
 it reading trash and marking the ACL as corrupt. I'm going to put that extra
 terminator.

Hmmm, this looks like my fault, although I seem to remember that it used 
to work. Nevermind, both buffers really miss the final ACL_end.

 Before fixing that error, apparently there was a memory corruption in the
 engine, because if I tried
 SHOW TABLE RDB$DATABASE;
 just after getting (ACL unrecognized), isql crashed.

I suspect this is a local ISQL crash, not the engine one. I've been 
striked by this crash yesterday too, request-startAndSend() fails with 
SEGV but all pointers were non-NULL. It looks like some object has been 
destroyed but its pointer was not cleared.


Dmitry


--
Subversion Kills Productivity. Get off Subversion  Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4356) Asynchronous cancellation request can be ignored in the case of EXECUTE STATEMENT and WHEN used together

2014-03-03 Thread Dmitry Yemanov (JIRA)
Asynchronous cancellation request can be ignored in the case of EXECUTE 
STATEMENT and WHEN used together


 Key: CORE-4356
 URL: http://tracker.firebirdsql.org/browse/CORE-4356
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 2.1.4, 2.5.0, 2.1.3, 2.1.2, 2.1.1, 2.1.0
Reporter: Dmitry Yemanov


Artificial test case:

set term ^;

execute block as
  declare stt varchar(255) = 'execute block as begin while (1 = 1) do begin end 
end';
begin
  while(1=1) do
begin
  execute statement stt;
  when any do begin end
end
end^

set term ;^
commit;

Then either press Ctrl-C in the current ISQL session or issue delete from 
mon$statements where mon$attachment_id  current_connection from a different 
ISQL session.

The endless loop inside EXECUTE STATEMENT really gets interrupted but 
isc_cancelled error gets handled by the WHEN block and the loop continues. This 
is a bug, cancellation/shutdown errors should not be processed by exception 
handlers.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Subversion Kills Productivity. Get off Subversion  Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Old API and wide result set

2014-03-03 Thread Dmitry Yemanov
03.03.2014 20:57, Alex Peshkoff wrote:

 If we apply that change SQLDA-oriented functions can work with 64K
 messages but BLR-oriented statements and requests - can not.
  Fortunatelly, I don't know anybody who use them.

 Anyone who is using gpre.

If we speak about indirect usage, could gbak as well.


Dmitry


--
Subversion Kills Productivity. Get off Subversion  Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Old API and wide result set

2014-03-03 Thread Dmitry Yemanov
03.03.2014 21:54, Dimitry Sibiryakov wrote:

 Its result set cannot be wider than record, which is still limited to 64k, so 
 no
 problem here.

We can allow records longer than 64K in a second. The only reason why it 
was not done yet is the old API problem in gbak. I hope Alex will 
rewrite the API usage there before v3 is out.


Dmitry


--
Subversion Kills Productivity. Get off Subversion  Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] isc_dsql_fetch() return code 101

2014-02-28 Thread Dmitry Yemanov
28.02.2014 22:06, Adriano dos Santos Fernandes wrote:

 Isn't it related to the READ/WRITE BLOB commands, which was removed from v3?

It looks so. Blob errors could be priorly returned from DSQL API calls 
only in case of these commands, but now this should not happen.


Dmitry


--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis  security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4353) Sorting records are larger than really necessary

2014-02-25 Thread Dmitry Yemanov (JIRA)
Sorting records are larger than really necessary


 Key: CORE-4353
 URL: http://tracker.firebirdsql.org/browse/CORE-4353
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Alpha 2, 3.0 Alpha 1, 2.5.2 Update 1, 2.1.5 Update 1, 
2.5.2, 2.1.5, 2.5.1, 2.1.4, 2.5.0, 2.1.3, 2.1.2, 2.1.1, 2.1.0
Reporter: Dmitry Yemanov
Priority: Minor


In external sorting (SORT plan), every record being sorted is stored as the 
sort key plus all the referenced fields plus stream-level information plus 
padding/alignment. However, the sorting record length is calculated 
inaccurately, causing redundant bytes to be allocated but never used. This 
causes the sort blocks to grow more than necessary thus slowing down the 
operation, especially when number of records being sorted is huge and sort 
blocks are swapped to disk. In most practical cases, this overhead is 
relatively small and is unlikely to be more than 5-10%, but in some artificial 
cases it could be up to 50%.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis  security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Ñhecking Firebird using PVS-Studio

2014-02-21 Thread Dmitry Yemanov
Claudio,

 Nice, although some of them seem to be false alarms. For example,
 TextType::compare(). The typical result is -1, 0, 1. I would prefer to
 change the result to plain int, but it may not be possible (I would have to
 check all places affected).

The problem here may be theoretical rather than practical, but it does 
exist. Memcmp is not guaranteed to return 1 / -1, it's only guaranteed 
to return positive / negative. If one day it will start returning 
100 for greater-than, we're in trouble.

 1.- In CCH_down_grade_dbb() I need to know what's the scope for the lock

Do you mean bcbSync? I believe it's there only to clean the 
BCB_exclusive flag and later execute the if (bcb  bcb-bcb_count) block.

 3.- This supposedly dangerous definition
 const ULONG END_BUCKET = (~0)  1; is interesting, would
 const ULONG END_BUCKET = (~0) ^ 1;
 do the trick?

What's wrong with (~0u)  1 that they suggest instead?


Dmitry


--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ICU Data table customization

2014-02-19 Thread Dmitry Yemanov
19.02.2014 19:19, Adriano dos Santos Fernandes wrote:

 One thing of ICU we use and allows the user to use with CREATE COLLATION
 is the Unicode localization table variants (per country).

 We used to strip almost everything and add the variants we used in ours
 builtin collations. User left with the task to ask us for add more or to
 substitute the DLL.

 Size of icudt30.dll was around 1,5 MB and 670 KB zipped.

 With new ICU, I tried to remove most of charsets (we use one from it)
 and the data we don't use (say, currency, etc). I left all collations
 variants in it. Size is around 5 MB and 1,5 MB zipped.

 Is this acceptable?

Absolutely OK, as for me.


Dmitry


--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4346) v3 GBAK cannot restore backups on pre-v3 server versions

2014-02-19 Thread Dmitry Yemanov (JIRA)
v3 GBAK cannot restore backups on pre-v3 server versions


 Key: CORE-4346
 URL: http://tracker.firebirdsql.org/browse/CORE-4346
 Project: Firebird Core
  Issue Type: Bug
  Components: GBAK
Affects Versions: 3.0 Alpha 2, 3.0 Alpha 1
Reporter: Dmitry Yemanov


Restore ends with error:

gbak: ERROR:invalid request BLR at offset 201
gbak: ERROR:generator RDB$GENERATOR_NAME is not defined
gbak:Exiting before completion due to errors


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Update ICU in Windows

2014-02-17 Thread Dmitry Yemanov
Adriano,

 It seems that Windows people decided that a multi-megabyte library
 should not be included in Firebird.

IIRC, the ICU site had an ability to generate stripped libs online. Is 
that still possible? We might use that for officially distributed 
packages and let people dealing with multi-MB libs for manual builds.


Dmitry


--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Odp: Fw: [firebird-support] Difference in collation meaning

2014-02-15 Thread Dmitry Yemanov
15.02.2014 13:25, liviusliv...@poczta.onet.pl wrote:

 Your explanation is very good but i see that i was not clear in question.
 I understand that collate is for sorting or upper but what is difference
 in maining of collation in this three queries.
 What do
 Select field collate pxw_plk from ...

 What do
  Group by field collate pxw_plk

 What difference if i remove collate?

Think about COLLATE as about CAST. Collation overrides default 
comparison rules, so field and field collate pxw_plk may lead to a 
different grouping (imagine a case-insensitive collation for example). 
As GROUP BY requires that the select list and group list must be exactly 
the same expressions, you get the error.


Dmitry


--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Update ICU in Windows

2014-02-14 Thread Dmitry Yemanov
Adriano,

 ICU 5.2 comes only with MSVC 10 build. It should not be possible for
 us to create solution for older MSVC.

 Are we prepared for this?

Sorry, I don't get why it should not be possible for us? Our official 
compiler for v3 is MSVC10 -- so far so good -- but if someone still 
wants to use a prior version for development, why cannot he spend some 
time and create appropriate solution/project files for ICU? Licensing 
issues?


Dmitry


--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Update ICU in Windows

2014-02-14 Thread Dmitry Yemanov
Adriano,

 With older ICU, you probably used Visual Studio to upgrade older format
 to newer one.

 Now, the inverse will be necessary. AFAIK, Nickolay used something for
 this, but I don't know if it was fully functional or needed manual edits.

 But note, ICU has not only vcxproj files. It has also mak files and used
 nmake.

 Someone may waste a lot of time doing this, and I do not guarantee it
 will work.

So, this is just about technical complexity of the work. Fine with me.

Perhaps this issue should be simply re-raised as does anyone here still 
don't use MSVC10 for v3?


Dmitry


--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Update ICU in Windows

2014-02-14 Thread Dmitry Yemanov
14.02.2014 21:16, Adriano dos Santos Fernandes wrote:

 Why to compile ICU by hands at all? What's wrong with precompiled binaries?

 That is a interesting question.

 Would need to choose if include binaries in the repository or not.

 If not, build will not be simple and may need extra download.

In the past, I was strongly against this idea. Now I'm not that sure 
anymore. So if others are OK with this option, we can go this way too.

AFAIU, the build itself would be as simple as now (provided that .lib 
files are downloaded and placed properly).


Dmitry


--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Alpha 2 - Trace Output - Execution ofpackage-based stored procedure

2014-02-14 Thread Dmitry Yemanov
14.02.2014 22:50, Thomas Steinmaurer wrote:

 Would like to do so, but the latest snapshot build for Windows available
 is from 2 days ago. Just letting you know.

Windows builds are broken at the moment, please wait a bit.


Dmitry


--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Alpha 2 - Trace Output - Execution ofpackage-based stored procedure

2014-02-13 Thread Dmitry Yemanov
13.02.2014 12:23, Vlad Khorsun wrote:

 Good point. I think it makes sense. I'll look at it (a bit later). Would you 
 like to
 see procedure name prefixed with package name (PACKAGE.PROCEDURE)

This would be consistent with the rest of the codebase, so IMHO it 
should be done this way.


Dmitry


--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Created: (CORE-4336) Firebird.msg is not installed with client

2014-02-13 Thread Dmitry Yemanov
13.02.2014 19:39, Dimitry Sibiryakov wrote:

 As I wrote in ticket: fbclient.dll installed into system directory produces 
 unreadable
 error messages because of absence firebird.msg nearby.

Do you mean really unreadable or actually readable but prefixed with 
cannot locate firebird.msg? Example maybe?


Dmitry


--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Assertion in the optimizer

2014-02-04 Thread Dmitry Yemanov
Claudio,

 Hello, while trying to run the full compilation for FB3, I got

 Assertion (!bestCandidate-condition) failure:
 ...\..\..\src\jrd\Optimizer.cpp 1576

 just when isql started running in the make_boot process. I'm not sure about
 the committer's name but it seems it ends with y.

He knows :-) just occupied with other issues at the moment. To be fixed 
soon.


Dmitry



--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Firebird 3.0 Alpha 2 release is available for testing

2014-02-03 Thread Dmitry Yemanov
03.02.2014 21:21, marius adrian popa wrote:

 With fresh Firebird 3.0 install i have with flamerobin (even if i
 enable legacy auth and flamerobin is loading the new fbclient)

Why do you need legacy auth if you use the new client? And how exactly 
did you enable it?


Dmitry


--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] fb3 access modes under windows

2014-01-30 Thread Dmitry Yemanov
29.01.2014 21:30, Leyne, Sean wrote:

 OK, but some of the config options are not compatible for all installed modes 
 -- so, how do we prevent a user make the wrong selections?

 If someone like Paul Reeves (who has been using FB since before it was FB) 
 doesn't understand all of the intricacies, how will a less experienced 
 user/developer?

 Especially, when the installed mode it not easily seen.

Just a wild idea.

We introduce a separate (very thin) fblistener.exe (fbremote or 
whatever) binary that acts similar to xinetd on posix. It will spawn 
firebird.exe per every user connection. firebird.exe will detect this 
situation and explicitly pass SharedCache = false and SharedDatabase = 
true via API into all connect calls, thus overriding any underlying 
config settings.

firebird.exe alone will be always working in the multi-threaded mode 
(thus not requiring the -m switch) supporting either SC or SS, depending 
on the config settings.

So, for CS one will need to install/run fblistener.exe and don't care 
about anything else. For SS/SC one will need to install/run firebird.exe 
and setup the config properly (SS by default).

The installer will just ask about SharedDatabase/SharedCache (or about 
CS/SC/SS - although these terms become outdated with v3) and figure out 
what binary should be installed and whether it's needed to change the 
config.

No eight possible options anymore. Not much harder to understand than 
for v2.5. Almost same for POSIX and Windows. If SC is going to be 
deprecated (at least at the installer level), then setup becomes even 
easier.


Dmitry


--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] fb3 access modes under windows

2014-01-30 Thread Dmitry Yemanov
30.01.2014 13:43, Vlad Khorsun wrote:

 Technically it is possible to make single instance of firebird.exe to handle
 some attachment requests by forking new CS process and another attachment
 requests handling by itself (SS\SC).

Do you mean forking the worker after op_connect / op_attach are 
processed in the multi-server mode?


Dmitry


--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] fb3 access modes under windows

2014-01-29 Thread Dmitry Yemanov
29.01.2014 18:37, Paul Reeves wrote:

 I guess what we really need is to document in firebird.conf how the -m switch
 affects the other two settings. There would seem to be a total of eight
 combinations.

Lack of -m switch along with SharedDatabase = false means that only the 
first connection will be able to open the database.

 # SharedCache SharedDatabase -m   Mode
 # false   false   -   CS single attach only
 # false   false   *   

SC single attach only

 # false   true-   Classic with shared access
 # false   true*   SuperClassic with shared access
 # truefalse   -   ?

SS single attach only

 # truefalse   *   Super with exclusive access
 # truetrue-   Super with shared access - illegal in A2 :-)
 # truetrue*   Super with shared access - also illegal


Dmitry


--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] fb3 access modes under windows

2014-01-29 Thread Dmitry Yemanov
29.01.2014 20:51, Paul Reeves wrote:

 # SharedCache SharedDatabase -m   Mode
 # false   false   *   

 SC single attach only

 Interesting. Does that differ internally from

 # truefalse   -   ?

 SS single attach only

Mostly it doesn't, except the fact that some config options may have 
different defaults in these cases.


Dmitry


--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] fb3 access modes under windows

2014-01-29 Thread Dmitry Yemanov
29.01.2014 21:07, Dimitry Sibiryakov wrote:

 How about difference latch only vs latch+lock? Does it still exist in v3?

Page locks are not used until the second connection appears. And other 
lock types don't affect single-threaded performance.


Dmitry


--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] fb3 access modes under windows

2014-01-29 Thread Dmitry Yemanov
29.01.2014 21:10, Leyne, Sean wrote:

 EngineMode/EngineType = Classic | SuperServer | SuperClassic

 DatabaseAccess = Shared | Single


 The install options should take their cue from the config settings, and not 
 require inline switches.

Config options are database wise, so using them at the installer side 
(read: globally) is not a good idea.


Dmitry


--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] How to make a call of the same name of the stored procedure within a package from the global namespace?

2014-01-25 Thread Dmitry Yemanov
25.01.2014 18:22, Adriano dos Santos Fernandes wrote:

 Adding some keyword for now may cause future problems when schemas exist.

What's the problem of treating ::PROC1 (syntax just for example) as a 
global procedure PROC1 in the current schema? Or do you mean the 
situation when multiple schemas are implicitly available to the current 
user?


Dmitry



--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] How to make a call of the same name of the stored procedure within a package from the global namespace?

2014-01-25 Thread Dmitry Yemanov
26.01.2014 00:56, Helen Borrie wrote:

 However current situation should be reflected in  Release Notes.

 From a design perspective, my simple-minded view is that homonymity of the 
 kind that leads to conflicts within the scope of the current_schema should be 
 avoided.  You seem to be saying that the Release Notes should document your 
 sloppy design edge cases...or have I totally misunderstood?

AFAIU, his point is to document that it's currently impossible to call a 
global routine with the same name as the packaged routine (if called 
from inside that package).


Dmitry


--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] recent regression in fb3

2014-01-21 Thread Dmitry Yemanov
21.01.2014 21:34, Leyne, Sean wrote:

 This seems to be an item which should really be discussed in the Support 
 mailing list (http://groups.yahoo.com/group/firebird-support/), not here in 
 the core developers lists.

FB3 issues do belong here, not the support list.


Dmitry



--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] IUtl functions

2014-01-17 Thread Dmitry Yemanov
17.01.2014 19:16, Adriano dos Santos Fernandes wrote:

 I think IUtl::version

Being there, please rename it to getVersion(). As usual, I'm strongly 
against nouns used as routine names.

 Also I think IUtl::edit should not exist. It's a too specialized ISQL
 feature, and IMO should be there in ISQL.

I agree.


Dmitry


--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Odp: Some aspects of the optimizer hints

2014-01-08 Thread Dmitry Yemanov
08.01.2014 12:15, Kjell Rilbe wrote:

 That said, I'd vote against plan for/hint if the plan clause in its
 current use is or is soon going to be deprecated. So, what are the plans
 for the plan clause?

Explicit planning is still used by some customers, so it cannot be 
deprecated. But it's not going to be extended/improved to catch up the 
optimizer evolution.


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Some aspects of the optimizer hints

2014-01-07 Thread Dmitry Yemanov
Ann,

 The FIRST keyword was added to Firebird's SQL in version 1.0 or 1.1 -
 in 2000 0r 2001, but the use of FIRST in InterBase goes back much further.
 It was part of GDML - and it's purpose was to signal that the query should
 be optimized to walk the index (navigate, in the internals) rather than
 create
 a bitmap and access records in storage order.   There's no reason to limit
 the number of record a query returns - when you've seen enough, just close
 it.  The semantic significance of FIRST and its relatives is I want
 the first records quickly.

Quite interesting, thanks. This is really close to what I'm trying to 
discuss. Although this seems to be lost with time, as InterBase 6.0 had 
FIRST N clause in GDML acting as a row limit and Firebird's FIRST N 
clause just reused the same BLR implementation. And the optimizer didn't 
have any indications to treat blr_first as a hint that time.

 So, historically, no, it's neither a workaround nor a hack.

Here I may agree (knowing the history).

 Parsing SQL comments ... that sounds like a hack to me.

And here I agree as well. Although we've already seen other opinions.

 Adding yet another non-standard keyword when one already exists and does what 
 you want
 doesn't appeal all that much either.

But the FIRST clause in both SQL and GDML does not act as a hint for the 
past 15 years (at least). It can surely be considered by the optimizer 
(and this is already committed to v3.0), but its documented semantics is 
quite different.

 So would you consider a connection option?   A transaction option?

As stated in my initial message, I'm open for opinions in this regard. 
It could be specified per database, or per connection, or maybe even per 
transaction (although I doubt it's really needed). But regardless the 
global level FIRST ROWS is specified as the default behavior, users must 
be able to alter it to ALL ROWS at the statement level, if required. And 
it's impossible using the existing syntax.


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Some aspects of the optimizer hints

2014-01-07 Thread Dmitry Yemanov
07.01.2014 12:28, Alex wrote:

 Or even config file option. Not related with SQL IMHO.

It *is* related as soon as you need to alter from the default FIRST ROWS 
to custom FIRST ROWS in some particular query.


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Some aspects of the optimizer hints

2014-01-07 Thread Dmitry Yemanov
07.01.2014 12:46, Dmitry Yemanov wrote:

 It *is* related as soon as you need to alter from the default FIRST ROWS
 to custom FIRST ROWS in some particular query.

Read: custom ALL ROWS, sorry.


Dmitry



--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Some aspects of the optimizer hints

2014-01-07 Thread Dmitry Yemanov
07.01.2014 13:25, Simonov Denis пишет:

 Strategy ALL ROWS default optimizer I consider correct. Nevertheless, I
 believe that it is necessary to introduce a parameter in the configuration
 database level which could be returned to the old behavior where the
 optimizer to use a strategy FIRST ROWS. This can be useful for the
 operation of existing applications that have been stored for such behavior.

The legacy optimizer never used the FIRST ROWS strategy by default and I 
was trying to explain that in my original posting. It just didn't 
absolutely follow the ALL ROWS mode (in all possible considerations), 
but it was close enough.


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Some aspects of the optimizer hints

2014-01-07 Thread Dmitry Yemanov
Kjell,

 This makes sense, but I also think what Jim Starkey said makes sense,
 i.e. that introducing optimizer hints in essence means you've given up
 on creating a good automatic optimizer.

Jim is not alone in thinking this way. This is why I explicitly 
mentioned that I don't want to discuss either necessity or 
implementation of full featured hints in this discussion.

 So, when would you need one or the other? As far as I can see, 2) would
 be the normal case, and 1) would be used only in the the following two
 cases:

 1a) You only want the forst N records, possibly not being able to
 determine N beforehand. You would normally use FIRST N or ROWS N
 (preferred nowadays, isn't it?), but if N isn't known beforehand, this
 is not possible.

 1b) You want to display/start using something as quickly as possible
 and then keep fetching more records (possibly the entires result set) in
 the background.

A more common approach might be to fetch the remaining rows by user's 
demand. For example, many Delphi applications using DBGrid and its 
friends initially fetch only rows fitting just a couple of screens and 
continue fetching once user scrolls the grid down.

 Would it be possible to allow specification of only the part of the plan
 that you want to modify and leave the rest default?

I'd suggest to let the legacy PLAN resting in piece. It's already misses 
many optimizer features and will outdate more and more with years.

 Would this be possible:

 plan hint Movies order IX_MovieName
 plan hint Movies natural
 plan hint Movies index SomeBetterIndex

This could be suitable for generic hints, but not for the FIRST ROWS vs 
ALL ROWS choice, as it affects many optimizer decisions at once.

Something like PLAN FOR {ALL | FIRST} ROWS might be a yet another 
syntactical option here, although personally I'd prefer to separate 
planning from hinting at the syntax level. So far it was expected 
that input (explicitly specified in syntax) and output (reported by the 
engine) plans mean the same, but it won't be the case anymore with the 
aforementioned approach.


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Some aspects of the optimizer hints

2014-01-07 Thread Dmitry Yemanov
08.01.2014 00:49, Mark Rotteveel wrote:

 I do think you should consider the implications of having full featured
 hints in the future, if only not to make a poor choice now when it comes
 to syntax.

And I suggested how the OPTIMIZE clause can be extended later, if required.


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Odp: Some aspects of the optimizer hints

2014-01-07 Thread Dmitry Yemanov
08.01.2014 10:30, liviusliv...@poczta.onet.pl wrote:

 Why plan can not by extended for hint purposes?

It can, the question is whether it should.

 This is natural placefor FB users to tell optimizer
 the better way of query execution.

Personally, I see an important difference between planning (in how it 
historically looked like) and hinting (in how it's being discussed), so 
I'd prefer separate clauses for these actions.

That said, I'm not going to insist if the majority here would favor the 
PLAN clause being used also for hinting.


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Some aspects of the optimizer hints

2014-01-06 Thread Dmitry Yemanov
Ann,

 Right. And if you want to give the optimizer a hint that it should choose
 the second plan, change the query like this:

 select first 100  * from MOVIES where COMMENTS like '%yacht%  order
 by NAME;

 If you think your client may want more than a million rows, increase
 that number.

I mentioned this approach in my initial message and it does not look 
good to me. I treat it as a workaround / hack, not a solution. Of 
course, we could improve it via some syntax sugar e.g. select first * 
(without row counter) or select first unlimited *, but it still 
doesn't look really elegant.

Also, there may be (in fact, there are) customers who need the FIRST 
ROWS strategy being the default one. And rewriting a majority of their 
queries to include the dummy FIRST clause is not something they can 
consider seriously.


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] FB 3: grants on Sequences

2014-01-06 Thread Dmitry Yemanov
Martijn,

 is a privilege “G” in RDB$USER_PRIVILEGES actually a granted “Usage”?

Yes, it stands for usaGe :-) for the lack of better one-letter 
representation.

Per standard, it also applies to exceptions, domains, charsets, 
collations. However, the engine validates it only for sequences and 
exceptions in the current builds.

 Is that the only available privilege for sequences?

Yes, for the time being. The standard does not define anything else for 
sequences, but there may be other options once DDL permissions are 
implemented.


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4313) Error Attempt to reopen an open cursor may be raised if the query handle is reused in a different transaction

2014-01-05 Thread Dmitry Yemanov (JIRA)
Error Attempt to reopen an open cursor may be raised if the query handle is 
reused in a different transaction
---

 Key: CORE-4313
 URL: http://tracker.firebirdsql.org/browse/CORE-4313
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Alpha 1, 3.0 Alpha 2
Reporter: Dmitry Yemanov


Call sequence that demonstrates the issue:

isc_dsql_allocate_statement(status, db, st);
isc_start_transaction(status, tr, 1, db, 0, NULL);
isc_dsql_prepare(status, tr, st, 0, select 1 from rdb$relations, 1, sqlda);

isc_dsql_execute(status, tr, st, 1, NULL);
while (isc_dsql_fetch(status, st, 1, sqlda) == 0);

isc_commit_transaction(status, tr);
isc_start_transaction(status, tr, 1, db, 0, NULL);

isc_dsql_free_statement(status, st, DSQL_close);

-- here error is raised
isc_dsql_execute(status, tr, st, 1, NULL);
while (isc_dsql_fetch(status, st, 1, sqlda) == 0);

isc_dsql_free_statement(status, st, DSQL_drop);
isc_commit_transaction(status, tr);

The issue is caused by the cursor not being explicitly closed before 
transaction commit/rollback. It worked in prior versions, but in v3.0 this 
sequence leads to leftover cursor pointers causing the error to be thrown.

P.S. Given the known details, I'm not sure it's the same issue as CORE-3984.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Some aspects of the optimizer hints

2014-01-02 Thread Dmitry Yemanov
All,

We had this topic raising from time to time, resulted in CORE-1488. So 
far there was no appropriate discussion and hence no decision made, 
although one might argue that the optimizer should be clever enough to 
make hints unnecessary. The PGSQL guys share the same opinion, BTW ;-)

As for me, the ideal optimizer is a purely theoretical thing that can 
never exist in the real world, but I'm *not* going to discuss this in 
depth now, neither I have time for a full featured implementation of 
hints, whatever it would be. However, I'd like to raise one point that's 
not generally related to the optimizer quality.

There's a retrieval rule that can be hardly guessed by the optimizer and 
that can be specified by the user only. I mean whether the optimization 
strategy is targeted at retrieving the whole dataset ASAP or at 
retrieving some first part of rows ASAP, at the cost of slower retrieval 
of the whole dataset. In the database world, this is commonly known as 
ALL ROWS vs FIRST ROWS retrieval strategies.

There's an obvious easy case -- FIRST / ROWS clause -- that clearly 
defines user intentions and that can be used by the optimizer to adjust 
the retrieval strategy. However, users may want the FIRST ROWS strategy 
even in generic queries without using the explicit rows limit. For 
example, it's often important to fetch the first screen of the grid and 
show those rows to the user immediately while fetching the subsequent 
(invisible) rows in the background, thus reducing application response 
times. A workaround with something like SELECT FIRST 10 is 
possible, but it looks crappy.

In Firebird, the ALL ROWS vs FIRST ROWS choice is mostly about SORT vs 
ORDER plans used for sorting/grouping. See CORE-1482 for example. But 
there may be other differences in plans, also targeted at different 
retrieval strategies (e.g. a hash join is slower in returning the first 
rows than a nested loop join).

The good question is how Firebird behaves now from this point of view. 
Mostly it uses the ALL ROWS approach, and the underlying cost based 
optimization algorithms also deal with complete stream cardinalities. 
There are some heuristics based deviations like using the ORDER plan 
even when SORT would be faster, and originally I was thinking that we 
have some intermediate mode (DEFAULT / UNKNOWN ROWS), but later I came 
to conclusion that usage of more advanced statistics (e.g. index 
clustering factor that's already available in GSTAT output in v3) will 
change the behaviour in the right direction. So we may treat Firebird 
basically preferring the ALL ROWS mode now and becoming even stricter in 
this regard in the future.

This makes it necessary to allow the FIRST ROWS mode when it's needed. 
I'm proposing the following:

1) FIRST ROWS mode is implicitly used when the FIRST / ROWS clause is in 
game. Also, FIRST ROWS mode is implicitly used for EXISTS / ANY subqueries.

2) An explicit clause is introduced to force the non-default mode (ALL 
ROWS for FIRST-claused queries and FIRST ROWS for other queries). Hating 
Oracle-like pseudo-comments with embedded hints and preferring explicit 
syntax, I suggest (inspired by DB2):

SELECT ...
[OPTIMIZE FOR {FIRST | ALL} ROWS]

3) Either PLAN or OPTIMIZE clause can be used, syntax error is thrown if 
both are specified.

4) Explicitly specified mode takes precedence over implicitly deducted one.

5) ALL ROWS mode is the default one for queries without FIRST / ROWS 
clause. Whether the default mode can be altered per database (via 
configuration file) or per session is discussable.

6) OPTIMIZE FOR FIRST number ROWS can be added later to better assist 
the optimizer in specific cases.

7) OPTIMIZE clause can be later extended for full featured hints if/when 
they will be agreed on. Possible extentions (off the top of my head):

OPTIMIZE [NOT] USING INDEX index
or
OPTIMIZE USING HASH JOIN FOR (table1, table2)
or
OPTIMIZE ENFORCE JOIN ORDER
etc

As so far we speak about optimization of the final (user retrievable) 
datasets, it makes sense to use the OPTIMIZE clause at the top level 
only, i.e. for select statements but not for select expressions. This is 
similar to how WITH LOCK and FOR UPDATE clauses are used. However, full 
featured hints should be available to select expressions as well. I'm 
not sure whether we should choose a protecting syntax now and extend 
it (compatibly!) later, or allow FIRST / ALL ROWS rules for subqueries 
since the beginning, or parse the hints and throw context based errors 
if necessary.

Your opinions are appreciated.


Dmitry

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!

Re: [Firebird-devel] Some aspects of the optimizer hints

2014-01-02 Thread Dmitry Yemanov
02.01.2014 21:43, Mark Rotteveel wrote:
 
 It would be interesting to know which is better for performance, given
 isc_dsql_fetch, a FIRST (x) ROWS might perform better when small fetch
 sizes are used.

What do you mean by small fetch sizes? If it's about incomplete fetch, 
i.e. only few rows are fetched and then the cursor is closed, then your 
assumption is likely to be correct.

 I'd actually prefer comments like Oracle does. I think it is better for
 portability.

Given e.g. FIRST vs TOP vs ROW_NUMBER mess developed by different 
vendors, I wouldn't care much about cross-database portability. Hints 
are outside the SQL standard, but many other features are not there 
either. I hope you don't suggest to implement everything non-standard in 
the comments, do you?

SQL is a declarative language, so let's allow users to declare what they 
need using the language itself.

 If we go with comments, I'd suggest that throwing exceptions for hints
 should be optional (for portability), maybe using a dpb item to turn it
 off (default on), or a server- or database specific config option.

Comments throwing exceptions from inside is not the feature I'm going to 
be an author of, sorry ;-)


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Error FB3 Alpha 2 WIN32

2013-12-29 Thread Dmitry Yemanov
29.12.2013 11:46, Norbert wrote:

 yes everything by default and then I changed to try if it changed
 something but nothing nothing!

 Where did you get binaries?

 http://web.firebirdsql.org/download/snapshot_builds/win/3.0/

Did you try with ISQL from this package or with other software?


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Syntax for CREATE/ALTER USER

2013-12-16 Thread Dmitry Yemanov
16.12.2013 14:38, Simonov Denis wrote:

 Will the new name-value pairs also be retrievable from sec$users? And if
 yes, how ? Text blob with all pairs?

 It was nice to have some system stored procedure parses BLOB and returns a
 set of keys and values

Wouldn't a table e.g. SEC$USER_ATTRIBUTES be a better solution?


Dmitry



--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] cte regression in Firebird 3 ?

2013-12-11 Thread Dmitry Yemanov
10.12.2013 12:28, Philippe Makowski wrote:

 Under 3.0 we get a :

 Statement failed, SQLSTATE = 42S22
 Dynamic SQL Error
 -SQL error code = -206
 -Column unknown
 -TR.ID_TYPE_PRODUCT
 -At line 25, column 26

Fixed now.


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] cte regression in Firebird 3 ?

2013-12-10 Thread Dmitry Yemanov
10.12.2013 12:28, Philippe Makowski wrote:

 Under 3.0 we get a :

 Statement failed, SQLSTATE = 42S22
 Dynamic SQL Error
 -SQL error code = -206
 -Column unknown
 -TR.ID_TYPE_PRODUCT
 -At line 25, column 26

I will take a look, thanks.


Dmitry



--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Compatibiliti fb3 and previous

2013-12-03 Thread Dmitry Yemanov
03.12.2013 15:10, liviusliv...@poczta.onet.pl wrote:

 All projects which use integer in designer faill becouse of that.

I'm wondering what connectivity layer do you refer to and what error it 
raises. I don't see why it should fail provided that the returned value 
does not overflow the 2^32 limit.


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Compatibiliti fb3 and previous

2013-12-03 Thread Dmitry Yemanov
03.12.2013 21:09, Dimitry Sibiryakov wrote:

 It won't help. If in Delphi db-aware components fields were created in design 
 time and
 this field was created with type ftInteger, there is no way FB API can find 
 it out and
 report ISC_LONG instead of ISC_INT64.

Doesn't it mean that such an application will be always passing SQL_LONG 
to execute/fetch calls? If so, the data type coercion will happen to 
ensure an automatic either-convert-or-throw behavior.


Dmitry


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4285) Choose the best matching index for navigation

2013-11-27 Thread Dmitry Yemanov (JIRA)
Choose the best matching index for navigation
-

 Key: CORE-4285
 URL: http://tracker.firebirdsql.org/browse/CORE-4285
 Project: Firebird Core
  Issue Type: Improvement
  Components: Engine
Reporter: Dmitry Yemanov


Currently, when ORDER plan is in game, the optimizer chooses the first index 
candidate that matches the ORDER BY / GROUP BY clause. This is not the best 
approach when multiple index choices are available, see examples below.

create table test (col1 int, col2 int, col3 int);
create index itestcol1 on test (col1);
create index itestcol12 on test (col1, col2);
create index itestcol21 on test (col2, col1);
create index itestcol123 on test (col1, col2, col3);
create index itestcol132 on test (col1, col3, col2);
set planonly;

select 1 from test order by col1;
-- expected: PLAN (TEST ORDER ITESTCOL1)

select 1 from test where col1 = 0 order by col1;
-- expected: PLAN (TEST ORDER ITESTCOL1)

select 1 from test order by col1, col2;
-- expected: PLAN (TEST ORDER ITESTCOL12)

select 1 from test where col1 = 0 order by col1, col2;
-- expected: PLAN (TEST ORDER ITESTCOL12)

select 1 from test where col1 = 0 and col2 = 0 order by col1, col2;
-- expected: PLAN (TEST ORDER ITESTCOL12)

select 1 from test  order by col1, col2, col3;
-- expected: PLAN (TEST ORDER ITESTCOL123)

select 1 from test where col1 = 0  order by col1, col2, col3;
-- expected: PLAN (TEST ORDER ITESTCOL123)

select 1 from test where col1 = 0 and col2 = 0 order by col1, col2, col3;
-- expected: PLAN (TEST ORDER ITESTCOL123)

select 1 from test where col1 = 0 and col2 = 0 order by col1;
-- expected: PLAN (TEST ORDER ITESTCOL12)

select 1 from test where col1 = 0 and col2 = 0 and col3 = 0 order by col1;
-- expected: PLAN (TEST ORDER ITESTCOL123) or PLAN (TEST ORDER ITESTCOL132)

select 1 from test where col1 = 0 and col3 = 0 order by col1;
-- expected: PLAN (TEST ORDER ITESTCOL132)

select 1 from test where col1 = 0 and col3 = 0 order by col1, col2;
-- expected: PLAN (TEST ORDER ITESTCOL12)

select 1 from test where col1 = 0 and col3 = 0 order by col1, col2, col3;
-- expected: PLAN (TEST ORDER ITESTCOL123)

select 1 from test where col1 = 0 and col3 = 0 order by col1, col3;
-- expected: PLAN (TEST ORDER ITESTCOL132)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Firebird returns truncation error for valid LIKE / SIMILAR TO patterns that are longer than the field length

2013-11-24 Thread Dmitry Yemanov
24.11.2013 23:21, Mark Rotteveel wrote:

 I assume that is an artifact of the implementation, could you point me
 to some code that shows this. If I look at the (wire!) protocol itself,
 there is no such limitation to the total message length when sending
 parameters (eg in op_execute2), although there is a limitation per
 parameter.

True, this is more about implementation. The point is that it's 
worthless to fix without changing API as well. It's already done in FB3 
but older fbclients are not prepared to handle this properly anyway.

You may look at my commit that allowed longish strings in the remote code:
http://markmail.org/message/u76dm74mexx3ua6v


Dmitry


--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [Firebird-checkins] SF.net SVN: firebird:[58787] firebird/trunk

2013-11-15 Thread Dmitry Yemanov
15.11.2013 12:46, Alex Peshkoff wrote:

 Warning: this commit changed ODS, therefore old databases have
 bugcheck(183).

 Adriano, I've thought that for missing fields we get NULL value, not
 bugcheck? That's not dangerous at alpha stage, but may be I've missed
 something? Were you going to make missing fields in system tables have
 NULL value? That does not work.

AFAIK, FB3 describes system tables based on their static definitions 
(INI), not on their real format on disk. So it expects the bigger record 
length and bugchecks while decompressing the record. The trick with 
non-existing fields work only after the record is decoded into a known 
format, thus it doesn't work.

On a positive side, the current behavior allows to query changed 
MON$-tables immediately with the new engine and old database, without 
backup/restore. On a negative side, changes in persistent system tables 
make the existing database unusable, thus requiring backup/restore. 
Dunno what is more important.


Dmitry


--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4267) Server crashes while sweeping the database

2013-11-15 Thread Dmitry Yemanov (JIRA)
Server crashes while sweeping the database
--

 Key: CORE-4267
 URL: http://tracker.firebirdsql.org/browse/CORE-4267
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Alpha 1, 2.5.2 Update 1, 2.1.5 Update 1, 2.5.2, 
2.1.5, 2.5.1, 2.1.4, 2.5.0, 3.0 Initial, 2.1.3, 2.1.2, 2.1.1, 2.1.0
Reporter: Dmitry Yemanov


The server process may crash during the sweep under some conditions. They are:

- nobody accessed the problematic tables before the sweep (or sweep is running 
when nobody is connected)
- there are indices based on international string columns
- database schema has complex interdependencies (tables refrencing SPs via 
computed fields and alike)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4268) Server may crash while disconnecting from a database

2013-11-15 Thread Dmitry Yemanov (JIRA)
Server may crash while disconnecting from a database


 Key: CORE-4268
 URL: http://tracker.firebirdsql.org/browse/CORE-4268
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Alpha 1, 3.0 Initial
Reporter: Dmitry Yemanov


Races are possible between listener and worker threads when a database is being 
disconnected (op_exit / op_disconnect packets are processed), sometimes causing 
the remote server to crash. So far it was reprodicible in the high load 
scenario only.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] yesterday commit on fb3 broke something ?

2013-11-14 Thread Dmitry Yemanov
15.11.2013 11:29, Philippe Makowski wrote:

 seems that some of lasts commits broke something
 http://ci.ibphoenix.com/

Am I right in detecting the reason as:

# Your password can be changed to a more suitable one using the
# /opt/firebird/bin/gsec utility.
#
+ awk 'BEGIN { FS = = } ; { print $2 }'
+ grep ISC_PASSWD
+ sudo cat /opt/firebird/SYSDBA.password
+ sudo chmod 644 /tmp/temppassfile
+ cat /tmp/temppassfile
Gd4DgQy+xbBoqALiRsVW
+ /opt/firebird/bin/gsec -user SYSDBA -fetch /tmp/temppassfile -modify 
SYSDBA -pw masterkey
unable to open database
Your user name and password are not defined. Ask your database 
administrator to set up a Firebird login.
Build step 'Ex?cuter un script shell' marked build as failure

?


Dmitry


--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4265) Unexpected lock conflict error may be raised while connecting to a heavily loaded database

2013-11-12 Thread Dmitry Yemanov (JIRA)
Unexpected lock conflict error may be raised while connecting to a heavily 
loaded database
--

 Key: CORE-4265
 URL: http://tracker.firebirdsql.org/browse/CORE-4265
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Alpha 1, 2.5.2 Update 1, 2.1.5 Update 1, 2.5.2, 2.1.5
Reporter: Dmitry Yemanov


Under high concurrent load isc_attach_database() may return isc_lock_conflict 
error:

Statement failed, SQLSTATE = 40001
lock conflict on no wait transaction

without any obvious reasons. This happens only when a number of connections are 
being established at the same time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Compatibility FB3.0 boolean and Interbase

2013-11-12 Thread Dmitry Yemanov
13.11.2013 11:10, liviuslivius wrote:

 i suppose that changing integer value from 32764 to the same value as is in 
 Interbase will cause that FB and IB will be compatible for Boolean
 but may by i am wrong - i know only a little about internals

Having the same SQL-types means that both the binary representation and 
handling of the datatypes (e.g. allowed casting/coersion rules) are the 
same. I suspect this is not the case.


Dmitry


--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Database in use when dropping database

2013-11-12 Thread Dmitry Yemanov
12.11.2013 22:11, Mark Rotteveel wrote:

 Should I just file a bug?

Feel free, we can always reject it g

Do you have a simple test case for this error? You said it was happening 
in specific tests, so it should be reproducible.


Dmitry


--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Performance regression with 3.0.0.30708

2013-11-10 Thread Dmitry Yemanov
10.11.2013 18:40, Mark Rotteveel wrote:

 The test suite is 1288 tests at the moment (and I expect the number of
 tests to increase further). For the majority of tests a database is
 created and dropped per test! So contrary to normal users, performance
 of create and drop is pretty important to me ;).

In terms of authentication, create == attach. And AFAIR, the default SRP 
protocol is known to be slower than the legacy authentication. I believe 
you run tests using a TCP connection (i.e. non-embedded), so 
authentication could be yet another reason of the slowdown relative to 
FB 2.5.


Dmitry


--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Performance regression with 3.0.0.30708

2013-11-05 Thread Dmitry Yemanov
05.11.2013 14:56, Alex Peshkoff wrote:

 This change seems to be absolutely safe no matter of what more
 performance optimizations we will try later.

I'd also start with this solution first.


Dmitry



--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Roles are case sensitive?

2013-10-26 Thread Dmitry Yemanov
26.10.2013 13:29, Mark Rotteveel wrote:

 I just noticed that roles are case sensitive when they are created
 quoted, is that correct behavior?

It is. Roles are regular SQL identifiers.


Dmitry


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Roles are case sensitive?

2013-10-26 Thread Dmitry Yemanov
26.10.2013 14:30, Mark Rotteveel wrote:

 Ok, then how do I need to add a case sensitive role to the dpb to get it
 to work?

Put it there with quotes.


Dmitry


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Roles are case sensitive?

2013-10-26 Thread Dmitry Yemanov
26.10.2013 16:07, Mark Rotteveel wrote:

 If I explicitly specify the connection dialect (isc_dpb_sql_dialect),
 then it does work. I was under the assumption that if no explicit
 dialect is specified, that Firebird uses dialect 3. Is that assumption
 wrong?

It is wrong. No dialect passed means that the client is too old so that 
it has no idea about SQL dialects. The engine implies the legacy dialect 
1 in this case.


Dmitry


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Roles are case sensitive?

2013-10-26 Thread Dmitry Yemanov
26.10.2013 16:52, Dimitry Sibiryakov wrote:

 How to find out what dialect to use for connection before connection?

The dialect is needed before connection only to process the role name 
properly. And you DO know whether your role name is mixed-case before 
connection. So the usage pattern is simple.


Dmitry


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Updated: (CORE-4247) Delete where current of cursor fails for tables with newly added fields

2013-10-24 Thread Dmitry Yemanov
Adriano,

 Can anyone review the attached (in this message) patch?

The solution looks correct. However, it breaks CORE-3806. The condition 
should be:

if (rpb-rpb_relation  !rpb-rpb_number.isValid())
 VIO_record(...);

See my related comment at the end of SortedStream::open().

BTW, once this patch is committed, we don't need the last part of 
SortedStream::open() anymore, the new code replaces that logic.


Dmitry


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ISQL and older ODS

2013-10-10 Thread Dmitry Yemanov
09.10.2013 20:00, Adriano dos Santos Fernandes wrote:

 ISQL is full of duplicate code to handle different ODS. And it's still
 bug, requiring more and more copy-past-and-adjust code.

I agree this is a major PITA.

 I propose we start in 3.0 to do this. Of course, ISQL from 3.0 will not
 fully work when connected to 2.1.1 and elder servers, but I think it's a
 good compromise.

I just warn to do this with much care. There may be cases when the 
map-to-NULL approach might be wrong.


Dmitry


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ISQL and older ODS

2013-10-10 Thread Dmitry Yemanov
10.10.2013 11:41, Alex Peshkoff wrote:

 If (for example) when asked about list of packages it will show empty
 one this will be _very_ good compromise.

New system tables still require conditional code, it's unlikely be 
simplified. But Adriano's suggestion could work for 90% of other cases 
(new fields in existing system tables).


Dmitry


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] where is the event port allocated

2013-10-08 Thread Dmitry Yemanov
08.10.2013 18:39, Nick Upson wrote:

 I'm trying to restrict the ports that fb can use for events to a small
 range, I thought I needed to make changes to aux_request in
 src/remote/inet.cpp but it seems I was wrong. could someone please point
 me in the right direction.

This should be the correct place, as you can see from the 
Config::getRemoteAuxPort() call present there. What was your problem in 
making changes there?


Dmitry


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4235) Deadlock is possible while accessing the monitoring tables under concurrent load

2013-09-22 Thread Dmitry Yemanov (JIRA)
Deadlock is possible while accessing the monitoring tables under concurrent load


 Key: CORE-4235
 URL: http://tracker.firebirdsql.org/browse/CORE-4235
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Alpha 1
Reporter: Dmitry Yemanov




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=64545871iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4236) Database shutdown is reported as successfully completed before all active connections are in fact interrupted

2013-09-22 Thread Dmitry Yemanov (JIRA)
Database shutdown is reported as successfully completed before all active 
connections are in fact interrupted
-

 Key: CORE-4236
 URL: http://tracker.firebirdsql.org/browse/CORE-4236
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Alpha 1
 Environment: SuperServer only
Reporter: Dmitry Yemanov


Database shutdown procedure was reworked in v3 and v2.5.3 to be more 
synchronous than before and really wait until all running activities are 
stopped, their changes are rolled back and all user connections are gone. 
However, this does not work as expected in SuperServer, reporting a successful 
shutdown while other connections may be still modifying the database file. This 
situation is possible under high load.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=64545871iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Linefeed as first character when requesting plan?

2013-09-19 Thread Dmitry Yemanov
19.09.2013 13:39, Mark Rotteveel wrote:

 While working on Jaybird I noticed that the implementation that requests
 the execution plan (isc_info_sql_get_plan) skipped the first byte of the
 String buffer (and the .net implementation does as well).

 On closer examination it turns out that the plan starts with a linefeed
 (0x0A). Why is that?

Every statement may have multiple plans reported (subqueries, etc), they 
start with its own PLAN prefix and they are separated by a new line.

The first linefeed may be there just for consistency or perhaps someone 
didn't care to add an extra check to the code, who knows ;-)


Dmitry


--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Record Encoding

2013-09-04 Thread Dmitry Yemanov
04.09.2013 11:43, Alex Peshkoff wrote:

 May be in that case next step? Keep declaring strings as char(N), but
 treat N not as maximum size of string

Please don't play against the SQL standard. The declared string length 
is a constraint which must be enforced.


Dmitry



--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] RES: RES: Firebird Alpha 1 GBAK bug

2013-09-04 Thread Dmitry Yemanov
04.09.2013 23:34, Fabiano - Desenvolvimento SCI wrote:

 Now I get another problem:
 gbak:committing metadata
 gbak: ERROR:invalid request BLR at offset 1769
 gbak: ERROR:  BLR syntax error: expected variable identifier at offset
 1770, encountered 76
 gbak: ERROR:  Error while parsing procedure SP_TERCEIRO's BLR
 gbak:Exiting before completion due to errors

It has been fixed yesterday, so the next snapshot build (#30636 or 
above) should help.


Dmitry


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Record Encoding, was Unicode UTF-16 etc

2013-09-03 Thread Dmitry Yemanov
03.09.2013 11:13, Alex Peshkoff wrote:

 That's definitely a candidate for next ODS. But I see one problem -
 currently all (or at least most of all) record buffers are allocated at
 prepare time. With variable record length this strategy requires change,
 and that change does not look trivial at the first glance.

Record buffers are easily reallocated (extended) at runtime, this is how 
we deal with different record formats. All the code is already in place 
and the prepare-time allocation is just targeted at the most commonly 
used scenario. The problem is that we never shrink record buffers. This 
works fast, but the memory is used ineffectively. If we start to 
reallocate them both ways at runtime, it will cost us extra CPU cycles.


Dmitry


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Created: (CORE-4201) computed field has null value inside BI trigger

2013-08-31 Thread Dmitry Yemanov
01.09.2013 06:29, Ann Harrison wrote:

 I think this is correct - if unexplicable - behavior according to the 
 Standard.  Something about the state of the column prior to the operation.

I respectfully disagree. The NEW context is in the perfectly valid state 
in the BEFORE INSERT triggers. If you can evaluate both NEW.FIELD and an 
explicit expression based on that field, why you cannot evaluate a 
computed field based on the same expression?

It worked fine in all IB/FB versions and the ticket is about the 
regression introduced recently.


Dmitry


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Fwd: Created: (CORE-4191) Define sequence name for Identity Column Type

2013-08-27 Thread Dmitry Yemanov
27.08.2013 20:03, Adriano dos Santos Fernandes wrote:

 I think an USING clause would be a great addition:

 GENERATED BY DEFAULT AS IDENTITY [USING SEQUENCE name]

 What do you think?

Basically, I don't mind, but the behavior will be different from 
constraints in regard to the already existing object named name. 
AFAIU, you suggest to reuse the sequence, right?


Dmitry


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] New features

2013-08-22 Thread Dmitry Yemanov
22.08.2013 10:28, liviuslivius wrote:

 i need to know what is in plan next after fb3 release and with what
 priority.

We'll be happy to share this information once we have a roadmap for the 
future versions. Before that, it will be just speculations. For the time 
being, I'd rather prefer to concentrate attention on the v3 development.


Dmitry


--
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Explained plan output: feedback wanted

2013-08-13 Thread Dmitry Yemanov
13.08.2013 11:55, Dimitry Sibiryakov wrote:

 Because plans are read from bottom to the top, I would prefer something like 
 this:

 (A)

 Select Expression
  - Aggregate
- Sort (unique)
- Table RDB$RELATIONS Access By ID
  - Index RDB$INDEX_0 Scan

Now imagine two aggregate functions with DISTINCT inside:

Select Expression
  - Aggregate
- Sort (unique)
- Sort (unique)
- Table RDB$RELATIONS Access By ID
  - Index RDB$INDEX_0 Scan

Is it understandable that sorts are independent from each other but both 
dependent from the retrieval? I don't think so.


Dmitry


--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Explained plan output: feedback wanted

2013-08-12 Thread Dmitry Yemanov
All,

There are some kinds of queries that have data access methods linked to 
each other. Windowed functions are the obvious example, but it happens 
even for regular aggregate functions. For example, COUNT(DISTINCT) needs 
not only read the underlying stream but also sort it in order to 
eliminate duplicates. So we have both retrieval and sorting inside the 
aggregation node and sorting is based on the retrieval:

select count(distinct rdb$relation_id)
from rdb$relations
group by rdb$relation_name

Select Expression
   - Aggregate
 - Table RDB$RELATIONS Access By ID
   - Index RDB$INDEX_0 Scan
 /*
 - Sort (unique)
   - Table RDB$RELATIONS Access By ID
  - Index RDB$INDEX_0 Scan
 */

However, I'd like to skip the repeating part and replace it with a 
reference to the earier introduced part, because technically there's 
only one retrieval, not two.

The possible options are:

(A)

Select Expression
   - Aggregate
 - Table RDB$RELATIONS Access By ID
   - Index RDB$INDEX_0 Scan
 - Sort (unique)

where no input for sorting means the prior stream

(B)

Select Expression
   - Aggregate
 - Table RDB$RELATIONS Access By ID
   - Index RDB$INDEX_0 Scan
 - Sort (unique)
   - ^^^

which means to look above for the input stream. But the indentation 
makes it hard to understand what exactly we refer to. And theoretically 
there maybe references to farther parts of the plan, not only the 
neighbours.

(C)

Select Expression
   - Aggregate
 - Table RDB$RELATIONS Access By ID
   - Index RDB$INDEX_0 Scan
 - Sort (unique)
   - $base$

some keyword is used to refer to the input stream of the aggregation

(D)

Select Expression
   - Aggregate
 - 1: Table RDB$RELATIONS Access By ID
   - Index RDB$INDEX_0 Scan
 - 2: Sort (unique)
   - $(1)

all non-trivial methods have their children enumerated so they can be 
referenced by numbers. But for complex queries there will be multiple 
(1)s and (2)s making it harder to match the proper one.

(E)

Select Expression
   - 1: Aggregate
 - 2: Table RDB$RELATIONS Access By ID
   - 3: Index RDB$INDEX_0 Scan
 - 4: Sort (unique)
   - $(2)

or

Select Expression
1:  - Aggregate
2:- Table RDB$RELATIONS Access By ID
3:  - Index RDB$INDEX_0 Scan
4:- Sort (unique)
5:  - $(2)

all methods are globally enumerated. The output is a bit noisy, but 
personally I favor (E)#2 so far.

Comments anyone? Other suggestions?


Dmitry

--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4178) New API should return proper metadata properties, not the historical artifacts

2013-08-11 Thread Dmitry Yemanov (JIRA)
New API should return proper metadata properties, not the historical artifacts
--

 Key: CORE-4178
 URL: http://tracker.firebirdsql.org/browse/CORE-4178
 Project: Firebird Core
  Issue Type: Bug
  Components: API / Client Library
Affects Versions: 3.0 Alpha 1
Reporter: Dmitry Yemanov


Instead of returning implementation details and keeing the old API weirdness, 
let's provide a clear implementation in IMessageMetadata. Now, for SQL_BLOB 
(subtype TEXT), getScale() returns a charset. For SQL_VARYING, getSubType() 
returns a charset, getCharSet() returns zero (accordingly to user reports). 
This makes the interface hardly usable and plays against the long-term success 
of the new API.

The fact that the old API emulation is stacked on top of the new API (thus 
possibly requiring a conversion between proper and legacy property values) 
could be a problem here, but it must be solved.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] row_number window function with over()

2013-08-10 Thread Dmitry Yemanov
10.08.2013 21:20, liviuslivius пишет:

 and i test this also against Oracle 11g
 and try SELECT T.ID, row_Number() over() FROM TEST
 i get error the same as in MSSQL
 Error: ORA-30485: missing ORDER BY expression in the window specification

PGSQL 9.1:

postgres=# select id from test;
  id

   2
   1
   4
   3
   5
(5 rows)

postgres=# select id, row_number() over() from test;
  id | row_number
+
   2 |  1
   1 |  2
   4 |  3
   3 |  4
   5 |  5
(5 rows)

postgres=# select id, row_number() over() from test order by id asc;
  id | row_number
+
   1 |  2
   2 |  1
   3 |  4
   4 |  3
   5 |  5
(5 rows)

postgres=# select id, row_number() over() from test order by id desc;
  id | row_number
+
   5 |  5
   4 |  3
   3 |  4
   2 |  1
   1 |  2
(5 rows)

postgres=# select id, row_number() over(order by id asc) from test;
  id | row_number
+
   1 |  1
   2 |  2
   3 |  3
   4 |  4
   5 |  5
(5 rows)

postgres=# select id, row_number() over(order by id desc) from test;
  id | row_number
+
   5 |  1
   4 |  2
   3 |  3
   2 |  4
   1 |  5
(5 rows)

postgres=# select id, row_number() over(order by id asc) from test order 
by id asc;
  id | row_number
+
   1 |  1
   2 |  2
   3 |  3
   4 |  4
   5 |  5
(5 rows)

postgres=# select id, row_number() over(order by id asc) from test order 
by id desc;
  id | row_number
+
   5 |  5
   4 |  4
   3 |  3
   2 |  2
   1 |  1
(5 rows)

postgres=# select id, row_number() over(order by id desc) from test 
order by id asc;
  id | row_number
+
   1 |  5
   2 |  4
   3 |  3
   4 |  2
   5 |  1
(5 rows)

postgres=# select id, row_number() over(order by id desc) from test 
order by id desc;
  id | row_number
+
   5 |  1
   4 |  2
   3 |  3
   2 |  4
   1 |  5
(5 rows)


Dmitry



--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4176) Monitoring tables return incomplete information in SC/CS configurations

2013-08-09 Thread Dmitry Yemanov (JIRA)
Monitoring tables return incomplete information in SC/CS configurations
---

 Key: CORE-4176
 URL: http://tracker.firebirdsql.org/browse/CORE-4176
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Alpha 1
 Environment: Classic/SuperClassic (SharedDatabase = true)
Reporter: Dmitry Yemanov


When MON$ tables are queried the first time, only information for the current 
connection is returned. If some other connection in turn queries MON$ then it 
gets information for both connections. After that, the first connection also 
gets full information. And so on.

Simplified test case:

isql #1
SQL connect 'test';
Database:  'test', User: dimitr

isql #2
SQL connect 'test';
Database:  'test', User: dimitr

isql #1
SQL select count(*) from mon$attachments;

   COUNT

   1

isql #2
SQL select count(*) from mon$attachments;

   COUNT

   2

isql #1
SQL commit;
SQL select count(*) from mon$attachments;

   COUNT

   2


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Speed comparision on some query FB2.5 vs FB3.0 - totally different plans

2013-08-06 Thread Dmitry Yemanov
06.08.2013 11:04, liviuslivius wrote:

 if you need more info, please ask me

Can you provide the sample database?


Dmitry



--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] FB3.0 Restore process should not check external tables settings

2013-08-06 Thread Dmitry Yemanov
05.08.2013 17:57, liviuslivius wrote:

 Firebird 3.0
 i have database backup file (from import server) and now i need to
 restore it on production server
 On import server external tables access is set Full
 on Production Server it is Set to None
 then when i try to restore database on Production server i got error
 Database restore canceled 10:32:59 due to IBPP exception:
 *** IBPP::SQLException ***
 Context: ServiceImpl::Wait
 Message: isc_service_query failed
 SQL Message : -902
 can't format message 13:98 -- message file
 C:\WINDOWS\system32\firebird.msg not found
 Engine Code: 335544831
 Engine Message :
 Access to external file PLAYERS.EXT is denied by server administrator
 Error while parsing procedure IMPORT's BLR

Confirmed and fixed, thanks.


Dmitry



--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4168) Backup containing procedures or triggers that select from external tables cannot be restored with ExternalFileAccess=None

2013-08-06 Thread Dmitry Yemanov (JIRA)
Backup containing procedures or triggers that select from external tables 
cannot be restored with ExternalFileAccess=None
-

 Key: CORE-4168
 URL: http://tracker.firebirdsql.org/browse/CORE-4168
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Alpha 1
Reporter: Dmitry Yemanov


Engine Code : 335544831
Engine Message : Access to external file PLAYERS.EXT is denied by server 
administrator
Error while parsing procedure IMPORT's BLR


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Type BOOLEAN in FB3

2013-08-05 Thread Dmitry Yemanov
04.08.2013 16:47, Simonov Denis wrote:

 select 1
   from rdb$database
 where true is true


 Work is correct

 select 1
   from rdb$database
 where (1=1) and true


 Work is correct

 select 1
   from rdb$database
 where (1=1) is true


 Invalid token.
 Dynamic SQL Error.
 SQL error code = -104.
 Token unknown - line 3, column 13.
 is.

Accordingly to the SQL specification, it should work. Adriano, is it 
prohibited intentionally?


Dmitry


--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4165) Replace the hierarchical union execution with the plain one

2013-08-05 Thread Dmitry Yemanov (JIRA)
Replace the hierarchical union execution with the plain one
---

 Key: CORE-4165
 URL: http://tracker.firebirdsql.org/browse/CORE-4165
 Project: Firebird Core
  Issue Type: Improvement
  Components: Engine
Reporter: Dmitry Yemanov


Test case #1:

select 0 i from rdb$database
union all
select 1 from rdb$database
union all
select 2 from rdb$database

Current plan:

Select Expression
- Union
- Union
- Table RDB$DATABASE Full Scan
- Table RDB$DATABASE Full Scan
- Table RDB$DATABASE Full Scan

Expected plan:

Select Expression
- Union
- Table RDB$DATABASE Full Scan
- Table RDB$DATABASE Full Scan
- Table RDB$DATABASE Full Scan

Test case #2:

select 0 i from rdb$database
union
select 1 from rdb$database
union
select 2 from rdb$database

Current plan:

Select Expression
- Sort
- Union
- Sort
- Union
- Table RDB$DATABASE Full Scan
- Table RDB$DATABASE Full Scan
- Table RDB$DATABASE Full Scan

Expected plan:

Select Expression
- Sort
- Union
- Table RDB$DATABASE Full Scan
- Table RDB$DATABASE Full Scan
- Table RDB$DATABASE Full Scan

The latter case is very important as it avoids redundant sorts. However, even 
the former case could benefit from the plain execution, as it saves one union 
context thus avoiding redundant record copying.

As a bonus, for the N streams union, we'll have only one context introduced 
instead of N-1 contexts. Of course, mixed type (both ALL and DISTINCT used for 
the streams) unions will behave like before:

select 0 i from rdb$database
union distinct
select 1 from rdb$database
union all
select 2 from rdb$database

Select Expression
- Union
- Sort
- Union
- Table RDB$DATABASE Full Scan
- Table RDB$DATABASE Full Scan
- Table RDB$DATABASE Full Scan


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4159) Incorrect memory statistics is reported

2013-08-04 Thread Dmitry Yemanov (JIRA)
Incorrect memory statistics is reported
---

 Key: CORE-4159
 URL: http://tracker.firebirdsql.org/browse/CORE-4159
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Alpha 1
Reporter: Dmitry Yemanov
Priority: Minor


Two issues are observed when looking at the reported memory statistics:

1) Page cache size is not included into the global (database wise) counters
2) OS allocation counters can be around ~4GB

So far I can confirm only the former issue, the latter one is under futher 
investigation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Hex notation bug with SMALLINT

2013-08-04 Thread Dmitry Yemanov
04.08.2013 11:20, Mark Rotteveel wrote:
 
 Ok, lets not call it a bug, but an area of potential improvement: based
 on the context it should be possible to deduce that the literal should
 be a smallint. Therefor it should be possible to handle 0x8000 as -32768
 when assigned to a smallint and as 32768 for an integer.

I doubt this is possible. AFAIK, the value is created at the parser 
level, so it's contextless.


Dmitry


--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] isc_dpb_set_db_sql_dialect ignored in FB3?

2013-08-03 Thread Dmitry Yemanov
03.08.2013 19:12, Mark Rotteveel wrote:

 A test in Jaybird for warnings registered on a connection uses
 isc_dpb_set_db_sql_dialect to change a dialect 3 database to 1.

 In Firebird 2.5 and earlier this triggers a warning (Database dialect
 being changed from 3 to 1, error code 335544802), in Firebird 3 no
 warning is triggered. Does this mean this dpb item no longer works (is
 ignored)?

You can validate that using gstat -h.


Dmitry


--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Firebird 3.0 Alpha 1 release is available for testing

2013-08-02 Thread Dmitry Yemanov
Firebird Project announces the first Alpha release of Firebird 3.0, the 
next major version of the Firebird relational database, which is now 
available for testing.

This Alpha release arrives with an early preview of the features and 
improvements currently under development by the Firebird development 
team, as well as with countless bugfixes. Our users are appreciated 
giving it a try and providing feedback to this mailing list. Apparent 
bugs can be reported directly to the bugtracker.

Alpha releases are not encouraged for production usage or any other 
goals that require a stable system. They are, however, recommended for 
those users who want to help in identifying issues and bottlenecks thus 
allowing to progress faster through the Beta/RC stages towards the final 
release.

Please read the Release Notes carefully before installing and testing 
this Alpha release.


Download page:
http://www.firebirdsql.org/en/firebird-3-0-0-alpha1/

Release Notes:
http://web.firebirdsql.org/download/prerelease/rlsnotes/Firebird-3.0.0_Alpha1-ReleaseNotes.pdf


--
Dmitry Yemanov

--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] RFC - FB 3.0 IPv6 support (rebased)

2013-08-01 Thread Dmitry Yemanov
31.07.2013 16:15, marius adrian popa wrote:
 
 ipv6 support was merged in 3.0 ?

IIRC, not (yet).


Dmitry



--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Procedure size in package limited?

2013-07-09 Thread Dmitry Yemanov
09.07.2013 18:35, Thomas Beckmann wrote:
 
 I get this error

 Statement failed, SQLSTATE = 2F000
 sort record size of 187704 bytes is too big
 -Error while parsing procedure PKG$.P_SOMEPROCEDURE's BLR

 on recreating the package body.

It has nothing to do with the package/procedure size, it's about size of 
the explicit or implicit sorting set (select * order/group by etc) 
inside that procedure.

 Creating the procedure outside a package works fine.

That's weird. A test case would be appreciated.


Dmitry


--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4142) Server crashes while preparing a query with DISTINCT and ORDER BY

2013-07-09 Thread Dmitry Yemanov (JIRA)
Server crashes while preparing a query with DISTINCT and ORDER BY
-

 Key: CORE-4142
 URL: http://tracker.firebirdsql.org/browse/CORE-4142
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Initial, 3.0 Alpha 1
Reporter: Dmitry Yemanov


Artificial test case:

select distinct rdb$relation_id + 0, rdb$relation_name
from rdb$relations
order by rdb$relation_name


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4139) Error invalid stream can be raised in some cases while matching a computed index

2013-07-04 Thread Dmitry Yemanov (JIRA)
Error invalid stream can be raised in some cases while matching a computed 
index
--

 Key: CORE-4139
 URL: http://tracker.firebirdsql.org/browse/CORE-4139
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 2.5.2 Update 1, 2.1.5 Update 1, 2.5.2, 2.1.5, 2.5.1, 
2.1.4, 2.5.0, 2.1.3, 2.1.2, 2.1.1, 2.1.0
Reporter: Dmitry Yemanov


Test case:

create table A (ID int);
create table B (ID int);
create index IDX on A computed by (ID);

select min( (select 1 from A where cast(ID as int) = B.ID) ) from B
-- ERROR: bad BLR -- invalid stream.

This error is not present if computed index is not created or if CAST is 
omitted inside the query.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] EXECUTE BLOCK implicit parameters charset

2013-07-04 Thread Dmitry Yemanov
Adriano,

 v3:

 b) If a connection charset is used, parameters are described with the
 connection charset. This is wrong, NONE should continue as NONE.

Sorry, I don't get you here. If you're talking about implicit (omitted) 
charset in parameters and connection charset is not NONE, where that 
NONE that should continue as NONE originates from? Or do you mean 
explicit NONE that should not be overwritten with the connection charset?

 So I propose that:

 a) metadata charset is not taken into account in EXECUTE BLOCK and

 b) that normal (NONE-ANYTHING = NONE; ANYTHING-NONE = ANYTHING;
 ANYTHING-NON-NONE-CS = NON-NONE-CS) conversion rules are used.

I don't mind.


Dmitry


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] gsec-issues with FB3.0

2013-07-04 Thread Dmitry Yemanov
04.07.2013 16:13, Thomas Beckmann wrote:

 Finally
 gbak -b c:\temp\test.fdb c:\temp\test.fbk
 gbak: ERROR:Unable to perform operation.  You must be either SYSDBA or
 owner of the database
 gbak:Exiting before completion due to errors
 I still am the owner of the database (I hope ;-))
 gbak -b c:\temp\test.fdb c:\temp\test.fbk -user beckmann -password SomePwd
 returns the same error (this behavior is already in the tracker and
 confirmed as beeing erroneous).

This one has already been fixed.


Dmitry


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Firebird 3.0 Alpha 1 issues

2013-07-01 Thread Dmitry Yemanov
01.07.2013 17:14, Pavel Cisar wrote:

 Next issues were discovered via FDB test suite. Tested on 64-bit Linux,
 default configuration (i.e. vanila install from tar.gz).

Were connections true local (embedded) or via localhost?

 1. cursor.rowcount (isc_dsql_sql_info with isc_info_sql_records) returns
 1 instead expected 6

 cur.execute('select * from project')
 self.assertEqual(cur.rowcount,0)
 cur.fetchone()
 self.assertEqual(cur.rowcount,6)  --

Correct for embedded connections (no record prefetch), incorrect for 
remote connections (including localhost).

 2. MON$ATTACHMENTS. Next columns are NULL: MON$REMOTE_PROTOCOL,
 mon$remote_address, mon$remote_pid, mon$remote_process.

MON$REMOTE_PROTOCOL, MON$REMOTE_ADDRESS:

Correct for embedded connections (no network layer involved), incorrect 
for remote connections (including localhost).

MON$REMOTE_PID, MON$REMOTE_PROCESS:

Should always be present, unless you had connected via some old 
fbclient. To be validated.

 3. Unexpected RDB$VALID_BLR = True on stored procedure in database
 restored by v3.0

Why is it unexpected?

 4. Can't get list of users via services API. Returns:

 Unable to perform the requested Service API action:
 - SQLCODE: -901
 - unrecognized service parameter block
 - All services except for getting server log require switches'

 -901
 335544562

 BTW, Flamerobin fails with the same error on attempt to get list of
 users from server.

 5. Call to isc_service_query with isc_info_svc_running raises error:

 Services/isc_service_query:
 - SQLCODE: -901
 - invalid service handle'

 -901
 335544559

 Service handle is valid. This call fails ONLY before some actions are
 requested (via isc_service_start),
 for example isc_action_svc_get_ib_log. Once any service is started,
 isc_service_query starts to work properly.

Sounds like a bug.


Dmitry


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] 2.5 build error

2013-06-20 Thread Dmitry Yemanov
20.06.2013 10:50, Philippe Makowski wrote:

 seems that 2.5 don't build

 http://ci.ibphoenix.fr/job/firebird25_Linux_64/89/

Thanks. I've committed a workaround, but cannot validate it. Let's see 
what the tomorrow's integration will report.


Dmitry


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Trunk build error

2013-06-20 Thread Dmitry Yemanov
19.06.2013 17:45, Adriano dos Santos Fernandes wrote:

 As a related topic, there were TCS tests already failing after previous
 SEQUENCE command changes.

 I started to debug it but didn't finished.

 The problem was about SET GENERATOR (which was a DML command) and
 transaction visibility.

Sigh. Could you please send the failing tests to me?


Dmitry


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4127) Server crashes instead of reporting the error key size exceeds implementation restriction

2013-06-19 Thread Dmitry Yemanov (JIRA)
Server crashes instead of reporting the error key size exceeds implementation 
restriction
---

 Key: CORE-4127
 URL: http://tracker.firebirdsql.org/browse/CORE-4127
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 2.5.2 Update 1, 2.1.5 Update 1, 2.5.2, 2.1.5, 2.0.7, 
2.5.1, 2.1.4, 2.5.0, 2.0.6, 3.0 Initial, 2.1.3, 2.1.2, 2.0.5, 2.1.1, 2.1.0
Reporter: Dmitry Yemanov


The local buffer of MAX_KEY (4096) bytes overflows thus corrupting the stack 
and causing the engine to crash. Only compound indices are affected.

Test case:

recreate table tab1 (col1 int, col2 char(10));
create index itab1 on tab1 (col1, col2);

select * from tab1 where col1 = 1 and col2 = lpad('a', 5000)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


<    5   6   7   8   9   10   11   12   13   >