Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1245204

Summary: MySQL 5.5 - INSERT fails (java.sql.SQLException: Unknown Types value)
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Juraj Duráni <jdurani>
Component: TeiidAssignee: Van Halbert <vhalbert>
Status: CLOSED CURRENTRELEASE QA Contact: Juraj Duráni <jdurani>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: atangrin, dlesage, vhalbert
Target Milestone: ER1   
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
If an INSERT statement contains an object value then execution fails and users will encounter this exception: "java.sql.SQLException: Unknown Types value".
Story Points: ---
Clone Of: Environment:
Connector/J version: 5.1.36 MySQL server version: 5.5.43
Last Closed: 2016-08-24 11:47:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juraj Duráni 2015-07-21 13:20:58 UTC
Describe the issue: 
If INSERT statement contains an object value then execution fails with "java.sql.SQLException: Unknown Types value". There is no exception without object value.


Steps to reproduce:

Source table (in MySQL):
create table smalla(intkey int(11) primary key,stringkey varchar(10),intnum int(11),stringnum varchar(10),floatnum double,longnum bigint(20),doublenum double,bytenum tinyint,datevalue date,timevalue time,timestampvalue timestamp NULL,booleanvalue bit(1),charvalue char(1),shortvalue smallint(6),bigintegervalue decimal(38,0),bigdecimalvalue decimal(15,0),objectvalue text);

INSERT statement (fail):
INSERT INTO smalla (IntKey, StringKey, IntNum, StringNum, FloatNum, LongNum, DoubleNum, ByteNum, DateValue, TimeValue, TimestampValue, BooleanValue, CharValue, ShortValue, BigIntegerValue, BigDecimalValue, ObjectValue) VALUES (1, '0', NULL, '-24', -24.0, -24, -24.0, -128,
{d '2000-01-01'}, {t '00:00:00'}, {ts '2000-01-01 00:00:00.0'}, 0, '1', -32768, -24, -24, '-24');

INSERT statement (OK):
INSERT INTO smalla (IntKey, StringKey, IntNum, StringNum, FloatNum, LongNum, DoubleNum, ByteNum, DateValue, TimeValue, TimestampValue, BooleanValue, CharValue, ShortValue, BigIntegerValue, BigDecimalValue) VALUES (1, '0', NULL, '-24', -24.0, -24, -24.0, -128, {d '2000-01-01'}, {t '00:00:00'}, {ts '2000-01-01 00:00:00.0'}, 0, '1', -32768, -24, -24);

VDB:
<vdb name="test-vdb" version="1">
    <model name="Source">
        <source name="local" translator-name="mysql5" connection-jndi-name="java:/localMySQL" />
        <metadata type="DDL"><![CDATA[
CREATE FOREIGN TABLE smalla(IntKey integer, StringKey string, IntNum integer, StringNum string, FloatNum float, LongNum long, DoubleNum double, ByteNum byte, DateValue date, TimeValue time, TimestampValue timestamp, BooleanValue boolean, CharValue char, ShortValue short, BigIntegerValue biginteger, BigDecimalValue bigdecimal, ObjectValue object) OPTIONS (UPDATABLE 'TRUE');
]]>
        </metadata>
    </model>
</vdb>

Comment 1 Van Halbert 2015-07-21 13:35:54 UTC
The fix will be DV 6.3.

Comment 2 JBoss JIRA Server 2015-07-23 16:59:24 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3585 to Resolved

Comment 3 JBoss JIRA Server 2016-01-26 15:47:32 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3585 to Closed