You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/09/25 05:59:00 UTC
[jira] [Commented] (TRAFODION-2753) LOB: filetolob() no longer
works in trafci
[ https://issues.apache.org/jira/browse/TRAFODION-2753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16178570#comment-16178570 ]
ASF GitHub Bot commented on TRAFODION-2753:
-------------------------------------------
GitHub user xwq opened a pull request:
https://github.com/apache/incubator-trafodion/pull/1242
[TRAFODION-2753]LOB: filetolob() no longer works in trafci
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/xwq/incubator-trafodion lob_extract_chunks
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/1242.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1242
----
commit de664c37a95f89573ccc4466357d5ebf94df22a5
Author: Weiqing Xu <we...@esgyn.cn>
Date: 2017-09-25T05:47:56Z
[TRAFODION-2753]LOB: filetolob() no longer works in trafci
----
> LOB: filetolob() no longer works in trafci
> ------------------------------------------
>
> Key: TRAFODION-2753
> URL: https://issues.apache.org/jira/browse/TRAFODION-2753
> Project: Apache Trafodion
> Issue Type: Bug
> Components: client-jdbc-t4
> Reporter: Weiqing Xu
>
> As shown below, while filetolob() still works fine in sqlci, it no longer works in trafci. Instead of returning a LOB handle, it returns what looks to be the text content of the data.
> This is seen on the AdvEnt2.3 20170818 daily build. It is a regression introduced sometime between the 20170811 daily build and the 20170818 daily build, as it still worked fine in the 20170811 daily build. This is a test stopper for testing LOB in SQL, as the tests use this function to verify various LOB features.
> $ cat /home/trafodion/QALibs/LOB/mydata.txt
> 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
> $ sqlci -i mytest.sql
> EsgynDB Advanced Conversational Interface 2.3.0
> Copyright (c) 2015-2017 Esgyn Corporation
> >>cqd TRAF_BLOB_AS_VARCHAR 'OFF';
> --- SQL operation complete.
> >>cqd TRAF_CLOB_AS_VARCHAR 'OFF';
> --- SQL operation complete.
> >>
> >>drop schema if exists mytest cascade;
> --- SQL operation complete.
> >>create schema mytest;
> --- SQL operation complete.
> >>set schema mytest;
> --- SQL operation complete.
> >>
> >>create table mytable (c blob);
> --- SQL operation complete.
> >>insert into mytable values (filetolob('/home/trafodion/QALibs/LOB/mydata.txt'));
> --- 1 row(s) inserted.
> >>select * from mytable;
> C
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> LOBH000000020001007893937971681307861878939379721266258218212370094955192082020"TRAFODION"."MYTEST"
> --- 1 row(s) selected.
> >>
> >>drop schema mytest cascade;
> --- SQL operation complete.
> >>exit;
> $ trafci
> Welcome to EsgynDB Command Interface
> Copyright (c) 2015-2017 Esgyn Corporation
> Host Name/IP Address: nap011.esgyn.local:23400
> User Name: zz
> Connected to EsgynDB Advanced
> SQL>obey mytest.sql;
> SQL>cqd TRAF_BLOB_AS_VARCHAR 'OFF';
> --- SQL operation complete.
> SQL>cqd TRAF_CLOB_AS_VARCHAR 'OFF';
> --- SQL operation complete.
> SQL>drop schema if exists mytest cascade;
> --- SQL operation complete.
> SQL>create schema mytest;
> --- SQL operation complete.
> SQL>set schema mytest;
> --- SQL operation complete.
> SQL>create table mytable (c blob);
> --- SQL operation complete.
> SQL>insert into mytable values (filetolob('/home/trafodion/QALibs/LOB/mydata.txt'));
> --- 1 row(s) inserted.
> SQL>select * from mytable;
> C
> --------------------------------------------------------------------------------------------------------------------------------
> 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
> --- 1 row(s) selected.
> SQL>drop schema mytest cascade;
> --- SQL operation complete.
> Steps To Reproduce Create a text file /home/trafodion/QALibs/LOB/mydata.txt with the following content (Change the directory name in the sql statement if desired. Make sure that the file is on every node if using trafci on a multi-node system):
> $ cat /home/trafodion/QALibs/LOB/mydata.txt
> 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
> Execute the following statements from trafci:
> cqd TRAF_BLOB_AS_VARCHAR 'OFF';
> cqd TRAF_CLOB_AS_VARCHAR 'OFF';
> drop schema if exists mytest cascade;
> create schema mytest;
> set schema mytest;
> create table mytable (c blob);
> insert into mytable values (filetolob('/home/trafodion/QALibs/LOB/mydata.txt'));
> select * from mytable;
> drop schema mytest cascade;
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)