Re: [Firebird-devel] [FB-Tracker] Created: (CORE-4982) Server crashes during "select from procedure" if exception is thrown while backing out the current savepoint

2015-10-29 Thread Dimitry Sibiryakov
29.10.2015 12:14, Dmitry Yemanov wrote:
> If it can throw from inside VIO_verb_cleanup(), then it is.

   The problem is throwing or missing catch?

-- 
   WBR, SD.

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Cannot easily install plugins

2015-10-29 Thread Adriano dos Santos Fernandes
Hi!

Initial implementation of external engines didn't needed to edit
Firebird configuration files. You could just drop files in the plugins
directory and they worked.

Now that seems broken. File plugins/udr_engine.conf seems to be
completely unused.

There is a plugins.conf file needing every plugin to be configured there.

That's bad. We know that people (as ourselves as example) will not
create installer for plugins to edit Firebird config files, leaving
installation procedures to be done manually by users/admins.


Adriano


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Cannot easily install plugins

2015-10-29 Thread Alex Peshkoff
On 10/29/2015 06:26 PM, Adriano dos Santos Fernandes wrote:
> Hi!
>
> Initial implementation of external engines didn't needed to edit
> Firebird configuration files. You could just drop files in the plugins
> directory and they worked.
>
> Now that seems broken. File plugins/udr_engine.conf seems to be
> completely unused.
>
> There is a plugins.conf file needing every plugin to be configured there.
>
> That's bad. We know that people (as ourselves as example) will not
> create installer for plugins to edit Firebird config files, leaving
> installation procedures to be done manually by users/admins.

We discussed it a few years ago. You said that time that to provide 
installation of plugins you need operator include in .conf files. It 
exists for a long time. What else problems?


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Cannot easily install plugins

2015-10-29 Thread Dimitry Sibiryakov
29.10.2015 16:26, Adriano dos Santos Fernandes wrote:
> Now that seems broken. File plugins/udr_engine.conf seems to be
> completely unused.
>
> There is a plugins.conf file needing every plugin to be configured there.

   It works fine for my plugin. Something should be broken in udr_engine itself.

-- 
   WBR, SD.

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Cannot easily install plugins

2015-10-29 Thread Adriano dos Santos Fernandes
On 29/10/2015 13:42, Alex Peshkoff wrote:
> On 10/29/2015 06:26 PM, Adriano dos Santos Fernandes wrote:
>> Hi!
>>
>> Initial implementation of external engines didn't needed to edit
>> Firebird configuration files. You could just drop files in the plugins
>> directory and they worked.
>>
>> Now that seems broken. File plugins/udr_engine.conf seems to be
>> completely unused.
>>
>> There is a plugins.conf file needing every plugin to be configured there.
>>
>> That's bad. We know that people (as ourselves as example) will not
>> create installer for plugins to edit Firebird config files, leaving
>> installation procedures to be done manually by users/admins.
> We discussed it a few years ago. You said that time that to provide 
> installation of plugins you need operator include in .conf files. It 
> exists for a long time. What else problems?
>
>
I do see this hardcoded:

fb_utils::getPrefix(IConfigManager::DIR_CONF, "plugins.conf"),
ConfigFile::HAS_SUB_CONF)

If one need to include the "include", it's also a file edit that should
be avoided.


Adriano


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4983) [AV] Server crashes during execution of unprepared statement

2015-10-29 Thread Kovalenko Dmitry (JIRA)
[AV] Server crashes during execution of unprepared statement


 Key: CORE-4983
 URL: http://tracker.firebirdsql.org/browse/CORE-4983
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 2.5.4
Reporter: Kovalenko Dmitry


[Stack]

>   fb_inet_server.exe!EXE_unwind(Jrd::thread_db * tdbb, Jrd::jrd_req * 
> request) Line 1080  C++
fb_inet_server.exe!JRD_start(Jrd::thread_db * tdbb, Jrd::jrd_req * 
request, Jrd::jrd_tra * transaction, short level) Line 7005  C++
fb_inet_server.exe!execute_request(Jrd::thread_db * tdbb, Jrd::dsql_req 
* request, Jrd::jrd_tra * * tra_handle, unsigned short in_blr_length, const 
unsigned char * in_blr, unsigned short in_msg_length, const unsigned char * 
in_msg, unsigned short out_blr_length, unsigned char * out_blr, unsigned short 
out_msg_length, unsigned char * out_msg, bool singleton) Line 1271   C++
fb_inet_server.exe!DSQL_execute(Jrd::thread_db * tdbb, Jrd::jrd_tra * * 
tra_handle, Jrd::dsql_req * request, unsigned short in_blr_length, const 
unsigned char * in_blr, unsigned short in_msg_type, unsigned short 
in_msg_length, const unsigned char * in_msg, unsigned short out_blr_length, 
unsigned char * out_blr, unsigned short out_msg_length, unsigned char * 
out_msg) Line 273   C++
fb_inet_server.exe!jrd8_execute(__int64 * user_status, Jrd::jrd_tra * * 
tra_handle, Jrd::dsql_req * * stmt_handle, unsigned short in_blr_length, const 
char * in_blr, unsigned short in_msg_type, unsigned short in_msg_length, const 
char * in_msg, unsigned short out_blr_length, char * out_blr, unsigned short 
__formal, unsigned short out_msg_length, char * out_msg) Line 4045   C++
fb_inet_server.exe!isc_dsql_execute2_m(__int64 * user_status, unsigned 
int * tra_handle, unsigned int * stmt_handle, unsigned short in_blr_length, 
const char * in_blr, unsigned short in_msg_type, unsigned short in_msg_length, 
char * in_msg, unsigned short out_blr_length, char * out_blr, unsigned short 
out_msg_type, unsigned short out_msg_length, char * out_msg) Line 2725   C++
fb_inet_server.exe!rem_port::execute_statement(P_OP op, p_sqldata * 
sqldata, packet * sendL) Line 2328  C++
fb_inet_server.exe!process_packet(rem_port * port, packet * sendL, 
packet * receive, rem_port * * result) Line 3531 C++
fb_inet_server.exe!loopThread(void * __formal) Line 5260C++

[Local variables]

+   tdbb0x0487f1c0 {tdbb_default=0x052e9ff0 
{parent_redirect=false freeBlocks={pool=0x052e9ff0 {...} ...} ...} ...} 
Jrd::thread_db *
+   request 0xJrd::jrd_req *


-- 
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



--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Snapshots are not available

2015-10-29 Thread Leyne, Sean
Karol,

> today snapshots are not avaiable to download
> for both 2.5 and 3.0

The system that hosts the snapshot downloads has been experiencing network 
interface problems over the last 5 days, resulting in occasional outages.

We are working to resolve this problem.


Sean

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4984) Optimizer on range query with multiple column index gives wrong results

2015-10-29 Thread James Linse (JIRA)
Optimizer on range query with multiple column index gives wrong results 


 Key: CORE-4984
 URL: http://tracker.firebirdsql.org/browse/CORE-4984
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Beta 2
 Environment: Windows 8.1.  Tested with 3.0 Beta 2 and snapshot 
3.0.0.32134 (Win32)
Reporter: James Linse
Priority: Critical


Incorrect results may be returned when running a range query on a table with an 
index with multiple columns.

Below is a simple test case script.


CREATE TABLE TEST_IDX
(
  ID integer NOT NULL,
  VAL integer,
  CREATE_DATE timestamp,
  PRIMARY KEY (ID)
);

INSERT INTO TEST_IDX VALUES(1,1,'2016-01-01 01:01:00');
INSERT INTO TEST_IDX VALUES(2,1,'2015-01-02 01:01:00');
INSERT INTO TEST_IDX VALUES(3,2,'2014-02-01 01:01:00');
INSERT INTO TEST_IDX VALUES(4,2,'2015-02-02 01:01:00');
INSERT INTO TEST_IDX VALUES(5,3,'2015-03-01 01:01:00');
INSERT INTO TEST_IDX VALUES(6,3,'2015-03-02 01:01:00');
INSERT INTO TEST_IDX VALUES(7,4,'2015-04-01 01:01:00');

Before creating the multi column index running the query below will return 
"01.02.2014, 01:01:00.000" This is correct.
SELECT MIN(CREATE_DATE) FROM TEST_IDX WHERE VAL >=1 AND VAL <=3;
Plan generated: PLAN (TEST_IDX NATURAL)

Now create the multi column index
CREATE INDEX IDX_VAL_CREATE_DATE ON TEST_IDX (VAL, CREATE_DATE);

The query below will now return "02.01.2015, 01:01:00.000"
SELECT MIN(CREATE_DATE) FROM TEST_IDX WHERE VAL >=1 AND VAL <=3;
Plan generated: PLAN (TEST_IDX ORDER IDX_VAL_CREATE_DATE)

If the query is rewritten as 
SELECT MIN(CREATE_DATE) FROM TEST_IDX WHERE VAL BETWEEN 1 AND 3;
We still get "02.01.2015, 01:01:00.000"
Plan generated: PLAN (TEST_IDX ORDER IDX_VAL_CREATE_DATE)


However if the query is rewritten as 
SELECT MIN(CREATE_DATE) FROM TEST_IDX WHERE VAL IN (1,2,3)
We get the correct result "01.02.2014, 01:01:00.000"
Plan generated: PLAN (TEST_IDX INDEX (IDX_VAL_CREATE_DATE, IDX_VAL_CREATE_DATE, 
IDX_VAL_CREATE_DATE))


It would appear that the broken results are first getting the minimum VAL then 
finding the minimum CREATE_DATE of that VAL.


-- 
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



--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Coalesce of the damned

2015-10-29 Thread Claudio Valderrama C.
> -Original Message-
> From: Arno Brinkman [mailto:fbsupp...@abvisie.nl] 
> Sent: Miércoles, 28 de Octubre de 2015 21:27
> 
> I've to dig deep in my memory (ooh boy), but i think the 
> stream flag NULL is 
> not treated proper in this case.
> 
> Thinking i've fixed something simular or even this in the 
> past, but seems 
> not :-/

After reading Adriano's mail, I stopped looking at v2.5.
:-)

I think the case can be summarized and optimized:

given
T = table
V = the result of a selectable proc, view or derived table,
if T left join V produces a null record in V caused by a non-matching outer
join,
then coalesce() in V should produce null immediately, no need to evaluate
the arguments. 

A test for a solution might be

select coalesce(C.f, B.f, A.f)
from A left join 
   (B left join C on ...)
on ...

and inserting a few records that let one join (or the two joins) produce
nulls in the right side.

> Simplified test case:
> 
> SELECT
>   dt.*
> FROM
>   RDB$DATABASE
>   LEFT JOIN (SELECT COALESCE(RDB$SECURITY_CLASS, 'NO WAY') AS 
> COALESCE_RET, 
> 'YES THIS TO' AS CONST_RET FROM RDB$DATABASE WHERE 1=1) dt ON (1 = 0);

Strange, I get NULL and NULL in v2.5 and v3.

C.


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Coalesce of the damned

2015-10-29 Thread Arno Brinkman
Hi Claudio,

> After reading Adriano's mail, I stopped looking at v2.5.
> :-)

> I think the case can be summarized and optimized:

> given
> T = table
> V = the result of a selectable proc, view or derived table,
> if T left join V produces a null record in V caused by a non-matching 
> outer
> join,
> then coalesce() in V should produce null immediately, no need to evaluate
> the arguments.

Exactly.


>> Simplified test case:
> ...
> Strange, I get NULL and NULL in v2.5 and v3.

lol, i tested on a older version. Problem of having to many different 
versions on your computer around.
So this one was fixed already.


Kind Regards,
Arno Brinkman
ABVisie





--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Snapshots are not available

2015-10-29 Thread liviuslivius
Hi,
 
today snapshots are not avaiable to download
for both 2.5 and 3.0
 
regards,
karol Bieniaszewski--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Coalesce of the damned

2015-10-29 Thread Adriano dos Santos Fernandes
On 29/10/2015 04:02, Claudio Valderrama C. wrote:
>> -Original Message-
>> From: Arno Brinkman [mailto:fbsupp...@abvisie.nl] 
>> Sent: Miércoles, 28 de Octubre de 2015 21:27
>>
>> I've to dig deep in my memory (ooh boy), but i think the 
>> stream flag NULL is 
>> not treated proper in this case.
>>
>> Thinking i've fixed something simular or even this in the 
>> past, but seems 
>> not :-/
> After reading Adriano's mail, I stopped looking at v2.5.
> :-)
>
> I think the case can be summarized and optimized:
>
> given
> T = table
> V = the result of a selectable proc, view or derived table,
> if T left join V produces a null record in V caused by a non-matching outer
> join,
> then coalesce() in V should produce null immediately, no need to evaluate
> the arguments. 
>
But not only COALESCE... For example, an UDF should not run in this case.

So the verification should be done before run the view's field expression.

And that is my idea. A generic (for all expression nodes) set of stream
(like blr_derived_expr has) that will be verified directly by EVL_expr,
before calling the node->execute.


Adriano


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4982) Server crashes during "select from procedure" if exception is thrown while backing out the current savepoint

2015-10-29 Thread Dmitry Yemanov (JIRA)
Server crashes during "select from procedure" if exception is thrown while 
backing out the current savepoint


 Key: CORE-4982
 URL: http://tracker.firebirdsql.org/browse/CORE-4982
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0 Beta 2, 2.5.4, 2.5.3 Update 1, 2.1.7, 3.0 Beta 1, 
2.5.3, 3.0 Alpha 2, 3.0 Alpha 1, 2.5.2 Update 1, 2.5.2, 2.5.1, 2.5.0
Reporter: Dmitry Yemanov


The bug should be common for all versions, although less visible in v2.x due to 
bugcheck being raised immediately.

-- 
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



--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [FB-Tracker] Created: (CORE-4982) Server crashes during "select from procedure" if exception is thrown while backing out the current savepoint

2015-10-29 Thread Dimitry Sibiryakov
29.10.2015 11:52, Dmitry Yemanov (JIRA) wrote:
> The bug should be common for all versions, although less visible in v2.x due 
> to bugcheck being raised immediately.

   Do you have testcase?
   I wonder if Avalerion where savepoint backout was completely reworked is 
affected too.

-- 
   WBR, SD.

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [FB-Tracker] Created: (CORE-4982) Server crashes during "select from procedure" if exception is thrown while backing out the current savepoint

2015-10-29 Thread Dmitry Yemanov
29.10.2015 14:00, Dimitry Sibiryakov wrote:

> Do you have testcase?

Yes: /qa/oltp-emul/ ;-)

> I wonder if Avalerion where savepoint backout was completely reworked is 
> affected too.

If it can throw from inside VIO_verb_cleanup(), then it is.


Dmitry



--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel