Clone
 

arvind narain <arvind.narain@hp.com> in Trafodion

Batch inserts for varchar columns > 32k failing with exception

The message id: batch_command_failed

at org.trafodion.jdbc.t4.TrafT4PreparedStatement.executeBatch

(TrafT4PreparedStatement.java:321)

at TestBigCol.JDBCBigColBatch1(TestBigCol.java:468)

Temporary fix - will be changed to use vcindlen later.

Changes from the following commit needed, along with this mxosrvr

fix:

"-- changed sizeof(short) to correct vcindlen (2 or 4 bytes)":

https://review.trafodion.org/#/c/1714/

Handled one of the review comments in 1714.

Change-Id: I52e6d9380fa569b50a5f97c71f3cbef524a165c9

    • -14
    • +42
    /conn/odbc/src/odbc/nsksrvrcore/sqlinterface.cpp
Bug #1451618 MXOSRVR returns trunctated string to clients

When a table has varchar column and the varchar column size

is defined bigger than 32K, MXOSRVR server may return truncated

string to client application in certain circumstances.

Fix in sql/cli/CliExpExchange.cpp to not clear trailing characters.

As per SQL team this code is not needed and is a left over.

Also fixed alignment issues as pointed out by SQL and Connectivity

team (related to change done for bug #1449343)

This alignment change in mxosrvr needs a corresponding change in

linux and windows odbc driver. Windows driver change will be

submitted as a separate checkin.

Patch1 - removed one blank line.

Change-Id: Iabde0d3a0ae2922e15dbdcd36d23ba367da967fb

Bug #1441309 JDBC/ODBC catalog tests failing in Jenkins

Fix for bug #1414125 removed SELECT privileges to

metadata tables from PUBLIC.

Currently for catalog APIs bypassing this restriction.

Final fix would be to have catalog queries return information of

objects owned by the user.

Patch Set - updated copyright.

Change-Id: Idb0579c0401d4d54aaf1de848a8d148d6392ac55

    • -46
    • +79
    /conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
Avoid calling ResStatisticsStatement::start if stats is disabled.

If repository statistics is disabled then start() and related should

not be called. Improvement in YCSB's OPS and AvgResp_ms were noticed

with this change.

Change-Id: Id4d9950a96b4f3a743db9af96c648bc9c044d57d

    • -1
    • +1
    /conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
Bug 1425650 mxosrvr cores after initial connection.

1. Recursive mutex for maintaining SRVR_SESSION_HDL list

2. Disabled invocation of ESPs for repository queries

3. Updated WHERE clause for METRIC_QUERY_AGGR_TABLE.

Cherry picked Change-Id: If55f9de8f1541ba0a06b13f92750b64ff4676e0b

Took care of review comments by Tharak.

Change-Id: Ibf69b5659e47cf2607297195351fda4772068cfb

    • -7
    • +29
    /conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
    • -4
    • +52
    /conn/odbc/src/odbc/nsksrvrcore/srvrcommon.cpp
Bug 1425650 Partial fix

1. Recursive mutex for maintaining SRVR_SESSION_HDL list

2. Disabled invocation of ESPs for repository queries

3. Updated WHERE clause for METRIC_QUERY_AGGR_TABLE.

Change-Id: If55f9de8f1541ba0a06b13f92750b64ff4676e0b

    • -25
    • +72
    /conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
    • -1
    • +36
    /conn/odbc/src/odbc/nsksrvrcore/srvrcommon.cpp
Bug 1425650 Partial fix

1. Recursive mutex for maintaining SRVR_SESSION_HDL list

2. Disabled invocation of ESPs for repository queries

3. Updated WHERE clause for METRIC_QUERY_AGGR_TABLE.

Change-Id: If55f9de8f1541ba0a06b13f92750b64ff4676e0b

    • -25
    • +72
    /conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
    • -1
    • +36
    /conn/odbc/src/odbc/nsksrvrcore/srvrcommon.cpp
Fix bug 1413422: Error 8605 for stmt QRYSTS_ON_1 during connect.

mxosrvr does an explicit COMMIT WORK after fetching the setting

for a mode since during this time AUTOCOMMIT is off and SHOWCONTROL

used to start a transaction.

Recent change disabled starting a transaction for SHOWCONTROL

leading to the 8605 error.

(in GenRelScan.cpp, method Describe::codeGen)

https://review.trafodion.org/938.

Do note this fix is only for the following seen in master logs:

SQLCODE: 8605, QID: xxx_STMT_QRYSTS_ON_1, *** ERROR[8605]

Committing a transaction which has not started.

Change-Id: Idb047b55d575f49b77b7660ab7716b32de48edf0

    • -10
    • +3
    /conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
Port change to get stats from memory rather than RMS, which is expensive.

Picked up a change from Selva to handle the core seen

- missed in previous merge.

Change-Id: I4426b58e1fe18492f52ed577e2c38b1453feff17

Fixed external links and CSS stylesheet for the DCS docbook

Cherry picking changes submitted to proposed/0.8.3 by Susan

In the following XML source files in /dcs/src/docbkx, I updated

the external links (adding xlink:show="new") so that the links

now open in a separate window from the DCS book:

-- book.xml

-- configuration.xml

-- preface.xml

-- troubleshooting.xml

In book.xml, I removed unnecessary and confusing links from the

book's title and from the "Trafodion DCS" logo in the subtitle.

I changed the link in the Abstract so that the word "Trafodion"

links to the Trafodion wiki. I also added a missing period at

the end of that paragraph. I removed the question mark (?) from

the title "DCS" in the Overview section.

In preface.xml, I removed the link from "DCS version" to the

"Connectivity Subsystem" section in the Trafodion wiki (given

that the wiki content is subject to change, resulting in a broken

link) and replaced it with a more appropriate cross-reference to

the download site for the DCS package.

Per Arvind's advice, I updated the "Run modes" and "Example

Configurations" sections in configuration.xml to include the

alternate approach of specifying the host name and number of

servers.

I also updated the freebsd_docbook.css stylesheet in

/dcs/src/site/resources/css so that the DCS docbook automatically

appears in sans serif typeface (such as Arial), improving its

readability and look-and-feel.

(cherry picked from commit 4730742c501f5149fb453c9e7bfe5b4cc0e831c4)

Removed dos eol from freebsd_docbook.css as suggested by Susan.

Change-Id: Idd6f20123d628c7fd3a90b523af785575fa87ffe

1.DCS child server state remains as CONNECT_REJECT

DCS server STATE is listed as CONNECT_REJECT after

a failed authentication attempt. It remains stuck

in that state for 10 seconds.

Fixes Bug #1321057

Now mxosrvr state is immediately set to AVAILABLE.

2.DCS child server state is set to CONNECTED even

after user gets "*** ERROR[8837] Internal error

occurred" during authentication (e.g. due to

wrongly configured .traf_authentication_config).

Now mxosrvr state is set to AVAILABLE after the

error is returned to the user.

Change-Id: I55131a2ea6dfb362e6560c86b0398e7ba9e1cc2b

    • -31
    • +31
    /conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
Handle uninitialized variables. Fix for Bug #1361371 exposed the defect.

One of the errors seen because of the defect is during shutdown of dcs -

*** glibc detected *** mxosrvr: free(): invalid pointer: <address> ***

with a stack trace of

(gdb) bt

0 0x000000367ca328a5 in raise () from /lib64/libc.so.6

1 0x000000367ca34085 in abort () from /lib64/libc.so.6

2 0x000000367ca707b7 in __libc_message () from /lib64/libc.so.6

3 0x000000367ca760e6 in malloc_printerr () from /lib64/libc.so.6

4 0x000000000058fb12 in free_String_vector (v=0x7fffffff1770)

at SrvrConnect.cpp:122

5 0x000000000059121e in SRVR::ASTimerExpired (timer_tag=0x0)

at SrvrConnect.cpp:767

Fix is to initialize children.data to NULL.

Other changes are to make the code similar to rest of the code in

these files.

Change-Id: I441a9554a165cfb5037e064cc0fe79bfc9e158ac

    • -6
    • +9
    /conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
    • -6
    • +11
    /conn/odbc/src/odbc/nsksrvr/SrvrMain.cpp
dcsstart not starting all connections.

Closes Bug 1330578

1) Added "-n" option while doing ssh in background

2) Made selection of DCS server info port automatic to avoid port

clashes.

3) Changed default directory where PID files are stored to

$DCS_HOME/tmp. This will help in stopping dcs on systems where

/tmp is cleaned periodically.

4) Changed default HEAP_SIZE to 128M from 1000M.

5) Added newline in default conf/servers file shipped

Change-Id: Iab54849b31f3e024b885d60c34e69d6245f93207

SPJ with any result set failing with error:

*** ERROR[11237] Stored procedure <name> attempted to return

result sets but the JDBC/MX driver in the SPJ environment does

not support stored procedure result sets.

Bug 1338896

This regression was introduced when package name change was

implemented in T2. Files under sql/langman that refer to the

classes in T2 also needed the same change.

Change-Id: Iab98c30fe2bd2eb1bc11d087d16e57ac5359a821

CREATE PROCEDURE generates core (bug 1335186 - attempt 2)

Fixes bug 1335186 introduced after Directory structure change.

Previous fix handled unversioned files Vproc.cpp and Vproc.h

along with DriverInfo template file.

This fix removes generated file DriverInfo.cpp from source control.

Since the file was existing in the directory, ANT copy didn't generate

the file from template leading to the version error.

Change-Id: I4c8bd220f489805723aa6725c3884b5a923ace39

Fix for bug 1335186

Core seen during CREATE PROCEDURE.

Happended due to version mismatch between Type 2 JDBC and JNI files.

Template file had an old package name.

Change-Id: I51323059f0dc1091f841c847bf6be4bbf7a69868