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

Reply via email to