Re: [Firebird-devel] Resolved: (CORE-4760) Can not create user with non-ascii (multi-byte) characters in it's name

2015-05-08 Thread Jim Starkey
Isn't it awfully confusing that a name that just happens to be all Ascii is 
case insensitive but one with a non-ASCII character is case sensitive?

If you know the character set and the upcasing rules, why not upcase all 
non-quoted identifiers?

Jim Starkey


> On May 7, 2015, at 6:47 AM, Alex Peshkoff  wrote:
> 
>> On 05/06/15 23:27, Jim Starkey wrote:
>> Non-ASCII, non-quoted names are a) illegal by SQL standard
> 
> Yes, illegal, but logins and roles may arrive not in SQL context. They 
> come to server in DPB.
> 
>> and b) impossible to handle by Lex without both character set declaration 
>> and explicit language support for that character set
> 
> It's anyway required to transliterate identifier to metadata charset.
> 
>> , and c) a really bad ideas (in my humble opinion).  Otherwise, how can lex 
>> even parse the identifier?  Assume any character it doesn't recognize is a 
>> letter?
> 
> luckily lex need not parse DPB
> 
> With Dmitry's suggestiion I see no problems with that identifiers - the 
> only difference from exact SQL is that unquoted identifier with 
> non-ascii symbols may exist. But we always treat it as quoted one i.e. 
> leave case unchanged. Unquoted ascii-only logins/roles from DPB are 
> uppercased.
> 
>> 
>> If Firebird were UTF-8 only, which I think would be a good thing, maybe 
>> rules could be relaxed.  But trying to handle identifiers in random 
>> character sets is untenable.
>> 
>> 
>> Jim Starkey
>> 
>> 
>>> On May 6, 2015, at 4:04 PM, Leyne, Sean  wrote:
>>> 
>>> 
>>> 
 I didn't follow all the details of this discussion, but this is how I see 
 the things:
 
 1) I don't think non-ASCII user/role names ever worked reliably and we
 never recommended using them. So if someone used them, they should be
 prepared for troubles. And this is OK (more or less) during a major version
 upgrade. Life is cruel.
 
 2) Unquoted ASCII user/role names should work the same way as before. I
 believe we support the standard here by implicitly uppercasing them.
 
 3) Quoted ASCII user/role names should work as declared in the standard,
 i.e. be case-sensitive. If this causes compatibility issues for someone, 
 well, so
 be it. I don't think there are many of such usage cases.
>>> I agree with everything that you have outlined, the question which is 
>>> resolved by these answers is:
>>> 
>>> How should unquoted non-ASCII characters in user/role names be handled 
>>> (without the requiring ICU installed at client)?
>>> 
>>> 
>>> Sean
>>> 
>>> 
>>> --
>>> 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
>> --
>> 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
>> 
> 
> 
> --
> 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

--
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-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-4786) Problematic key value (when attempt to insert duplicate in PK/UK) is not shown where length of key >= 127 characters

2015-05-08 Thread Pavel Zotov (JIRA)
Problematic key value (when attempt to insert duplicate in PK/UK) is not shown 
where length of key >= 127 characters


 Key: CORE-4786
 URL: http://tracker.firebirdsql.org/browse/CORE-4786
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 2.5.4, 2.1.7, 3.0 Beta 1, 3.0 Beta 2
Reporter: Pavel Zotov


SQL> insert into test(s) values( rpad('', 126, 'qwertyuioplkjhgfdsazxcvbnm') );
SQL> insert into test(s) values( rpad('', 126, 'qwertyuioplkjhgfdsazxcvbnm') );
Statement failed, SQLSTATE = 23000
violation of PRIMARY or UNIQUE KEY constraint "TEST_PK" on table "TEST"
-Problematic key value is ("S" = 
'qwertyuioplkjhgfdsazxcvbnmqwertyuioplkjhgfdsazxcvbnmqwertyuioplkjhgfdsazxcvbnmqwertyuioplkjhgfdsazxcv
bnmqwertyuioplkjhgfdsazxc')
SQL>

SQL> recreate table test(s varchar(127), constraint test_pk primary key(s) ); 
commit;
SQL> insert into test(s) values( rpad('', 127, 'qwertyuioplkjhgfdsazxcvbnm') );
SQL> insert into test(s) values( rpad('', 127, 'qwertyuioplkjhgfdsazxcvbnm') );
Statement failed, SQLSTATE = 23000
violation of PRIMARY or UNIQUE KEY constraint "TEST_PK" on table "TEST"
-arithmetic exception, numeric overflow, or string truncation
-string right truncation
-expected length 126, actual 127 

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