You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:17:12 UTC
[jira] [Created] (TRAFODION-503) LP Bug: 1353116 - Update returns
error 8413 on a table with int primary key and decimal unique column
Alice Chen created TRAFODION-503:
------------------------------------
Summary: LP Bug: 1353116 - Update returns error 8413 on a table with int primary key and decimal unique column
Key: TRAFODION-503
URL: https://issues.apache.org/jira/browse/TRAFODION-503
Project: Apache Trafodion
Issue Type: Bug
Components: sql-exe
Reporter: Weishiun Tsai
Assignee: Anoop Sharma
Priority: Critical
The following update statement returns error 8413 complaining that a string argument contains characters that cannot be converted. It only happens with the combination of declaring c1 as a primary key, and declaring c2 as a unique column. As shown in the 2nd output and the 3rd output, the update statement works fine when c1 is not declared as primary key, or when c2 is not declared as a unique column.
This is seen on the 0801_0830 daily build installed on a workstation.
--------------------------------------------
Here is the entire script to reproduce this problem:
CREATE TABLE mytab (
c1 int not null not droppable primary key,
c2 decimal(3) unique
);
INSERT INTO mytab VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
UPDATE mytab SET c1 = c1 + 1;
--------------------------------------------
Here is the execution output showing that the UPDATE statement returns error 8413
>>CREATE TABLE mytab (
+>c1 int not null not droppable primary key,
+>c2 decimal(3) unique
+>);
--- SQL operation complete.
>>
>>INSERT INTO mytab VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
--- 6 row(s) inserted.
>>
>>UPDATE mytab SET c1 = c1 + 1;
*** ERROR[8413] The string argument contains characters that cannot be converted.
--- 0 row(s) updated.
--------------------------------------------
Here shows that the UPDATE statement runs fine when c1 is not declared as a primary key.
>>CREATE TABLE mytab (
+>c1 int,
+>c2 decimal(3) unique
+>);
--- SQL operation complete.
>>
>>INSERT INTO mytab VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
--- 6 row(s) inserted.
>>
>>UPDATE mytab SET c1 = c1 + 1;
--- 6 row(s) updated.
--------------------------------------------
Here shows that the UPDATE statement runs fine when c2 is not declared as a unique column.
>>CREATE TABLE mytab (
+>c1 int not null not droppable primary key,
+>c2 decimal(3)
+>);
--- SQL operation complete.
>>
>>INSERT INTO mytab VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
--- 6 row(s) inserted.
>>
>>UPDATE mytab SET c1 = c1 + 1;
--- 6 row(s) updated.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)