[Firebird-devel] [FB-Tracker] Created: (CORE-3420) BOOLEAN not present in system table RDB$TYPES

2011-03-30 Thread Kovalenko Dmitry (JIRA)
BOOLEAN not present in system table RDB$TYPES
-

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


Hi

As I understand, new data type BOOLEAN should be present in system table 
RDB$TYPES (RDB$TYPE==23 ?)

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



--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-3421) [FB3] AV with "UPDATE OR INSERT"

2011-03-30 Thread Kovalenko Dmitry (JIRA)
[FB3] AV with "UPDATE OR INSERT"


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


Hi

FB3 build 29220

UPDATE OR INSERT INTO TEST_VARCHAR_TABLE(TEST_ID, VC_512) VALUES(:in_id, 
:in_str) RETURNING TEST_ID, VC_512

TEST_ID - primary key BIGINT
VC_512 - VARCHAR(512)

[Stack  ]

>   
> engine12.dll!Jrd::ParameterNode::setParameterType(Jrd::DsqlCompilerScratch * 
> dsqlScratch=0x062c0500, Jrd::dsql_nod * node=0x062c3108, bool 
> forceVarChar=false)  Строка 7049 + 0x26 байт C++
engine12.dll!PASS1_set_parameter_type(Jrd::DsqlCompilerScratch * 
dsqlScratch=0x062c0500, Jrd::dsql_nod * in_node=0x062c1558, 
Jrd::dsql_nod * node=0x062c3108, bool force_varchar=false)  Строка 4609 
+ 0x23 байтC++
engine12.dll!Jrd::UpdateOrInsertNode::dsqlPass(Jrd::DsqlCompilerScratch 
* dsqlScratch=0x062c0500)  Строка 6821  C++
engine12.dll!PASS1_statement(Jrd::DsqlCompilerScratch * 
dsqlScratch=0x062c0500, Jrd::dsql_nod * input=0x062c1c10)  
Строка 921 + 0x26 байт   C++
engine12.dll!prepareStatement(Jrd::thread_db * tdbb=0x03f9ea50, 
Jrd::dsql_dbb * database=0x061e0040, Jrd::jrd_tra * 
transaction=0x06210438, unsigned long string_length=102, const char * 
string=0x005365d0, unsigned short client_dialect=3, unsigned short 
parser_version=2, bool isInternalRequest=false)  Строка 1950 + 0x15 байт   C++
engine12.dll!prepareRequest(Jrd::thread_db * tdbb=0x03f9ea50, 
Jrd::dsql_dbb * database=0x061e0040, Jrd::jrd_tra * 
transaction=0x06210438, unsigned long stringLength=102, const char * 
string=0x005365d0, unsigned short clientDialect=3, unsigned short 
parserVersion=2, bool isInternalRequest=false)  Строка 1822C++
engine12.dll!DSQL_prepare(Jrd::thread_db * tdbb=0x03f9ea50, 
Jrd::jrd_tra * transaction=0x06210438, Jrd::dsql_req * * 
req_handle=0x03f9e988, unsigned long length=102, const char * 
string=0x005365d0, unsigned short dialect=3, unsigned long 
item_length=26, const unsigned char * items=0x03f9f388, unsigned long 
buffer_length=32768, unsigned char * buffer=0x005716a8, bool 
isInternalRequest=false)  Строка 633 + 0x52 байт   C++
engine12.dll!Jrd::dsql_req::prepare(Firebird::Status * 
user_status=0x03f9ec40, Firebird::ITransaction * 
apiTra=0x06210438, unsigned int stmtLength=102, const char * 
sqlStmt=0x005365d0, unsigned int dialect=32, unsigned int 
item_length=26, const unsigned char * items=0x03f9f388, unsigned int 
buffer_length=32768, unsigned char * buffer=0x005716a8)  Строка 4381 + 
0x86 байтC++

[Local variables --- ]


-   this0x062c1380 {dsqlParameterIndex=1 
dsqlParameter=0x message={...} ...}Jrd::ParameterNode * 
const
+   Jrd::TypedNode   {...}   
Jrd::TypedNode
dsqlParameterIndex  1   unsigned short
+   dsqlParameter   0x {par_message=??? 
par_null=??? par_node=??? ...}  Jrd::dsql_par *
+   message {ptr=0x }   
NestConst
argNumber   0   unsigned short
+   argFlag {ptr=0x }   
NestConst
+   argIndicator{ptr=0x }   
NestConst
+   argInfo {ptr=0x }   NestConst
+   dsqlScratch 0x062c0500 {dbb=0x061e0040 
transaction=0x06210438 statement=0x062c0040 ...} 
Jrd::DsqlCompilerScratch *
+   node0x062c3108 {nod_type=nod_class_exprnode 
nod_desc={...} nod_line=1 ...}  Jrd::dsql_nod *
forceVarCharfalse   bool
+   oldDesc {dsc_dtype='М' dsc_scale='М' dsc_length=52428 ...}  
dsc
+   tdbb0x03f9ea50 {tdbb_default=0x05cdd2b8 
database=0x04e30040 attachment=0x04e60040 ...}  
Jrd::thread_db *
hasOldDesc  truebool


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

   

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. ht

[Firebird-devel] [FB-Tracker] Created: (CORE-3422) Can't write TRUE/FALSE into SMALLINT column

2011-03-30 Thread Kovalenko Dmitry (JIRA)
Can't write TRUE/FALSE into SMALLINT column
---

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


Hi

Interbase 7 can without any problem write the TRUE/FALSE in SMALLINT column

But when I try to execute "insert into test_modify_row(col_smallint) 
values(true)", FB3 [build 29220] returns the error {conversion error from 
string "BOOLEAN".}

I think, FB3 should convert TRUE/FALSE to numeric datatypes without this 
problem.


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



--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-3423) [FB3] Wrong RDB$PARAMETER_MECHANISM

2011-03-31 Thread Kovalenko Dmitry (JIRA)
[FB3] Wrong RDB$PARAMETER_MECHANISM
---

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


Hi


create procedure sp_test(IN_ARG INTEGER)
 returns (OUT_ARG INTEGER)
as
begin
 OUT_ARG=IN_ARG;
end;

select pp.rdb$parameter_name,pp.rdb$parameter_mechanism
from rdb$procedure_parameters pp
where pp.rdb$procedure_name='SP_TEST';


Firebird 2.5.1 returns NULL in rdb$parameter_mechanism column

Firebird 3 [build 29220] returns 1 [fb_prm_mech_type_of] in 
rdb$parameter_mechanism column

I think, FB3 should write to rdb$parameter_mechanism the NULL or 0 
[fb_prm_mech_normal]

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



--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-3569) CHAR(32767) present in XSQLVAR with length 32765

2011-08-05 Thread Kovalenko Dmitry (JIRA)
CHAR(32767) present in XSQLVAR with length 32765


 Key: CORE-3569
 URL: http://tracker.firebirdsql.org/browse/CORE-3569
 Project: Firebird Core
  Issue Type: Bug
  Components: Charsets/Collation, Engine
Affects Versions: 2.1.4, 2.5.0, 2.0.6, 3.0 Initial
Reporter: Kovalenko Dmitry


Hi

CREATE TABLE TBL_LARGE2_CH_32767 (
LARGE_TEXT  CHAR(32767) CHARACTER SET WIN1251
);

IBExpert:
"select * from TBL_LARGE2_CH_32767"

Size of LARGE_TEXT is 32765

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



--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-3936) AV in UTLD_parse_sqlda

2012-09-24 Thread Kovalenko Dmitry (JIRA)
AV in UTLD_parse_sqlda
--

 Key: CORE-3936
 URL: http://tracker.firebirdsql.org/browse/CORE-3936
 Project: Firebird Core
  Issue Type: Bug
  Components: API / Client Library
Affects Versions: 2.1.5, 2.0.7, 2.5.1, 2.1.4, 2.5.0, 2.0.6, 2.1.3, 2.1.2, 
2.0.5, 2.1.1, 2.1.0, 2.5.2, 2.5.3, 2.1.6
Reporter: Kovalenko Dmitry
 Attachments: AV_in_UTLD_parse_sqlda.ZIP

superclassic x64 2.5.3.26540

fbclient.dll [renamed to gds32.dll] version  :2.5.3.26540 [x64]

---
> gds32.dll!UTLD_parse_sqlda(__int64 * status=0x0029b200,
sqlda_sup * const dasup=0x04108958,
unsigned short * blr_length=0x04222300,
unsigned short * msg_type=0x,
unsigned short * msg_length=0x0020,
unsigned short dialect=1,
const XSQLDA * xsqlda=0x04222300,
const unsigned short clause=0)  Строка 627 + 0x6 байт   C++

gds32.dll!isc_dsql_fetch(__int64 * user_status=0x02a7000a,
unsigned int * stmt_handle=0x036cf758,
unsigned short dialect=61088,
const XSQLDA * sqlda=0x000c)  Строка 3151 + 0x2c байт   C++

--- [source from UTLD_parse_sqlda]
// Fill in the return values to the caller.

*blr_length = same_flag ? 0 : blr_len;
*msg_length = msg_len;
*msg_type = 0; // [line 627] <-- AV


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

   

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-3982) Very slow close of statement [execute SP]

2012-11-14 Thread Kovalenko Dmitry (JIRA)
Very slow close of statement [execute SP]
-

 Key: CORE-3982
 URL: http://tracker.firebirdsql.org/browse/CORE-3982
 Project: Firebird Core
  Issue Type: Bug
  Components: API / Client Library, Engine
Affects Versions: 2.5.2
 Environment: Win7 x64, i7-Q2670QM.
Reporter: Kovalenko Dmitry


Server Version  :2.5.3.26543 [Windows, x64, SuperClassic]
Client Version  :2.5.3.26543
Database ODS:11.2
Database Dialect:3

-- [Test stored procedure]
CREATE PROCEDURE SP_PAUSE_FETCH(N INTEGER, PAUSE INTEGER)
 RETURNS (ID INTEGER,DUMMY VARCHAR(32000))
AS
 DECLARE VARIABLE P INTEGER;
 DECLARE VARIABLE S INTEGER;
BEGIN
 ID=0;

 DUMMY='';
 P=0;
 WHILE(P<32000)DO
 BEGIN
  DUMMY=DUMMY||'A';
  P=P+1;
 END

 S=0;
 WHILE(S=0)DO
 BEGIN
  P=0;
  WHILE(Phttp://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-3984) [Attempt to reopen an open cursor] in "Execute->Fetch->Cancel->Close->Execute->Fetch->Error"

2012-11-16 Thread Kovalenko Dmitry (JIRA)
[Attempt to reopen an open cursor] in 
"Execute->Fetch->Cancel->Close->Execute->Fetch->Error"


 Key: CORE-3984
 URL: http://tracker.firebirdsql.org/browse/CORE-3984
 Project: Firebird Core
  Issue Type: Bug
  Components: API / Client Library, Engine
Affects Versions: 2.5.2
 Environment: Win7, x64.
Reporter: Kovalenko Dmitry


Server Version  :2.5.3.26543 [Windows, SuperClassic, 64bit]
Client Version  :2.5.3.26543 [Windows, 32bit]
Database ODS:11.2
Database Dialect:3

Connection through "localhost".

Work from 32bit application.

---
Common scenario:
1. thread1: execute statement "select ID,DUMMY from 
SP_PAUSE_FETCH(1000,1000)"
2. thread2: fetch one row
3. thread1: cancel fetch (and wait the finish of cancelation)
4. thread1: close cursor
5. thread1: execute statment again
6. thread2: fetch one row -> ERROR "Attempt to reopen an open cursor"

---
Sequence of ISC API calls:
11:[Thr 10032][16.11.2012 12:51:57]ISC_API_IN [#01]: 
isc_dsql_allocate_statement(...,db_handle=&0002,stmt_handle=&)
12:[Thr 10032][16.11.2012 12:51:57]ISC_API_OUT[#01]: 
isc_dsql_allocate_statement(...,db_handle=&0002,stmt_handle=&0004) 
return OK.
13:[Thr 10032][16.11.2012 12:51:57]ISC_API_IN [#02]: 
isc_dsql_prepare(...,tr_handle=&0003,stmt_handle=&0004,...)
[stmt_text len:50]
select ID,DUMMY from SP_PAUSE_FETCH(1000,1000)
[/stmt_text]
14:[Thr 10032][16.11.2012 12:51:57]ISC_API_OUT[#02]: 
isc_dsql_prepare(...,tr_handle=&0003,stmt_handle=&0004,...) return OK.
15:[Thr 10032][16.11.2012 12:51:57]ISC_API_IN [#03]: 
isc_dsql_execute2(...,tr_handle=&0003,stmt_handle=&0004,...)
16:[Thr 10032][16.11.2012 12:51:57]ISC_API_OUT[#03]: 
isc_dsql_execute2(...,tr_handle=&0003,stmt_handle=&0004,...) return OK.
17:[Thr 2284][16.11.2012 12:51:57]ISC_API_IN [#04]: 
isc_dsql_fetch(...,stmt_handle=&0004,...)
18:[Thr 10032][16.11.2012 12:51:57]ISC_API_IN [#05]: 
fb_cancel_operation(,db_handle=&0002,option=3)
19:[Thr 10032][16.11.2012 12:51:57]ISC_API_OUT[#05]: 
fb_cancel_operation(,db_handle=&0002,option=3) return OK.
20:[Thr 10032][16.11.2012 12:51:57]ISC_API_IN [#06]: 
fb_cancel_operation(,db_handle=&0002,option=3)
21:[Thr 10032][16.11.2012 12:51:57]ISC_API_OUT[#06]: 
fb_cancel_operation(,db_handle=&0002,option=3) return OK.
22:[Thr 2284][16.11.2012 12:51:57]ISC_API_OUT[#04]: 
isc_dsql_fetch(...,stmt_handle=&0004,...) return ERROR [335544794]
operation was cancelled
23:[Thr 10032][16.11.2012 12:51:57]ISC_API_IN [#07]: 
isc_dsql_free_statement(...,stmt_handle=&0004,1)
24:[Thr 10032][16.11.2012 12:51:57]ISC_API_OUT[#07]: 
isc_dsql_free_statement(...,stmt_handle=&0004,1) return OK.
25:[Thr 10032][16.11.2012 12:51:57]ISC_API_IN [#08]: 
isc_dsql_execute2(...,tr_handle=&0003,stmt_handle=&0004,...)
26:[Thr 10032][16.11.2012 12:51:57]ISC_API_OUT[#08]: 
isc_dsql_execute2(...,tr_handle=&0003,stmt_handle=&0004,...) return OK.
27:[Thr 2284][16.11.2012 12:51:57]ISC_API_IN [#09]: 
isc_dsql_fetch(...,stmt_handle=&0004,...)
28:[Thr 2284][16.11.2012 12:51:57]ISC_API_OUT[#09]: 
isc_dsql_fetch(...,stmt_handle=&0004,...) return ERROR [335544569]
Dynamic SQL Error
SQL error code = -502
Attempt to reopen an open cursor
29:[Thr 10032][16.11.2012 12:51:57]ISC_API_IN [#10]: 
isc_dsql_free_statement(...,stmt_handle=&0004,1)
30:[Thr 10032][16.11.2012 12:51:57]ISC_API_OUT[#10]: 
isc_dsql_free_statement(...,stmt_handle=&0004,1) return OK.
31:[Thr 10032][16.11.2012 12:51:57]ISC_API_IN [#11]: 
isc_dsql_free_statement(...,stmt_handle=&0004,2)
32:[Thr 10032][16.11.2012 12:51:57]ISC_API_OUT[#11]: 
isc_dsql_free_statement(...,stmt_handle=&,2) return OK.

-
In line 23-24 I close my open cursor
In line 25-26 I re-execute statement

Why in line 28 (operation #09) I obtain the error "Attempt to reopen an 
open cursor" ?

-- [Test stored procedure] 
CREATE PROCEDURE SP_PAUSE_FETCH(N INTEGER, PAUSE INTEGER) 
 RETURNS (ID INTEGER,DUMMY VARCHAR(32000)) 
AS 
 DECLARE VARIABLE P INTEGER; 
 DECLARE VARIABLE S INTEGER; 
BEGIN 
 ID=0; 

 DUMMY=''; 
 P=0; 
 WHILE(P<32000)DO 
 BEGIN 
  DUMMY=DUMMY||'A'; 
  P=P+1; 
 END 

 S=0; 
 WHILE(S=0)DO 
 BEGIN 
  P=0; 
  WHILE(Phttp://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, d

[Firebird-devel] [FB-Tracker] Created: (CORE-4059) [FB3][AV] Crash when create an UDF with "RETURNS PARAMETER pos_number"

2013-03-06 Thread Kovalenko Dmitry (JIRA)
[FB3][AV] Crash when create an UDF with "RETURNS PARAMETER pos_number"
--

 Key: CORE-4059
 URL: http://tracker.firebirdsql.org/browse/CORE-4059
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine, UDF
Affects Versions: 3.0 Initial
Reporter: Kovalenko Dmitry


FB 3.0.0.30247

SQL: DECLARE EXTERNAL FUNCTION UDF_DUMMY2_RPN_1 smallint, integer, float, 
double precision RETURNS PARAMETER 1 ENTRY_POINT 'IB_UDF_abs' MODULE_NAME 
'ib_udf';

Stack:
engine12.dll!NestConst::operator Jrd::dsql_fld *()  
Строка 48 + 0x11 байтC++
>   
> engine12.dll!Jrd::CreateAlterFunctionNode::dsqlPass(Jrd::DsqlCompilerScratch 
> * dsqlScratch=0x020c0074)  Строка 11209 + 0x15 байтC++

engine12.dll!Jrd::Node::doDsqlPass(Jrd::DsqlCompilerScratch * 
dsqlScratch=0x020c0074, NestConst & node={...})  Строка 133 + 
0x1e байт   C++
engine12.dll!Jrd::DsqlDdlRequest::dsqlPass(Jrd::thread_db * 
tdbb=0x0145effc, Jrd::DsqlCompilerScratch * scratch=0x020c0074, ntrace_result_t 
* traceResult=0x0145eb04)  Строка 878 + 0x13 байт   C++
engine12.dll!prepareStatement(Jrd::thread_db * tdbb=0x0145effc, 
Jrd::dsql_dbb * database=0x02060020, Jrd::jrd_tra * transaction=0x01ff02c8, 
unsigned long textLength=151, const char * text=0x0227b9a0, unsigned short 
clientDialect=1, unsigned short parserVersion=2, bool isInternalRequest=false)  
Строка 1450 + 0x1d байт  C++
engine12.dll!prepareRequest(Jrd::thread_db * tdbb=0x0145effc, 
Jrd::dsql_dbb * database=0x02060020, Jrd::jrd_tra * transaction=0x01ff02c8, 
unsigned long textLength=151, const char * text=0x0227b9a0, unsigned short 
clientDialect=1, unsigned short parserVersion=2, bool isInternalRequest=false)  
Строка 1322 + 0x28 байтC++
engine12.dll!DSQL_prepare(Jrd::thread_db * tdbb=0x0145effc, 
Jrd::Attachment * attachment=0x02080020, Jrd::jrd_tra * transaction=0x01ff02c8, 
unsigned long length=151, const char * string=0x0227b9a0, unsigned short 
dialect=1, Firebird::Array 
> * items=0x0145ef8c, Firebird::Array > * buffer=0x0145ef74, bool 
isInternalRequest=false)  Строка 373 + 0x28 байт  C++
engine12.dll!Jrd::JAttachment::prepare(Firebird::IStatus * 
user_status=0x0145f2a4, Firebird::ITransaction * apiTra=0x00c2ce34, unsigned 
int stmtLength=151, const char * sqlStmt=0x0227b9a0, unsigned int dialect=12, 
unsigned int flags=71)  Строка 4512 + 0x56 байт   C++
fbclient.dll!Why::YAttachment::prepare(Firebird::IStatus * 
status=0x0145f2a4, Firebird::ITransaction * transaction=0x00804f50, unsigned 
int stmtLength=151, const char * sqlStmt=0x0227b9a0, unsigned int dialect=12, 
unsigned int flags=71)  Строка 4480 + 0x44 байт   C++
firebird.exe!rem_port::prepare_statement(p_sqlst * prepareL=0x00832e68, 
packet * sendL=0x00832970)  Строка 3876 + 0x5c байт C++
firebird.exe!process_packet(rem_port * port=0x00832308, packet * 
sendL=0x00832970, packet * receive=0x00832c64, rem_port * * result=0x0145fea0)  
Строка 4179C++
firebird.exe!loopThread(void * __formal=0x003a)  Строка 5675 + 0x4f 
байтC++
firebird.exe!`anonymous namespace'::ThreadArgs::run()  Строка 73 + 0x1f 
байтC++
firebird.exe!threadStart(void * arg=0x0083157c)  Строка 89  C++

Local variable
-   this0x020c0810 {name={...} create=true alter=false ...} 
Jrd::CreateAlterFunctionNode * const
+   Jrd::DdlNode{...}   Jrd::DdlNode
+   name{data=0x020c0820 "UDF_DUMMY2_RPN_1" count=16 }  
Firebird::MetaName
create  truebool
alter   false   bool
+   external{ptr=0x020c1448 }   
NestConst
deterministic   false   bool
-   parameters  {count=4 capacity=4 data=0x020c0e64 }   
Firebird::Array,Firebird::EmptyStorage
 > >
+   Firebird::EmptyStorage >
{...}   Firebird::EmptyStorage >
count   4   unsigned int
capacity4   unsigned int
+   data0x020c0e64 {ptr=0x020c0a78 }
NestConst *
+   returnType  {ptr=0x }   
NestConst
+   localDeclList   {ptr=0x }   
NestConst
+   source  {...}   Firebird::StringBase
+   body{ptr=0x }   NestConst
compiledfalse   bool
invalid false   bool
+   package {data=0x020c08a4 "" count=0 }   Firebird::MetaName
+   packageOwner{...}   
Firebird::StringBase
privateScopefalse   bool
udfReturnPos1   long


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

[Firebird-devel] [FB-Tracker] Created: (CORE-4067) Problem with "CREATE DATABASE ... COLLATION ..." and 1 dialect

2013-03-19 Thread Kovalenko Dmitry (JIRA)
Problem with "CREATE DATABASE ... COLLATION ..." and 1 dialect
--

 Key: CORE-4067
 URL: http://tracker.firebirdsql.org/browse/CORE-4067
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine, ISQL
Affects Versions: 3.0 Initial
Reporter: Kovalenko Dmitry


Firebird 3.0.0.30278

c:\Program Files (x86)\Firebird_3_0>isql.exe
Use CONNECT or CREATE DATABASE to specify a database
SQL> SET SQL DIALECT 1;
SQL> CREATE DATABASE 'vxp-fb30:e:\database\test2.gdb' USER 'gamer' PASSWORD 
'vermut' PAGE_SIZE 4096 DEFAULT CHARACTER SET win1251 COLLATION win1251;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-ALTER DATABASE failed
-Dynamic SQL Error
-SQL error code = -817
-Metadata update statement is not allowed by the current database SQL dialect 1

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



--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4237) FB3 vs FB2.5. Different metadata for UDF return argument

2013-09-23 Thread Kovalenko Dmitry (JIRA)
FB3 vs FB2.5. Different metadata for UDF return argument


 Key: CORE-4237
 URL: http://tracker.firebirdsql.org/browse/CORE-4237
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine, UDF
Affects Versions: 3.0 Alpha 1
 Environment: WI-T3.0.0.30653 Firebird 3.0 Alpha 1
Reporter: Kovalenko Dmitry


[TEST UDF]
DECLARE EXTERNAL FUNCTION UDF_TEST2 RETURNS BLOB ENTRY_POINT 'IB_UDF_abs' 
MODULE_NAME 'ib_udf';

+++
[FB2.5]
ISQL> show function UDF_TEST2;

Function UDF_TEST2:
Function library is ib_udf
Entry point is IB_UDF_abs
Returns  BLOB

---
select * from rdb$functions x where x.rdb$function_name='UDF_TEST2'
RDB$FUNCTION_NAME: UDF_TEST2
RDB$FUNCTION_TYPE: 
RDB$QUERY_NAME: 
RDB$DESCRIPTION: 
RDB$MODULE_NAME: ib_udf
RDB$ENTRYPOINT: IB_UDF_abs
RDB$RETURN_ARGUMENT: 1
RDB$SYSTEM_FLAG: 0
---
select * from rdb$function_arguments x where x.rdb$function_name='UDF_TEST2'
RDB$FUNCTION_NAME: UDF_TEST2
RDB$ARGUMENT_POSITION: 1
RDB$MECHANISM: 3
RDB$FIELD_TYPE: 261
RDB$FIELD_SCALE: 0
RDB$FIELD_LENGTH: 8
RDB$FIELD_SUB_TYPE: 0
RDB$CHARACTER_SET_ID: 
RDB$FIELD_PRECISION: 
RDB$CHARACTER_LENGTH: 

+++
[FB3]
ISQL> show FUNCTION UDF_TEST2;

Function UDF_TEST2:
Function library is ib_udf
Entry point is IB_UDF_abs
Argument 0: BLOB

---
select * from rdb$functions x where x.rdb$function_name='UDF_TEST2'
RDB$FUNCTION_NAME: UDF_TEST2
RDB$FUNCTION_TYPE: 
RDB$QUERY_NAME: 
RDB$DESCRIPTION: 
RDB$MODULE_NAME: ib_udf
RDB$ENTRYPOINT: IB_UDF_abs
RDB$RETURN_ARGUMENT: 1
RDB$SYSTEM_FLAG: 0
RDB$ENGINE_NAME: 
RDB$PACKAGE_NAME: 
RDB$PRIVATE_FLAG: 
RDB$FUNCTION_SOURCE: 
RDB$FUNCTION_ID: 2749
RDB$FUNCTION_BLR: 
RDB$VALID_BLR: 1
RDB$DEBUG_INFO: 
RDB$SECURITY_CLASS: SQL$11302
RDB$OWNER_NAME: GAMER
RDB$LEGACY_FLAG: 1
RDB$DETERMINISTIC_FLAG: 0
---
select * from rdb$function_arguments x where x.rdb$function_name='UDF_TEST2'
RDB$FUNCTION_NAME: UDF_TEST2
RDB$ARGUMENT_POSITION: 0 //<-- !!!
RDB$MECHANISM: 3
RDB$FIELD_TYPE: 261
RDB$FIELD_SCALE: 0
RDB$FIELD_LENGTH: 0 //<-- !!!
RDB$FIELD_SUB_TYPE: 0
RDB$CHARACTER_SET_ID: 
RDB$FIELD_PRECISION: 
RDB$CHARACTER_LENGTH: 
RDB$PACKAGE_NAME: 
RDB$ARGUMENT_NAME: 
RDB$FIELD_SOURCE: 
RDB$DEFAULT_VALUE: 
RDB$DEFAULT_SOURCE: 
RDB$COLLATION_ID: 
RDB$NULL_FLAG: 
RDB$ARGUMENT_MECHANISM: 0
RDB$FIELD_NAME: 
RDB$RELATION_NAME: 
RDB$SYSTEM_FLAG: 0
RDB$DESCRIPTION: 

+++
It seems that FB3 works incorrectly.


-- 
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/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4239) AV. Problem in MET_procedure

2013-09-27 Thread Kovalenko Dmitry (JIRA)
AV. Problem in MET_procedure


 Key: CORE-4239
 URL: http://tracker.firebirdsql.org/browse/CORE-4239
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 2.5.3
 Environment: Vista x64. Q6600, 8GB. IBProvider Test System.

Reporter: Kovalenko Dmitry


I executed my old tests (in four threads) and get the (think, reproducible) AV 
in Firebird's engine:

Необработанное исключение в "0x000140256da2" в "fb_inet_server.exe": 
0xC005: Нарушение прав доступа при записи "0x".

--
[27.09.2013 08:54:24] [ExecuteTests] CommandLine:

target\ibp_oledb_test_vc10_x64_Release.exe  /thread_count 4 /log_dir ..\_log 
/log_file_prefix w64_local_d3 /cn_str 
"provider=LCPI.IBProvider.3;location=d:\database\ibp_test_fb25_d3.gdb;user 
id=gamer;password=vermut;ctype=win1251;icu_library=icuuc30.dll" /test schema*

[27.09.2013 08:54:24] [ExecuteTests] Test Mask  : [schema*]

[27.09.2013 08:54:24] [info] Provider DLL:_IBProvider_v3_vc10_w64_i.dll
[27.09.2013 08:54:24] [info] Provider Version:3.16.4.15390
[27.09.2013 08:54:24] [info] Server Name :Firebird x64 [SuperClassic]. 
Release build [VS2010]
[27.09.2013 08:54:24] [info] Server Version  :2.5.3.26640
[27.09.2013 08:54:24] [info] Client Name :Firebird SQL Server
[27.09.2013 08:54:24] [info] Client Version  :2.5.3.26640
[27.09.2013 08:54:24] [info] Database ODS:11.2
[27.09.2013 08:54:24] [info] Database Dialect:3

 [problem FB-thread stack]

[SRC]
Parameter* parameter = *ptr;
// check for parameter to be null, this can only happen if the
// parameter numbers get out of sync. This was added to fix bug
// 10534. -Shaunak Mistry 12-May-99
if (parameter)
{
*desc = parameter->prm_desc; //< HERE
length = MET_align(dbb, &(*desc), length);
desc->dsc_address = (UCHAR *) (IPTR) length;
length += desc->dsc_length;
}

[ASM]
if (parameter)
000140256D99  testrcx,rcx  
000140256D9C  je  000140256DF1  
{
*desc = parameter->prm_desc;
000140256D9E  mov rax,qword ptr [rcx+8]  
000140256DA2  mov qword ptr [r8],rax  //< HERE

[STACK]
>   fb_inet_server.exe!MET_procedure(Jrd::thread_db * 
> tdbb=0x305f504d545f5053, int id=67718520, bool noscan=true, unsigned short 
> flags=61472)  Строка 5067 + 0x4 байт   C++
fb_inet_server.exe!MET_lookup_procedure(Jrd::thread_db * 
tdbb=0x053af020, const Firebird::MetaName & name={...}, bool 
noscan=false)  Строка 3979 + 0x14 байтC++
fb_inet_server.exe!create_procedure(Jrd::thread_db * 
tdbb=0x0c99b608, short phase=-27224, Jrd::DeferredWork * 
work=0x0f2f3368, Jrd::jrd_tra * transaction=0x0001)  Строка 
3468  C++
fb_inet_server.exe!DFW_perform_work(Jrd::thread_db * 
tdbb=0x0c99b608, Jrd::jrd_tra * transaction=0x)  Строка 
1174 + 0x11 байт   C++
fb_inet_server.exe!TRA_commit(Jrd::thread_db * tdbb=0x0f2f3368, 
Jrd::jrd_tra * transaction=0x, const bool retaining_flag=true)  
Строка 444  C++
fb_inet_server.exe!commit(Jrd::thread_db * tdbb=0x053af270, 
Jrd::jrd_tra * transaction=0x053af9b0, const bool retaining_flag=true)  
Строка 4539 + 0xf байт  C++
fb_inet_server.exe!jrd8_commit_transaction(__int64 * 
user_status=0x0eed4720, Jrd::jrd_tra * * tra_handle=0x0efc0198) 
 Строка 1744 + 0x13 байт   C++
fb_inet_server.exe!isc_commit_transaction(__int64 * 
user_status=0x0eed4720, unsigned int * tra_handle=0x07178910)  
Строка 1749 + 0x34 байт  C++
fb_inet_server.exe!rem_port::end_transaction(P_OP operation=118982928, 
p_rlse * release=0x07178910, packet * sendL=0x07178910)  Строка 
2086 C++
fb_inet_server.exe!process_packet(rem_port * port=0x00db0020, 
packet * sendL=0x07178910, packet * receive=0x00dba7a8, 
rem_port * * result=0x0038)  Строка 3419  C++
fb_inet_server.exe!SRVR_main(rem_port * main_port=0x043a6f00, 
unsigned short flags=0)  Строка 402 + 0x1a байт   C++
fb_inet_server.exe!process_connection_thread(void * 
arg=0x043a6f10)  Строка 348 + 0x14 байт C++
fb_inet_server.exe!`anonymous namespace'::threadStart(void * 
arg=0x)  Строка 139 + 0x5 байт C++

 [problem FB-thread local vars]
+   tdbb0x305f504d545f5053 {tdbb_default=??? database=??? 
attachment=??? ...}   Jrd::thread_db *
id  67718520int
noscan  truebool
flags   61472   unsigned sho

[Firebird-devel] [FB-Tracker] Created: (CORE-4699) Incorrect processing of DSQL_drop?

2015-02-25 Thread Kovalenko Dmitry (JIRA)
Incorrect processing of DSQL_drop?
--

 Key: CORE-4699
 URL: http://tracker.firebirdsql.org/browse/CORE-4699
 Project: Firebird Core
  Issue Type: Bug
  Components: API / Client Library
Affects Versions: 2.5.4
Reporter: Kovalenko Dmitry
Priority: Minor


As I understand, DSQL_drop constant presents the FLAG of operation, not ID of 
operation.

However, in some cases, instead of checking the flag DSQL_drop, used a direct 
comparison with DSQL_drop

[GDS_DSQL_FREE] [why.cpp]

if (option & DSQL_drop) // <- OK
{
destroy(statement);
*stmt_handle = 0;
}

[GDS_DSQL_FREE] [interface.cpp]

if (option == DSQL_drop) // <- ???
{
release_sql_request(statement);
*stmt_handle = NULL;
}

if (option == DSQL_drop) // <- ???
*stmt_handle = NULL;

[Stack]
fbclient_d.dll!REM_free_statement(int * user_status=0x0249e470, Rsr * * 
stmt_handle=0x00612e2c, unsigned short option=2) Line 1960  C++
>   fbclient_d.dll!isc_dsql_free_statement(int * user_status=0x0249e470, 
> void * * stmt_handle=0x042db448, unsigned short option=2) Line 3348C++

_IBProvider_v3_vs2013_d.dll!IBP_ISC_API__dsql_free_statement(isc_base::t_isc_provider
 * isc_provider=0x040ceed8, isc_base::t_isc_connection * 
isc_connection=0x040cf3c0, isc_base::t_isc_status_vector & 
arg1__status_vector={...}, void * * arg2__stmt_handle_ptr=0x042db448, unsigned 
short arg3__op_id=2) Line 209   C++


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



--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4700) Mistake in GDS_DROP_DATABASE?

2015-02-25 Thread Kovalenko Dmitry (JIRA)
Mistake in GDS_DROP_DATABASE?
-

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


jrd.cpp, GDS_DROP_DATABASE

for (; shadow; shadow = shadow->sdw_next)
{
 err = err || drop_files(shadow->sdw_file); //< mistake?
}

I think, this code should be written like this:

for (; shadow; shadow = shadow->sdw_next)
{
 if ( drop_files(shadow->sdw_file) )
  err=true;
}

?



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



--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4785) Bad packet of op_execute kills the server

2015-05-08 Thread Kovalenko Dmitry (JIRA)
Bad packet of op_execute kills the server
-

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


0. Connection through TCP/IP (INET)

1. Query: insert into NUM (N_1_0) values (?)

2. input XSQLDA contains one LONG-variable (isc_sql_long). Build code:

 XSQLDA_V1_Wrapper xsqlda(1);

 xsqlda->sqld=1;

 unsigned __int32 xparam0_value=5;
 shortxparam0_ind=0;

 xsqlda->sqlvar[0].sqltype=isc_api::ibp_isc_sql_long|1;
 xsqlda->sqlvar[0].sqllen =sizeof(xparam0_value);
 xsqlda->sqlvar[0].sqldata=reinterpret_cast(&xparam0_value);
 xsqlda->sqlvar[0].sqlind =&xparam0_ind;

3. network packet ( op_execute )

P_OP_SQLDATA
  p_sqldata_statement   2   unsigned short
  p_sqldata_transaction 1   unsigned short
  p_sqldata_blr {cstr_length=12 cstr_address=0x00424240 "\x5\x2\x4" }   
ibp::db_client::fb::protocol::P_CSTRING_CONST
cstr_length 12
cstr_address = 05 02 04 00 02 00 08 00 07 00 ff 4c
  p_sqldata_message_number  0   unsigned short
  p_sqldata_messages0   unsigned short
  p_sqldata_out_blr {cstr_length=0 cstr_address=0x  } 
ibp::db_client::fb::protocol::P_CSTRING_CONST
  p_sqldata_out_message_number  0   unsigned short
  p_sqldata_status  0   unsigned long

4. Server crash stack:

>   fb_inet_server.exe!map_in_out(Jrd::dsql_req * request, Jrd::dsql_msg * 
> message, unsigned short blr_length, const unsigned char * blr, unsigned short 
> msg_length, unsigned char * dsql_msg_buf, const unsigned char * 
> in_dsql_msg_buf) Line 2216 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 1267   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 4049   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 2327  C++
fb_inet_server.exe!process_packet(rem_port * port, packet * sendL, 
packet * receive, rem_port * * result) Line 3530 C++
fb_inet_server.exe!loopThread(void * __formal) Line 5261C++


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



--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
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


[Firebird-devel] [FB-Tracker] Created: (CORE-4988) [lazy_send mode] problem with alloc_stmt+prepare_stmt operation

2015-11-03 Thread Kovalenko Dmitry (JIRA)
[lazy_send mode] problem with alloc_stmt+prepare_stmt operation
---

 Key: CORE-4988
 URL: http://tracker.firebirdsql.org/browse/CORE-4988
 Project: Firebird Core
  Issue Type: Bug
  Components: API / Client Library
Affects Versions: 2.5.4, 2.5.5
Reporter: Kovalenko Dmitry


In lazy_send mode, when the statement prepares the first own SQL, fbclient.dll 
sends two packet: op_allocate_statement and op_prepare_statement

If first operation [op_allocate_statement] is failed, fbclient.dll not receives 
the answer for second operation [op_prepare_statement].

--- [interface.cpp, GDS_DSQL_PREPARE]

// Set up for the response packet.

if (statement->rsr_flags.test(Rsr::LAZY))
{
if (!receive_response(rdb, packet))
return user_status[1]; // <--- WRONG EXIT !!!

statement->rsr_id = packet->p_resp.p_resp_object;
SET_OBJECT(rdb, statement, statement->rsr_id);

statement->rsr_flags.clear(Rsr::LAZY);
}

---[/interface.cpp]

At result, fbclient.dll starts to works incorrectly.

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


[Firebird-devel] [FB-Tracker] Created: (CORE-5074) Lost the charset ID in selection of array element

2016-01-13 Thread Kovalenko Dmitry (JIRA)
Lost the charset ID in selection of  array element
--

 Key: CORE-5074
 URL: http://tracker.firebirdsql.org/browse/CORE-5074
 Project: Firebird Core
  Issue Type: Bug
  Components: API / Client Library, Engine
Affects Versions: 2.5.5
Reporter: Kovalenko Dmitry


1. CREATE TABLE TEST_TBL
(
 ARRAY_COLUMN CHAR(10)[0:100] CHARACTER SET OCTETS
)

2. Prepare SQL: "select ARRAY_COLUMN[0] from TEST_TBL"

3. PROBLEM: XSQLVAR::sqlsubtype contains 0 (ZERO). Expected value: 1 (ID of 
OCTETS charset).

-
I think, the problem in MAKE_field (dsql/make.cpp).

Example of correction:
https://github.com/dmitry-lipetsk/firebird/commit/cc541b78d65a2ec578768819cb3c17d37b0f474e


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



--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5139) mistake in comment "can't ise MutexLockGuard here"

2016-03-08 Thread Kovalenko Dmitry (JIRA)
mistake in comment "can't ise MutexLockGuard here"
--

 Key: CORE-5139
 URL: http://tracker.firebirdsql.org/browse/CORE-5139
 Project: Firebird Core
  Issue Type: Bug
Affects Versions: 3.0 RC2, 2.5.5
Reporter: Kovalenko Dmitry
Priority: Trivial


server.cpp, line 5816

"can't use MutexLockGuard here" 

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



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5152) Problem with cancelation of fetch operation

2016-03-19 Thread Kovalenko Dmitry (JIRA)
Problem with cancelation of fetch operation
---

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


Cancelation of operation works when "op_cancel" processed in 
"SRVR_multi_thread" function

And does not work, when "op_cancel" processed in "loopThread" function.

-
I played with stored procedure from CORE-3982

1. Execute "select ID,DUMMY from SP_PAUSE_FETCH(1000,1000)"

2. Try to cancel after receive a first BLOCK of records.

-
>From my point of view, the problem in structure of data packets. It does not 
>allow a separate (parallel) loading (in SRVR_multi_thread) and executing (in 
>loopThread) of operations.

Each packet should contain a own size.

It will allow with minimal efforts detect the "op_cancel" operation in stream 
of data packets at "SRVR_multi_thread" level.


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



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5195) Improve a Firebird compilation scripts (bat files)

2016-04-13 Thread Kovalenko Dmitry (JIRA)
Improve a Firebird compilation scripts (bat files)
--

 Key: CORE-5195
 URL: http://tracker.firebirdsql.org/browse/CORE-5195
 Project: Firebird Core
  Issue Type: Improvement
  Components: Build Issues / Porting
Affects Versions: 3.0.0
Reporter: Kovalenko Dmitry


I offer to correct the "build" process for simplified a cleanup and creation 
different sets of binaries.

At first time - for Windows environment.

1. Names of intermediate (temp, generated, output) directories should countains 
the , , 

For example:

\msvc14xp_Win32_Debug
\msvc14xp_Win32_Release
\msvc14xp_x64_Debug
\msvc14xp_x64_Release

2. Directories "output_Win32" and "output_x64" can contains the last compiled 
binaries (copies from output directory)

3. All log files must be created in "temp\\log".

Not in "builds\win32"

4. Allow the explicit definition of version Visual Studio (msvc10, msvc11, 
msvc12, msvc14 ). By default, bat-files can use last known/supported 
version.

--
Example of implementation:

https://github.com/dmitry-lipetsk/firebirdsql-core/blob/B2_5_Release/builds/win32/build_fb_all.bat

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



--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5350) Assert in CachedMasterInterface::set

2016-09-17 Thread Kovalenko Dmitry (JIRA)
Assert in CachedMasterInterface::set


 Key: CORE-5350
 URL: http://tracker.firebirdsql.org/browse/CORE-5350
 Project: Firebird Core
  Issue Type: Bug
Affects Versions: 3.0.0, 3.0.1
 Environment: Windows 7 x64
Reporter: Kovalenko Dmitry


1. Start server [debug build, x64]
2. Connect to database
3. Disconnect from database
4. Wait some time (1-2 minutes)
5. Connect to database again

void CachedMasterInterface::set(IMaster* master)
{
fb_assert(master); // <-- line with problem
fb_assert(!cached);
cached = master;
}

Stack of crash:
engine12.dll!fb_assert_impl(const char * msg, const char * file, int 
line, bool do_abort) Line 40   C++
>   engine12.dll!Firebird::CachedMasterInterface::set(Firebird::IMaster * 
> master) Line 56   C++
engine12.dll!firebird_plugin(Firebird::IMaster * master) Line 428   
C++
fbclient.dll!`anonymous namespace'::PluginSet::loadModule(const 
`anonymous-namespace'::PluginLoadInfo & info) Line 1091 C++
fbclient.dll!`anonymous 
namespace'::PluginSet::next(Firebird::CheckStatusWrapper * status) Line 1013
C++
fbclient.dll!`anonymous namespace'::PluginSet::PluginSet(const unsigned 
int pinterfaceType, const char * const pnamesList, Firebird::IFirebirdConf * 
const fbConf) Line 928 C++

fbclient.dll!Firebird::PluginManager::getPlugins(Firebird::CheckStatusWrapper * 
status, unsigned int interfaceType, const char * namesList, 
Firebird::IFirebirdConf * firebirdConf) Line 1250   C++

fbclient.dll!Firebird::IPluginManagerBaseImpl
 > >::cloopgetPluginsDispatcher(Firebird::IPluginManager * self, 
Firebird::IStatus * status, unsigned int pluginType, const char * namesList, 
Firebird::IFirebirdConf * firebirdConf) Line 6464 C++

fbclient.dll!Firebird::IPluginManager::getPlugins(Firebird::CheckStatusWrapper
 * status, unsigned int pluginType, const char * namesList, 
Firebird::IFirebirdConf * firebirdConf) Line 810C++

fbclient.dll!Firebird::GetPlugins::GetPlugins(const
 unsigned int interfaceType, Config * const knownConfig, const char * 
namesList) Line 136  C++

fbclient.dll!Why::Dispatcher::attachOrCreateDatabase(Firebird::CheckStatusWrapper
 * status, bool createFlag, const char * filename, unsigned int dpbLength, 
const unsigned char * dpb) Line 5705C++

fbclient.dll!Why::Dispatcher::attachDatabase(Firebird::CheckStatusWrapper * 
status, const char * filename, unsigned int dpbLength, const unsigned char * 
dpb) Line 5625 C++

fbclient.dll!Firebird::IProviderBaseImpl
 > > > > > >::cloopattachDatabaseDispatcher(Firebird::IProvider * self, 
Firebird::IStatus * status, const char * fileName, unsigned int dpbLength, 
const unsigned char * dpb) Line 8995   C++

firebird.exe!Firebird::IProvider::attachDatabase(Firebird::CheckStatusWrapper
 * status, const char * fileName, unsigned int dpbLength, const unsigned char * 
dpb) Line 2026   C++
firebird.exe!Auth::SrpServer::authenticate(Firebird::CheckStatusWrapper 
* status, Firebird::IServerBlock * sb, Firebird::IWriter * writerInterface) 
Line 138C++

firebird.exe!Firebird::IServerBaseImpl
 > > > > > > > >::cloopauthenticateDispatcher(Firebird::IServer * self, 
Firebird::IStatus * status, Firebird::IServerBlock * sBlock, Firebird::IWriter 
* writerInterface) Line 9753C++

firebird.exe!Firebird::IServer::authenticate(Firebird::CheckStatusWrapper
 * status, Firebird::IServerBlock * sBlock, Firebird::IWriter * 
writerInterface) Line 2359   C++
firebird.exe!`anonymous namespace'::ServerAuth::authenticate(packet * 
send, ServerAuthBase::AuthenticateFlags flags) Line 434   C++
firebird.exe!accept_connection(rem_port * port, p_cnct * connect, 
packet * send) Line 1785  C++
firebird.exe!process_packet(rem_port * port, packet * sendL, packet * 
receive, rem_port * * result) Line 4193   C++
firebird.exe!loopThread(void * __formal) Line 5836  C++
firebird.exe!`anonymous namespace'::ThreadArgs::run() Line 78   C++
firebird.exe!threadStart(void * arg) Line 94C++


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


[Firebird-devel] [FB-Tracker] Created: (CORE-5358) FB3 [P13]: No error in sequence "Prepare (select) -> Execute -> Prepare"

2016-09-24 Thread Kovalenko Dmitry (JIRA)
FB3 [P13]: No error in sequence "Prepare (select) -> Execute -> Prepare"


 Key: CORE-5358
 URL: http://tracker.firebirdsql.org/browse/CORE-5358
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0.1
 Environment: Windows x64
Reporter: Kovalenko Dmitry


Scenario of test:
0. Allocate statement
1. Prepare statement "select from DUAL"
2. Execute statement
3. Prepare (again) statement "select from DUAL" // <--- here we wait the error.

Protocol type: batch_send

- RESULTS
Firebird 3.0.1.32608 [P13]:

- NO ERROR

Firebird 2.5 [P12]:

Dynamic SQL Error
SQL error code = -519
The prepare statement identifies a prepare statement with an open cursor


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


[Firebird-devel] [FB-Tracker] Created: (CORE-5382) Incorrect processing (truncation) of SQL statement with length 10MB+1

2016-10-26 Thread Kovalenko Dmitry (JIRA)
Incorrect processing (truncation) of SQL statement with length 10MB+1
-

 Key: CORE-5382
 URL: http://tracker.firebirdsql.org/browse/CORE-5382
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0.2
 Environment: Firebird 3.0.2.32619, IBProvider, direct INET-connection 
to FB3 (without fbclient.dll).
Reporter: Kovalenko Dmitry


SQL Statement (total length = 10*1024*1024+1):

 "select/*--  ---*/ID from DUAL "

---
Prepare error:

Dynamic SQL Error
SQL error code = -204
Table unknown
DUA

---

1. I think, the error message must be a little another.

2. Special for this case, I created the new table "DUA" and server prepared 
original query without any problem.


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



--
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5396) Assert at MET_current

2016-11-15 Thread Kovalenko Dmitry (JIRA)
Assert at MET_current
-

 Key: CORE-5396
 URL: http://tracker.firebirdsql.org/browse/CORE-5396
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0.2
 Environment: Windows 10 Pro x64, IBProvider Test System, Outside snow.
Reporter: Kovalenko Dmitry


Firebird 3.0.2.32629. Original source code, custom DEBUG build VS2015 SP3, 
SuperServer, x64.

IBProvider tests. 4 test threads.

Problem in test thread #3 [table name: TEST_TABLE_6327]

Crash stack
engine12.dll!fb_assert_impl(const char * msg, const char * file, int 
line, bool do_abort) Line 40   C++
>   engine12.dll!MET_current(Jrd::thread_db * tdbb, Jrd::jrd_rel * 
> relation) Line 5303  C++
engine12.dll!VIO_gc_record(Jrd::thread_db * tdbb, Jrd::jrd_rel * 
relation) Line 2073C++
engine12.dll!purge(Jrd::thread_db * tdbb, Jrd::record_param * rpb) Line 
5938C++
engine12.dll!VIO_chase_record_version(Jrd::thread_db * tdbb, 
Jrd::record_param * rpb, Jrd::jrd_tra * transaction, Firebird::MemoryPool * 
pool, bool writelock, bool noundo) Line 1234   C++
engine12.dll!VIO_next_record(Jrd::thread_db * tdbb, Jrd::record_param * 
rpb, Jrd::jrd_tra * transaction, Firebird::MemoryPool * pool, bool onepage) 
Line 3015   C++
engine12.dll!garbage_collector(void * arg) Line 4894C++
engine12.dll!`anonymous namespace'::ThreadArgs::run() Line 78   C++
engine12.dll!threadStart(void * arg) Line 94C++

Local variables [MET_current]:
+   attachment  0x03a95920 {att_pool=0x03a921b0 
{pool=0x03a91e10 {smallObjects={freeObjects=...} ...} } ...}
Jrd::Attachment *
+   jrd_481 {jrd_482=4156 } 
MET_current::__l2::
+   jrd_483 {jrd_484=0 jrd_485=1 }  
MET_current::__l2::
-   relation0x30bf37b0 {rel_pool=0x03a921b0 
{pool=0x03a91e10 {smallObjects={freeObjects=...} ...} } ...}
Jrd::jrd_rel *
+   pool_alloc<9>   {...}   pool_alloc<9>
+   rel_pool0x03a921b0 {pool=0x03a91e10 
{smallObjects={freeObjects=0x03a91e18 {0x , ...} 
...} ...} }  Firebird::MemoryPool *
rel_id  4156unsigned short
rel_current_fmt 0   unsigned short
rel_flags   800 unsigned long
+   rel_current_format  0x
Jrd::Format *
+   rel_name{data=0x30bf37d0 "TEST_TABLE_6327" 
count=15 }   Firebird::MetaName
+   rel_owner_name  {data=0x30bf37f4 "" count=0 }   
Firebird::MetaName
+   rel_security_name   {data=0x30bf3818 "" count=0 }   
Firebird::MetaName
+   rel_formats 0x
Jrd::vec *
+   rel_fields  0x
Jrd::vec *
+   rel_view_rse0xJrd::RseNode *
+   rel_view_contexts   {sortMode=1 sorted=true }   
Firebird::SortedArray,unsigned 
short,Jrd::ViewContext,Firebird::DefaultComparator >
+   rel_file0x
Jrd::ExternalFile *
+   rel_gc_records  {...}   Firebird::HalfStaticArray
rel_use_count   0   unsigned short
rel_sweep_count 2   unsigned short
rel_scan_count  0   short
+   rel_existence_lock  0x93600148 
{lck_dbb=0x0208ec50 {dbb_sync={lockState={...} waiters={...} 
monitorCount=...} ...} ...} Jrd::Lock *
+   rel_partners_lock   0x30bf3a48 
{lck_dbb=0x0208ec50 {dbb_sync={lockState={...} waiters={...} 
monitorCount=...} ...} ...} Jrd::Lock *
+   rel_rescan_lock 0x93600090 {lck_dbb=0x0208ec50 
{dbb_sync={lockState={...} waiters={...} monitorCount=...} ...} ...} 
Jrd::Lock *
+   rel_gc_lock 0x93600200 {lck_dbb=0x0208ec50 
{dbb_sync={lockState={...} waiters={...} monitorCount=...} ...} ...} 
Jrd::Lock *
+   rel_index_locks 0xJrd::IndexLock *
+   rel_index_blocks0x
Jrd::IndexBlock *
+   rel_pre_erase   0x
Firebird::ObjectsArray > > *
+   rel_post_erase  0x
Firebird::ObjectsArray > > *
+   rel_pre_modify  0x
Firebird::ObjectsArray > > *
+   rel_post_modify 0x
Firebird::ObjectsArray > > *
+   rel_pre_store   0x
Firebird::ObjectsArray > > *
+   rel_post_store  0x
Firebird::ObjectsArray > > *
+   rel_primary_dpnds   {prim_reference_ids=0x 
 prim_relations=0x

[Firebird-devel] [FB-Tracker] Created: (CORE-5415) [security3.fdb] wrong page type page 22 is of wrong type (expected pointer, found index root)

2016-12-08 Thread Kovalenko Dmitry (JIRA)
[security3.fdb] wrong page type page 22 is of wrong type (expected pointer, 
found index root)
-

 Key: CORE-5415
 URL: http://tracker.firebirdsql.org/browse/CORE-5415
 Project: Firebird Core
  Issue Type: Bug
Affects Versions: 3.0.2
 Environment: FB SS x64 3.0.2.32641, Win10, IBProvider Test System
Reporter: Kovalenko Dmitry


FB SuperServer x64 3.0.2.32641

Under load tests I get the some unexpected problem with connection to database

Test configuration: 8 test threads.

Message at test side:
[THR:002956] [07.12.2016 01:22:37] [test] connect to database ...
[THR:002956] [07.12.2016 01:22:37] ERROR: 
[blob.002.cmd.disable_defer_data.ansi.TBL_CS__TIS620.COL_BLOB.param_adLongVarWChar.bind__wstr.large1.len_4053.chars_TIS620.ins_UTF8.sel_NONE]
 Data Source initialization
1. [Unknown DBMS]: Error occurred during login, please check server 
firebird.log for details
2. [LCPI.IBProvider.3]: Ошибка подключения к базе данных.
Неопознанная ошибка

Message in firebird.log:
HOME4   Wed Dec  7 01:22:37 2016
Authentication error
database file appears corrupt 
(D:\PROGRAM_FILES\FIREBIRD_3_0_X64\SECURITY3.FDB)
wrong page type
page 22 is of wrong type (expected pointer, found index root)

The previous tests and the next tests (in this and other threads) work without 
problem.

In other word, this problem not affect to work of other tests.

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

   

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5416) [FB3] Memory Leaks. FB does not release memory after load tests.

2016-12-09 Thread Kovalenko Dmitry (JIRA)
[FB3] Memory Leaks. FB does not release memory after load tests.


 Key: CORE-5416
 URL: http://tracker.firebirdsql.org/browse/CORE-5416
 Project: Firebird Core
  Issue Type: Bug
Affects Versions: 3.0.2
 Environment: FB 3.0.2.32641 SuperServer x64, Win10 x64 Pro, IBProvider 
Test System
Reporter: Kovalenko Dmitry
 Attachments: fb_image.png, fb_performance.png

Firebird does not release memory after completion of load tests.

Size of each memory leaks ~ equal to size of page cache

One interest moment:
1. When I execute (sequential) two "load tests set" without pause - FB not 
releases memory after second set.
@call run_test_w64_local2_d3.bat
@call run_test_w32_local2_d3.bat

Memory leak (approximately) == 3.5 GB

2. When I added a pause (10 min) between runs - I see 2xLeaks.
@call run_test_w64_local2_d3.bat
sleep 10m
@call run_test_w32_local2_d3.bat

Memory leak (approximately) == 7GB

---
Database Page: 16KB

Changes in firebird.conf:
DefaultDbCachePages = 20
UserManager = Srp, Legacy_UserManager
MaxUnflushedWrites = -1
MaxUnflushedWriteTime = -1
WireCrypt = Enabled


Additional information for attached screenshots - because I executed parallel 
tests for two databases, memory leaks was multiplied by two and equal (at 
current moment) to 21GB.

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



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5425) [FB3] Server hang

2016-12-18 Thread Kovalenko Dmitry (JIRA)
[FB3] Server hang
-

 Key: CORE-5425
 URL: http://tracker.firebirdsql.org/browse/CORE-5425
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0.2
 Environment: FB 3.0.2.32644 SS x64, Win10 Pro Rus, 6950X/128GB, 
IBProvider Test System.
Reporter: Kovalenko Dmitry
 Attachments: FB_states.7z

Firebird server hangs under load tests

I launched 3 test processes with 4 test threads and own (3) databases.

Connection through fbclient.dll and INET

Firebird SRC, DUMP, EXE/DLL, PDB - http://dropmefiles.com/C61nz

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



--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5436) [FB3 SC] Server hangs (under load test)

2017-01-05 Thread Kovalenko Dmitry (JIRA)
[FB3 SC] Server hangs (under load test)
---

 Key: CORE-5436
 URL: http://tracker.firebirdsql.org/browse/CORE-5436
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0.2
 Environment: Firebird 3.0.2.32651 SuperClassic x64, Win10, IBProvider 
Test System.
Reporter: Kovalenko Dmitry


SuperClassic hangs under load test.

---
Two test processes (with 4 test theads) with own (two) databases.

All test threads are waiting the answer from "database attach" operation.

- [Error at client side]
[THR:001544] [05.01.2017 11:44:09] [test] Verify Arrays 
[TBL_CS__NONE::CHAR_ARRAY__8]. ArrayRwMode: direct. BindArrayType: 
array_iunknown__ibp_ss_wc. CType:UNICODE_FSS Truncate Char: false
[THR:001544] [05.01.2017 11:44:29] ERROR: 
[array.002.rw_api.build_mode__use_cmd.unicode.TBL_CS__NONE.CHAR_ARRAY__8.chars__WIN1251.write__array_iunknown__ibp_ss_wc.ctype__UTF8]
 Data Source initialization
1. [Unknown DBMS]: Error occurred during login, please check server 
firebird.log for details
2. [LCPI.IBProvider.3]: Ошибка подключения к базе данных.
Неопознанная ошибка

COM Error Code: E_FAIL

- [Error in firebird.log]
HOME4   Thu Jan  5 11:44:19 2017
Database: D:\PROGRAM_FILES\FIREBIRD_3_0_X64\SECURITY3.FDB
page 0, page type 1 lock denied (216)


HOME4   Thu Jan  5 11:44:29 2017
Database: 
page 0, page type 1 lock denied (216)


HOME4   Thu Jan  5 11:44:29 2017
Authentication error
page 0, page type 1 lock denied

--
Dump file, Sources, PDB, EXE, DLL - http://dropmefiles.com/qlTUB

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

   

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5632) SuperServer FB3 has entered in infinite loop (hang up)

2017-10-09 Thread Kovalenko Dmitry (JIRA)
SuperServer FB3 has entered in infinite loop (hang up)
--

 Key: CORE-5632
 URL: http://tracker.firebirdsql.org/browse/CORE-5632
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0.3
 Environment: Windows 10 Pro x64, 6950x/128GB, FB3 SuperServer x64, 
IBProvider Test System.
Reporter: Kovalenko Dmitry


- Firebird 3.0.3.32802 x64 (SuperServer)
- Connection through TCP/IP (localhost)

Server has entered in infinite loop(?) in one own thread (ID: 24436)

I waited 24 hours.

At client side (multithreaded test system) all test threads wait the answer 
from server:
 - 1 thread wait answer for COMMIT_TR
 - 3 threads wait answers for START_TR
 - 7 threads wait answers for DETACH_DB

Sources, dumps, binaries ...: http://dropmefiles.com/h0au4  (valid within 14 
days)

Stack of thread with infinite loop (24436)
>   engine12.dll!Jrd::LockManager::find_lock(unsigned short series, const 
> unsigned char * value, unsigned short length, unsigned short * slot) Line 
> 2129C++ Symbols loaded.
engine12.dll!Jrd::LockManager::enqueue(Jrd::thread_db * tdbb, 
Firebird::CheckStatusWrapper * statusVector, long prior_request, const unsigned 
short series, const unsigned char * value, const unsigned short length, 
unsigned char type, int(*)(void *) ast_routine, void * ast_argument, __int64 
data, short lck_wait, long owner_offset) Line 581C++ Symbols loaded.
engine12.dll!enqueue(Jrd::thread_db * tdbb, 
Firebird::CheckStatusWrapper * statusVector, Jrd::Lock * lock, unsigned short 
level, short wait) Line 934   C++ Symbols loaded.
[Inline Frame] engine12.dll!ENQUEUE(Jrd::thread_db *) Line 149  C++ 
Symbols loaded.
engine12.dll!LCK_lock(Jrd::thread_db * tdbb, Jrd::Lock * lock, unsigned 
short level, short wait) Line 663   C++ Symbols loaded.
engine12.dll!transaction_start(Jrd::thread_db * tdbb, Jrd::jrd_tra * 
trans) Line 3259   C++ Symbols loaded.
engine12.dll!TRA_start(Jrd::thread_db * tdbb, int tpb_length, const 
unsigned char * tpb, Jrd::jrd_tra * outer) Line 1715C++ Symbols 
loaded.
engine12.dll!start_transaction(Jrd::thread_db * tdbb, bool 
transliterate, Jrd::jrd_tra * * tra_handle, Jrd::Attachment * attachment, 
unsigned int tpb_length, const unsigned char * tpb) Line 7848  C++ 
Symbols loaded.

engine12.dll!Jrd::JAttachment::startTransaction(Firebird::CheckStatusWrapper * 
user_status, unsigned int tpbLength, const unsigned char * tpb) Line 4195   
 C++ Symbols loaded.

engine12.dll!Firebird::IAttachmentBaseImpl
 > > > >::cloopstartTransactionDispatcher(Firebird::IAttachment * self, 
Firebird::IStatus * status, unsigned int tpbLength, const unsigned char * tpb) 
Line 8654C++ Symbols loaded.
[Inline Frame] 
fbclient.dll!Firebird::IAttachment::startTransaction(Firebird::CheckStatusWrapper
 *) Line 1827   C++ Symbols loaded.

fbclient.dll!Why::YAttachment::startTransaction(Firebird::CheckStatusWrapper * 
status, unsigned int tpbLength, const unsigned char * tpb) Line 5070 C++
 Symbols loaded.

fbclient.dll!Firebird::IAttachmentBaseImpl
 > > > >::cloopstartTransactionDispatcher(Firebird::IAttachment * self, 
Firebird::IStatus * status, unsigned int tpbLength, const unsigned char * tpb) 
Line 8654C++ Symbols loaded.
[Inline Frame] 
firebird.exe!Firebird::IAttachment::startTransaction(Firebird::CheckStatusWrapper
 *) Line 1827   C++ Symbols loaded.
firebird.exe!rem_port::start_transaction(P_OP operation, p_sttr * 
stuff, packet * sendL) Line 5849  C++ Symbols loaded.
firebird.exe!process_packet(rem_port * port, packet * sendL, packet * 
receive, rem_port * * result) Line 4398   C++ Symbols loaded.
firebird.exe!loopThread(void * __formal) Line 5954  C++ Symbols 
loaded.
[Inline Frame] firebird.exe!`anonymous-namespace'::ThreadArgs::run() 
Line 78C++ Symbols loaded.
firebird.exe!threadStart(void * arg) Line 93C++ Symbols loaded.


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



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5693) EXTRACT(QUARTER FROM )

2018-01-03 Thread Kovalenko Dmitry (JIRA)
EXTRACT(QUARTER FROM )
--

 Key: CORE-5693
 URL: http://tracker.firebirdsql.org/browse/CORE-5693
 Project: Firebird Core
  Issue Type: New Feature
  Components: Engine
Affects Versions: 3.0.3
Reporter: Kovalenko Dmitry


I'm surprised that Firebird (v3) still not support QUARTER in EXTRACT statement.

It has a serious reason?

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



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5917) ENDING WITH

2018-09-19 Thread Kovalenko Dmitry (JIRA)
ENDING WITH
---

 Key: CORE-5917
 URL: http://tracker.firebirdsql.org/browse/CORE-5917
 Project: Firebird Core
  Issue Type: New Feature
  Components: Engine
Reporter: Kovalenko Dmitry


Firebird and InterBase support the "STARTING WITH" operator in SQL.

But not support "ENDING WITH".

I know, that I may use LIKE, or "RIGHT(value,CHAR_LENGTH(pattern))=pattern", 
but (in general case) "ENDING WITH" looks better :)

---
Where it need - in translator of LINQ-queries into Firebird SQL.


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


[Firebird-devel] [FB-Tracker] Created: (CORE-5919) REPLACE and charset of third parameter

2018-09-21 Thread Kovalenko Dmitry (JIRA)
REPLACE and charset of third parameter
--

 Key: CORE-5919
 URL: http://tracker.firebirdsql.org/browse/CORE-5919
 Project: Firebird Core
  Issue Type: Bug
Affects Versions: 3.0.4
Reporter: Kovalenko Dmitry


Connection charset: win1251

CREATE TABLE TEST_MODIFY_ROW (
TEST_IDT_TEST_ID NOT NULL /* T_TEST_ID = BIGINT */,
COL_VARCHAR_10 T_VARCHAR_10 /* T_VARCHAR_10 = VARCHAR(10), CHARSET: 
WIN1251 */,
);

For query1
SELECT "r"."TEST_ID", "r"."COL_VARCHAR_10" FROM "TEST_MODIFY_ROW" AS "r"
WHERE (POSITION(REPLACE("r"."COL_VARCHAR_10", 'ABC', :__vv_0), 
"r"."COL_VARCHAR_10") > 0) AND ("r"."TEST_ID" = :__8__locals1_testID_1)

Server returns that "__vv_0" parameter has NON OCTETS charset.

For query2:
SELECT "r"."TEST_ID", "r"."COL_VARCHAR_10" FROM "TEST_MODIFY_ROW" AS "r"
WHERE (POSITION(REPLACE("r"."COL_VARCHAR_10", 'ABC'||x'00'||'123', :__vv_0), 
"r"."COL_VARCHAR_10") > 0) AND ("r"."TEST_ID" = :__8__locals1_testID_1)

Server returns that "__vv_0" parameter has OCTETS charset.

Difference of these queries in second parameter of REPLACE: 'ABC' and 
'ABC'||x'00'||'123'.

For me - in second query parameter "__vv_0" should has NON OCTETS charset.

Could anybody confirm this behaviour and explain the reason?


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


[Firebird-devel] [FB-Tracker] Created: (CORE-5920) SUBSTRING does not support parameters for startPos and length

2018-09-22 Thread Kovalenko Dmitry (JIRA)
SUBSTRING does not support parameters for startPos and length
-

 Key: CORE-5920
 URL: http://tracker.firebirdsql.org/browse/CORE-5920
 Project: Firebird Core
  Issue Type: Improvement
Affects Versions: 3.0.4
Reporter: Kovalenko Dmitry


Server can't prepare SQL:

SELECT *
FROM "TEST_MODIFY_ROW" AS "r"
WHERE SUBSTRING("r"."COL_VARCHAR_10" FROM :__vv1_0 FOR :__vv2_1) = _utf8 'G'

Error message: "expression evaluation not supported".

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


[Firebird-devel] [FB-Tracker] Created: (CORE-5932) Usage of "BLOB SUB_TYPE TEXT" for "free" parameters

2018-10-01 Thread Kovalenko Dmitry (JIRA)
Usage of "BLOB SUB_TYPE TEXT" for "free" parameters
---

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


Test code:


 cmd.CommandText
  ="SELECT \"r\".\"TEST_ID\", \"r\".\"COL_VARCHAR_10\"\n"
  +"FROM \"TEST_MODIFY_ROW\" AS \"r\"\n"
  +"WHERE (:__src_0||\"r\".\"COL_VARCHAR_10\" STARTING WITH _utf8 'Q') AND 
(\"r\".\"TEST_ID\" = :__testID_1)";

 cmd.Prepare();

 Assert.AreEqual
  (1, //<---  USUS
   cmd["__src_0"].Size);


Server describes "__src_0" as parameter with datatype "(var)char(1)".

I offer to use a "BLOB (SUB_TYPE TEXT)" datatype.


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


[Firebird-devel] [FB-Tracker] Created: (CORE-6063) FB3 (protocol 13) returns op_accept instead op_accept_data

2019-05-14 Thread Kovalenko Dmitry (JIRA)
FB3 (protocol 13) returns op_accept instead op_accept_data
--

 Key: CORE-6063
 URL: http://tracker.firebirdsql.org/browse/CORE-6063
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 4.0 Beta 1, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 4.0 
Initial, 3.0.5, 4.0 Beta 2
Reporter: Kovalenko Dmitry


This problem was detected by IBProvider builtin client to Firebird (not by 
fbclient.dll).

Reproductions:

1. Server config:

AuthServer=Legacy_Auth, Win_SSpi, Srp
WireCrypt=enabled

2. Client config:

AuthClient=Legacy_Auth, Win_SSpi, Srp
WireCrypt=disabled

3. Create NEW used "DBA-SRP" through SRP plugin:

CREATE USER "DBA-SRP" PASSWORD 'masterkey' USING PLUGIN Srp;

4. Connect to database with "DBA-SRP"

5. Server returns op_accept instead op_accept_data.

The problem located in static bool accept_connection(rem_port* port, P_CNCT* 
connect, PACKET* send):

case IAuth::AUTH_CONTINUE:
HANDSHAKE_DEBUG(fprintf(stderr, "AUTH_CONTINUE\n"));
// try next plugin
plugins->next();
if (!plugins->hasData())
{
// failed
setErrorStatus(&status);
accepted = false;
loginFail(port->port_login, port->getRemoteId());
break;
}
port->port_srv_auth_block->setPluginName(plugins->name());

port->port_srv_auth_block->extractPluginName(&send->p_acpd.p_acpt_plugin);

/* BUG FIX */ returnData = true; // <-- You forgot setup this 
flag

break;


This code (by designe) should return the name of next auth-plugin. But does not 
return, because returnData was not set to true.



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


[Firebird-devel] [FB-Tracker] Created: (CORE-6217) [inet.cpp] Wrong work with pointer: delete ptr; ptr=new ;

2020-01-07 Thread Kovalenko Dmitry (JIRA)
[inet.cpp] Wrong work with pointer: delete ptr; ptr=new ;
-

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


inet.cpp, line 835-839

if (host.hasData())
{
delete port->port_connection;
port->port_connection = REMOTE_make_string(host.c_str());
}

REMOTE_make_string may throw exception and "delete port->port_connection" will 
hold pointer to released (deleted) memory block.

Please assign nullptr to delete port->port_connection after delete operation:

if (host.hasData())
{
delete port->port_connection;
port->port_connection=nullptr;
port->port_connection = REMOTE_make_string(host.c_str());
}


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


[Firebird-devel] [FB-Tracker] Created: (CORE-6221) Incorrect (throw-based) alloFunc for zlib1. Possible memory leak.

2020-01-10 Thread Kovalenko Dmitry (JIRA)
Incorrect (throw-based) alloFunc for zlib1. Possible memory leak.
-

 Key: CORE-6221
 URL: http://tracker.firebirdsql.org/browse/CORE-6221
 Project: Firebird Core
  Issue Type: Bug
Affects Versions: 3.0.5
Reporter: Kovalenko Dmitry


https://www.zlib.net/manual.html

Usage of z_stream_s structure: zalloc must return Z_NULL if there is not enough 
memory for the object.

Firebird code, if I understood correctly, assign to zalloc throw-based 
allocation func:

void* allocFunc(void*, uInt items, uInt size)
{
return MemoryPool::globalAlloc(items * size ALLOC_ARGS); //thow ?
}

In deflateInit, for example, has five calls of zalloc functions and has 
rollback of initialization if second (and next) call of zalloc return nullptr.


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


[Firebird-devel] [FB-Tracker] Created: (CORE-6224) [AV] Re-destruction of the rem_port object

2020-01-13 Thread Kovalenko Dmitry (JIRA)
[AV] Re-destruction of the rem_port object
--

 Key: CORE-6224
 URL: http://tracker.firebirdsql.org/browse/CORE-6224
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0.5
 Environment: Test of IBProvider builtin client for Firebird.
Reporter: Kovalenko Dmitry


FB3.0.5.33225 x64 SuperServer.

Connection through TCP/IP.

---
Under mt-tesing of IBProvider builtin client for Firebird, Firebird crash on 
the destroy of rem_port object.

This is a reproducible problem on the "clear" build of server.

Run parameters [for history]
target\vs2019-x64-Debug\test_db_client_fb_1.exe   /thread_count 10 /auto 
/log_dir _logs /log_file_prefix fb03-0-4 /inet_host HOME4 /db 
d:\database\ram\ibp_test_fb30_d3.gdb /db_user GAMER /db_password vermut 
/new_db_dir d:\database\ram\ /isc_api_library fbclient_30.dll /cn_str 
"remote:protocol_arch=symmetric,generic;remote:wire_compression=required" /dbms 
"FB-3" /test RemoteFB.WORK.019.StmtExecute.*

 [The "best" case of crash]

I made some changes in FB sources for better undertand of problem.

CRASH THREAD [ID 31192 - not sure at current time]

virtual int release() const
{
fb_assert(m_refCnt.value() > 0); //<- HERE

STACK:
firebird.exe!fb_assert_impl(const char * msg, const char * file, int 
line, bool do_abort)Строка 48  C++
>   firebird.exe!Firebird::RefCounted::release()Строка 45   C++
firebird.exe!rem_port::release()Строка 1162 C++
firebird.exe!Firebird::RefPtr::assign(rem_port * const 
p)Строка 276   C++
firebird.exe!Firebird::RefPtr::operator=(rem_port * p)Строка 
182  C++
firebird.exe!server_req_t::~server_req_t()Строка 130C++
firebird.exe!server_req_t::`scalar deleting destructor'(unsigned int)   
C++
firebird.exe!loopThread(void * __formal)Строка 6180 C++
firebird.exe!`anonymous namespace'::ThreadArgs::run()Строка 78  C++
firebird.exe!threadStart(void * arg)Строка 97   C++
ucrtbased.dll!thread_start(void * 
const parameter)Строка 97  C++
kernel32.dll!BaseThreadInitThunk()  Нет данных
ntdll.dll!RtlUserThreadStart()  Нет данных

LOCAL VARIABLES:
-   this0x008ca1d0 {m_refCnt={...} 
m_debug__WAS_DELETED=-572662307 }const Firebird::RefCounted *
+   __vfptr 0x {???, ???, ???}  void * *
-   m_refCnt{...}   Firebird::AtomicCounter
+   Firebird::PlatformAtomicCounter {counter=-2459565876494606883 } 
Firebird::PlatformAtomicCounter
m_debug__WAS_DELETED-572662307  long
refCnt  -858993460  const int

NOTE ON THE this - is is 0x008ca1d0

-- TRACE INFORMATION, WHICH WAS CREATED __BEFORE__ CRASH:

It is dirrect call of rem_port::release from "static void disconnect(rem_port* 
const port)" (inet.cpp). Decrement from 2 to 1.

REM_PORT_RLS - 0x008ca1d0. TID: 31192. R: 1. STACK:
firebird.exe!rem_port::release
firebird.exe!disconnect
firebird.exe!rem_port::disconnect
firebird.exe!rem_port::disconnect
firebird.exe!process_packet
firebird.exe!loopThread
firebird.exe!`anonymous namespace'::ThreadArgs::run
firebird.exe!threadStart
ucrtbased.dll!thread_start
kernel32.dll!BaseThreadInitThunk
ntdll.dll!RtlUserThreadStart

It is destroy of rem_port object. Decrement from 1 to 0.

REM_PORT_DCR - 0x008ca1d0. TID: 31192. STACK:
firebird.exe!rem_port::~rem_port
firebird.exe!rem_port::`scalar deleting destructor'
firebird.exe!Firebird::RefCounted::release
firebird.exe!rem_port::release
firebird.exe!Firebird::RefPtr::~RefPtr
firebird.exe!DecrementRequestsQueued::~DecrementRequestsQueued
firebird.exe!process_packet
firebird.exe!loopThread
firebird.exe!`anonymous namespace'::ThreadArgs::run
firebird.exe!threadStart
ucrtbased.dll!thread_start
kernel32.dll!BaseThreadInitThunk
ntdll.dll!RtlUserThreadStart


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


[Firebird-devel] [FB-Tracker] Created: (CORE-6246) [fbclient] Problem with too many number of columns in resultset.

2020-02-14 Thread Kovalenko Dmitry (JIRA)
[fbclient] Problem with too many number of columns in resultset.


 Key: CORE-6246
 URL: http://tracker.firebirdsql.org/browse/CORE-6246
 Project: Firebird Core
  Issue Type: Bug
  Components: API / Client Library
Affects Versions: 3.0.5
Reporter: Kovalenko Dmitry


First query:
 select x1.RDB$FIELD_NAME from RDB$FIELDS as x1

fbclient.dll returns subtype=3 for first column

Second query:
 select x1.RDB$FIELD_NAME, x1.RDB$FIELD_NAME, /*100500 raz*/ 
,x1.RDB$FIELD_NAME from RDB$FIELDS as x1

fbclient.dll (isc_dsql_describe) returns subtype=0 for first column.


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


[Firebird-devel] [FB-Tracker] Created: (CORE-6293) ISQL does not process (not extract) hex string of external SP body

2020-05-01 Thread Kovalenko Dmitry (JIRA)
ISQL does not process (not extract) hex string of external SP body
--

 Key: CORE-6293
 URL: http://tracker.firebirdsql.org/browse/CORE-6293
 Project: Firebird Core
  Issue Type: Bug
  Components: ISQL
Affects Versions: 3.0.6
Reporter: Kovalenko Dmitry
Priority: Minor


Source code:
 CREATE PROCEDURE UDR__GEN_ROWS_05
 (START_N INTEGER NOT NULL,
 END_N INTEGER NOT NULL)
 RETURNS
 (N INTEGER NOT NULL)
 EXTERNAL NAME 'udrcpp_example.dll!gen_rows'
 ENGINE UDR
 AS x'000100';

ISQL extacts:

ALTER PROCEDURE UDR__GEN_ROWS_05 (START_N INTEGER NOT NULL,
END_N INTEGER NOT NULL)
RETURNS (N INTEGER NOT NULL)
EXTERNAL NAME 'udrcpp_example.dll!gen_rows'
ENGINE UDR
AS ''


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


[Firebird-devel] [FB-Tracker] Created: (CORE-6406) Unexpected socket close [FB3 SS, TCP/IP]

2020-09-23 Thread Kovalenko Dmitry (JIRA)
Unexpected socket close [FB3 SS, TCP/IP]


 Key: CORE-6406
 URL: http://tracker.firebirdsql.org/browse/CORE-6406
 Project: Firebird Core
  Issue Type: Bug
Affects Versions: 3.0.7
 Environment: Windows, IBProvider test system, FB SS x64.
Reporter: Kovalenko Dmitry


Under multithreaded load test Firebird, time from time, closes INET-connection 
without any error/warning in own firebird.log

Server continues to work after these problems.

Work through own (builtin) IBProvider client for Firebird.

Examples of error messages:

-- 1.

[THR:036728] [24.09.2020 05:24:10] ERROR: 
[octets.003.blob.asynch.cmd.BIN_BLOB_TABLE.BIN_DATA.len_131073.bind__bytes] 
Execution of command
1. [LCPI.IBProvider.5]: Ошибка формирования ib-значения входящего параметра. 
Позиция 0.

[winsock][BUG CHECK] Чтение из закрытого порта подключения. Ошибка WinSock: 0.
2. [LCPI.IBProvider.5]: Ошибка формирования ib-значения входящего параметра. 
Позиция 0.

Запись BLOB: Ошибка записи данных.
Неопознанная ошибка

-- 2.

[THR:040972] [23.09.2020 15:54:10] ERROR: 
[blob.002.change_rs.unicode.TBL_CS__FSS.COL_BLOB.bind__iunknown__ibp_ss_wc.large.len_65536.chars_WIN1251.ins_UTF8.sel_UTF8.block_256]
 Insert row
1. [LCPI.IBProvider.5]: Ошибка формирования ib-значения входящего параметра. 
Позиция 1.

[winsock][BUG CHECK] Чтение из закрытого порта подключения. Ошибка WinSock: 0.
2. [LCPI.IBProvider.5]: Ошибка формирования ib-значения входящего параметра. 
Позиция 1.

Запись BLOB: Ошибка записи данных.
3. [LCPI.IBProvider.5]: [IBP.SS] Ошибка выполнения служебного запроса [0].
4. [LCPI.IBProvider.5]: [IBP.SS] [изменение базы] Ошибка добавления ряда.
Неопознанная ошибка

COM Error Code: E_FAIL

-- 3.

[THR:040972] [23.09.2020 17:27:30] [test] TRY SET FIELD 
"COL_TEXT_BLOB"=IUNKNOWN[S_OK][0x024660E8, 
{769A128F-04BF-11D8-AE8B-00A0C907DB93}] ...
[THR:040972] [23.09.2020 17:27:39] [test] OK - we receive error:
[THR:040972] [23.09.2020 17:27:39] [test] Update row
1. [LCPI.IBProvider.5]: Ошибка формирования ib-значения входящего параметра. 
Позиция 0.

[winsock][BUG CHECK] Чтение из закрытого порта подключения. Ошибка WinSock: 0.
2. [LCPI.IBProvider.5]: Ошибка формирования ib-значения входящего параметра. 
Позиция 0.

Запись BLOB: Ошибка записи данных.
3. [LCPI.IBProvider.5]: [IBP.SS] Ошибка выполнения служебного запроса [0].
4. [LCPI.IBProvider.5]: [IBP.SS] [изменение базы] Ошибка обновления ряда.

-- 4. [ just for collection - error 10054]

[THR:023940] [21.09.2020 23:07:29] ERROR: [icr.04.all2/task__2434.direct] 
Preparing a command
1. [LCPI.IBProvider.5]: [winsock] Сбой чтения данных из порта подключения. 
Ошибка WinSock: 10054.
2. [LCPI.IBProvider.5]: Ошибка подготовки SQL выражения.
Неопознанная ошибка

COM Error Code: E_FAIL


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


[Firebird-devel] [FB-Tracker] Created: (CORE-6428) CAST( AS NOT NULL)

2020-10-23 Thread Kovalenko Dmitry (JIRA)
CAST( AS  NOT NULL)
--

 Key: CORE-6428
 URL: http://tracker.firebirdsql.org/browse/CORE-6428
 Project: Firebird Core
  Issue Type: New Feature
Reporter: Kovalenko Dmitry


Hello,

At current time Firebird does not allow expression like "CAST(ColumnName AS 
INTEGER NOT NULL)".

The expected behavior is generation of error for a NULL value.

This feature may be used in LINQ-translators for "Nullable.Value" 
expressions.

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


[Firebird-devel] [FB-Tracker] Created: (CORE-6439) TIMESTAMP+-TIME

2020-11-09 Thread Kovalenko Dmitry (JIRA)
TIMESTAMP+-TIME
---

 Key: CORE-6439
 URL: http://tracker.firebirdsql.org/browse/CORE-6439
 Project: Firebird Core
  Issue Type: New Feature
  Components: Engine
Affects Versions: 3.0.7
Reporter: Kovalenko Dmitry


Hello,

Could you add support for the following expressions with TIMESTAMP and TIME?

SQL:
select CURRENT_TIMESTAMP-CURRENT_TIME from RDB$DATABASE

ERROR:
Dynamic SQL Error
expression evaluation not supported
Invalid data type for subtraction involving DATE, TIME or TIMESTAMP types

SQL:
select CURRENT_TIMESTAMP+CAST('01:00:00' AS TIME) from RDB$DATABASE

ERROR:
Dynamic SQL Error
expression evaluation not supported
Adding two DATE values or two TIME values is not allowed


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


[Firebird-devel] [FB-Tracker] Created: (CORE-6481) Dialect 1. Not consistent result of two expressions with divide of NUMERIC with scale

2021-02-02 Thread Kovalenko Dmitry (JIRA)
Dialect 1. Not consistent result of two expressions with divide of NUMERIC with 
scale
-

 Key: CORE-6481
 URL: http://tracker.firebirdsql.org/browse/CORE-6481
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0.8
 Environment: Database with first dialect
Reporter: Kovalenko Dmitry
Priority: Minor


Not consistent result of two expressions with divide:

1. cast(2 as NUMERIC(2,  1)) / cast(3 as NUMERIC(2,0))

returns DOUBLE value: 0.6(6) without any information about scale

2. cast(cast(2 as NUMERIC(2,  1)) / cast(3 as NUMERIC(2,0)) AS VARCHAR(32))

returns VARCHAR value: 0.7

---
d:\Program_Files\Firebird_3_0_x64>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> CONNECT "inet4://localhost/d:\database\RAM\IBP_TEST_FB30_D1.GDB";
Database: "inet4://localhost/d:\database\RAM\IBP_TEST_FB30_D1.GDB", User: 
HOME4\DIMA
SQL> SET SQLDA_DISPLAY ON;
SQL> select cast(2 as NUMERIC(2,  1)) / cast(3 as NUMERIC(2,0)) from dual;

INPUT message field count: 0

OUTPUT message field count: 1
01: sqltype: 480 DOUBLE scale: 0 subtype: 0 len: 8
  :  name: DIVIDE  alias: DIVIDE
  : table:   owner:

 DIVIDE
===
 0.

SQL> select cast(cast(2 as NUMERIC(2,  1)) / cast(3 as NUMERIC(2,0)) AS 
VARCHAR(32)) from dual;

INPUT message field count: 0

OUTPUT message field count: 1
01: sqltype: 448 VARYING scale: 0 subtype: 0 len: 32 charset: 0 NONE
  :  name: CAST  alias: CAST
  : table:   owner:

CAST

0.7
-

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


[Firebird-devel] [FB-Tracker] Created: (CORE-6494) Inconsistent translation "string->timestamp->string->timestamp" and first dialect

2021-02-24 Thread Kovalenko Dmitry (JIRA)
Inconsistent  translation "string->timestamp->string->timestamp" and first 
dialect
--

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


Connection with first dialect.

SQL:
select cast(cast(cast(cast('2-DEC-0083' as TIMESTAMP) as varchar(64))as 
TIMESTAMP)as varchar(64))  from DUAL

RESULT:
2-DEC-1983

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


[Firebird-devel] [FB-Tracker] Created: (CORE-6495) string_to_datetime and y2k problem

2021-02-24 Thread Kovalenko Dmitry (JIRA)
string_to_datetime and y2k problem
--

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


string_to_datetime has following code for correction of y2k problem (two-digit 
year):

tm times2;
Firebird::TimeStamp::getCurrentTimeStamp().decode(×2);

// Handle defaulting of year

if (description[position_year] == 0) {
times.tm_year = times2.tm_year + 1900;
}
else if (description[position_year] <= 2)
{
// Handle conversion of 2-digit years
if (times.tm_year < (times2.tm_year - 50) % 100)
times.tm_year += 2000;
else
times.tm_year += 1900;
}

times.tm_year -= 1900;
times.tm_mon -= 1;

---
This code looks to the CURRENT year, but adjust the two-digit year number on 
1900 or 2000.

When current year will be more than 2050, this code will return strange result.


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


[Firebird-devel] [FB-Tracker] Created: (CORE-6496) string_to_datetime and '\0' symbol

2021-02-24 Thread Kovalenko Dmitry (JIRA)
string_to_datetime and '\0' symbol
--

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


string_to_datetime returns error when translates string like:

"2021-2-20\0"
"2021-2-20 1:2\0"
"2021-2-20 1:2:3\0"

but not have problems with translation of strings like:

"5.3.2021 01:02:03.1234\0"

-
Note that, Firebird can't translate to BOOLEAN the string with '\0' symbol (for 
example "TRUE\0").


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