Clone Tools
Constraints: committers
Constraints: files
Constraints: dates
Fix #1369853

T2 and T4 drivers return different errors if fetch/get data is issued

when cursor is after last row.

Change-Id: Ia91119b57c147e43ad5ea06fe1fd2c28ceca7c52

Merge remote branch 'origin/master' into temp-merge

    • -0
    • +14
  1. … 1 more file in changeset.
Merge branch 'master' of






Change-Id: I2589648e978c247c96f6c914e689010916b04037

  1. … 6 more files in changeset.

Change-Id: I12fb063343f7095fddd6abedd500e2683a64a911

    • -3
    • +18
    • -0
    • +14
Trafodion should record the FQDN as client_name in Repository tables

Change-Id: I5badcd05d1362785c53de2dfcac3773887de997a

To convert single quoted application name to double single-quoted strings.

Fixing for #bug 1449195.

The application name came from MS ODBC Administrator.

Change-Id: I49b31a7ba0c7c252d2858298f8ff5c2e549344aa

    • -1
    • +17
Merge remote branch 'core/master'

    • -291
    • +0
    • -57
    • +0
    • -87
    • +0
    • -489
    • +0
    • -428
    • +0
    • -2537
    • +0
    • -458
    • +0
  1. … 2810 more files in changeset.
Migrate from log4cpp to log4cxx

This change is a wholesale removal of log4cpp from source tree.

log4cxx is an external library installed via RPM, or user build

to default /usr/lib64 and /usr/include directories. Some of the

QRLogger and CommonLogger code was changed to use the new log4cxx


Change-Id: I248bac0a8ffbfea6cbc1ba847867b30638892eae

    • -1
    • +1
  1. … 205 more files in changeset.
Accidental client code delivery

Change-Id: I92c781b709fe0b876e7c738fea97bad939981eff

  1. … 2356 more files in changeset.
Copyright corrections

Put correct form of Apache License into many source files.

The file is used on Windows, and is

treated as binary on Linux. However, it is visible in

Linux with "cat", and editable with "notepad" on Windows.

In patch set 2, updated sql/regress/newregr by deleting some

unused files, updating copyrights in scripts, and removing

copyrights from front of expected test results. This is not

a final list of the changes needed, since the test suites in

the "newregr" directory need more work before they run correctly.

Change-Id: If0ea5331b822764191c839c38dfd84218612fe7a

    • binary
  1. … 333 more files in changeset.
Removed obsolete symlinks

Change-Id: I6d406654d5276da7d61a31d07dd667f13861e81f

  1. … 6 more files in changeset.
Change in T2 Driver to MT Server

To T2 Driver added public method to pass SQL data to MT Server.

It is used to get INOUT or OUT SPJ Parameters.

Changed copyright year to 2015

Converted TABs to BLANKs

Change-Id: I5991361a5b061d85b83dedba098abe4a2642e240

Repository support in MT server #2

This is the second installment of code for the repository functionality

in the DCS multi-threaded server/T2. Adding query statistics code.


This code is for compile only for now and not part of any active code path.

Most of the this is existing code from MXOSRVR side and is made to fit

into T2.

There are some temporary to-do comments in the code which shall be

removed eventually.

Change-Id: Iff4a3ec9d87ad6d3ce7c2e1882126368ce9e6d6b

    • -0
    • +18
    • -908
    • +930
    • -2
    • +2
    • -0
    • +2537
    • -0
    • +458
    • -0
    • +125
    • -1334
    • +1339
Initial version of Trafodion database manager

This has not been externalized and is untested.

Change-Id: I9c32466b94e7283087523f084ef96ebc8afa2b90

    • -0
    • +24
    • -0
    • +242
    • -0
    • +21
    • -0
    • +87
    • -0
    • +68
    • -0
    • +76
    • -0
    • +80
    • -0
    • +87
    • -0
    • +5947
  1. … 2230 more files in changeset.
Initial version of driver.

This has not been externalized and it is untested

Change-Id: I07a6d76a04fa3ef2fff4e60615ddc914b5997aaa

  1. … 111 more files in changeset.
Repository support in MT server #1

This is the first installment of code to start including repository

functionality in the DCS multi-threaded server/T2. Includes only session statistics code for now.

Note: This code is for compile only for now and not part of any active

code path.

There are some temporary to-do comments in the code which shall be removed eventually.


Patch set #2: Updated with review comments

Change-Id: Ida3689d9c0f029ebb47e6d87e670d0a4a1653480

    • -385
    • +438
    • -139
    • +159
    • -259
    • +363
    • -0
    • +66
    • -0
    • +291
    • -0
    • +57
    • -0
    • +87
    • -0
    • +491
    • -0
    • +428
    • -1842
    • +1849
    • -147
    • +151
Batch inserts for varchar columns > 32k failing with exception

The message id: batch_command_failed

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


at TestBigCol.JDBCBigColBatch1(

Temporary fix - will be changed to use vcindlen later.

Changes from the following commit needed, along with this mxosrvr


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

Handled one of the review comments in 1714.

Change-Id: I52e6d9380fa569b50a5f97c71f3cbef524a165c9

    • -14
    • +42
  1. … 1 more file in changeset.
Handled input params that are larger than 32K

Fixed bug 1455670 insert using params to varchar column of > 32k colsize


Change-Id: Id84f82f61572e7210a7a8198d630ac51ecddc974

Fix a double free when close a connection

The Driver will free the sqlError when then connection is closed. So the

code free the sqlError after throwSQLException() should be removed.

Change-Id: I6d33b184b86c91e25a8510cb8168c05abb74e71e

    • -10
    • +0
Fix for bug #1433926 ,bug #1435995 and bug #1443784

When type=aggregated :

1.Publish query stats ,only if executes > limit.

2.Publish all query stats if limit=0.

3.Don't publish query stats if limit<0.

4.Publish aggregation stats according to the interval.

When some parameters are minus ,the program would take the negative sign as the beginning of last option.That will result the program hang .The change fixing the issue also.That is bug #1443784.

Change-Id: Ie08f1fc566c2503f90e8566a4e80265a7bea1d8f

    • -3
    • +2
    • -20
    • +48
    • -41
    • +17
Move core into subdir to combine repos

    • -573
    • +0
    • -509
    • +0
    • -127
    • +0
  1. … 10754 more files in changeset.
Move core into subdir to combine repos

    • -573
    • +0
    • -509
    • +0
    • -127
    • +0
    • -1131
    • +0
  1. … 10608 more files in changeset.
Move core into subdir to combine repos

Use: git log --follow -- <file>

to view file history thru renames.

    • -573
    • +0
    • -509
    • +0
    • -127
    • +0
  1. … 10823 more files in changeset.
Changes in Patchset2

Fixed issues found during review.

Most of the changes are related to disbling this change for unique indexes.

When a unique index is found, they alone are disabled during the load.

Other indexes are online and are handled as described below. Once the base

table and regular indexes have been loaded, unique indexes are loaded from

scratch using a new command "populate all unique indexes on <tab-name>".

A simlilar command "alter table <tab-name> disable all unique indexes"

is used to disable all unique indexes on a table at the start of load.

Cqd change setting allow_incompatible_assignment is unrelated and fixes an

issue related to loading timestamp types from hive.

Odb change gets rid of minor warnings.

Thanks to all three reviewers for their helpful comments.


Adding support for incremental index maintenance during bulk load.

Previously when bulk loading into a table with indexes, the indexes are first

disabled, base table is loaded and then the indexes are populated from

scratch one by one. This could take a long time when the table has significant

data prior to the load.

Using a design by Hans this change allows indexes to be loaded in the same

query tree as the base table. The query tree looks like this




/ \

Sort Traf_load_prep (into index1)





/ \

Sort Traf_load_prep (i.e. bulk insert) (into base table)




Hive scan

This design and change set allows multiple indexes to be on the same tree.

Only one index is shown here for simplicity. LOAD CLEANUP and LOAD COMPLETE

statements also now perform these tasks for the base table along with all

enabled indexes

This change is enabled by default. If a table has indexes it will be

incrementally maintained during bulk load.

The WITH NO POPULATE INDEX option has been removed

A new option WITH REBUILD INDEXES has been added. With this option we get

the old behaviour of disabling all indexes before load into table and

then populate all of them from scratch.

Change-Id: Ib5491649e753b81e573d96dfe438c2cf8481ceca

  1. … 34 more files in changeset.
Bug #1421081

JDBC Driver can't working

while it has contained prefix /*xxx*/

in SQL Statement

Change-Id: I462889ae300187aabe9433d56bf97957ddd1f9bc

Publishing properties added to T2 Driver

followingpublishing properties have been added:

statisticsIntervalTime default value 60 seconds

statisticsLimitTime default value 60 seconds

statisticsType default value aggregated

programStatisticsEnabled default value true

statisticsSqlPlanEnabled default value true

this change (1685) and the corresponding DCS change (1686) are



Fixed reported issues

Change-Id: I7fc5380742a6d8a8a21b3f58b79288fb5ec2653a

    • -922
    • +937
Support big column larger than 32k for JBDC T2

[bug 1451707]Call function failed when expect to select 200k utf8

column size from a table.

[bug 1451693]T2 server return trunctated column size to T2 client.

Change-Id: Icb2b9a9089c17d4c8e64c4af0c68468efbcd19a3

    • -31
    • +74
    • -1
    • +1
    • -5
    • +14
  1. … 1 more file in changeset.
various lp and other fixes, details below.

-- added support for self referencing constraints

-- limit clause can now be specified as a param

(select * from t limit ?)

-- lp 1448261. alter table add identity col is not allowed and now

returns an error

-- error is returned if a specified constraint in an alter/create statement

exists on any table

-- lp 1447343. cannot have more than one identity columns.

-- embedded compiler is now used to get priv info during invoke/showddl.

-- auth info is is not reread if already initialized

-- sequence value function is now cacheable

-- lp 1448257. inserts in volatile table with identity column now work

-- lp 1447346. inserts with identity col default now work if inserted

in a salted table.

-- only one compiler is now needed to process ddl operations with or

without authorization enabled

-- query cache in embedded compiler is now cleared if user id changes

-- pre-created default schema 'SEABASE' can no longer be dropped

-- default schema 'SCH' is automatically created if running regressions

and it doesn't exist.

-- improvements in regressions run.

-- regressions run no longer call a script from another sqlci session

to init auth, create default schema

and insert into defaults table before every regr script

-- switched the order of regression runs

-- updates from review comments.

Change-Id: Ifb96d9c45b7ef60c67aedbeefd40889fb902a131

    • -22
    • +27
  1. … 68 more files in changeset.
fix for 1452993

[bug 1452993] T2 don't read the property file from System Properties but

T4 do it.

After this check-in, user can use System.setProperty("properties", file)

to give the driver a default perperty file as T4.

Change-Id: If5f669af86612a99b2eb53093d9fa8492249a000

Using the language manager for UDF compiler interface

blueprint cmp-tmudf-compile-time-interface

This change includes new CLI calls, to be used in the compiler to

invoke routines. Right now, only trusted routines are supported,

executed in the same process as the caller, but in the future we may

extend this to isolated routines. Using a CLI call allows us to share

the language manager between compiler and executor, since language

manager resources such as the JVM and loaded DLLs exist only once per

process. This change is in preparation for Java UDFs.

Changes in a bit more detail:

- Added 4 new CLI calls to allocate a routine, invoke it, retrieve

updated invocation and plan infos and deallocate (put) the routine.

The CLI globals now have a C/C++ and a Java language manager that

is allocated on demand.

- The compiler no longer loads a DLL for the UDF compiler interface,

it uses the new CLI calls instead.

- DDL syntax is changed to allow TMUDFs in Java (not officially

supported, so don't use it quite yet).

- TMUDFs in C are no longer supported, only C++ and Java are.

Converted remaining TMUDF tests to C++.

- C++ TMUDFs now do a basic verification at DDL time, so errors

like missing entry points are detected earlier. Validation for

Java TMUDFs is also done through the CLI.

- Make sure we have no memory or resource leaks:

- CmpContext keeps track of UDF-related objects allocated on

system heap and in the CLI, cleaned up at the end of a statement

- CLI keeps a list of allocated trusted routines, cleaned up

when a CLI context is deallocated

- Using ExeCliInterface class to make the new CLI calls (4 new calls


- Removed CmpCli class in the optimizer directory and converted

tracking compiler to use ExeCliInterface as well.

- Compile-time parameter values are no longer baked into the

UDRInvocationInfo. Instead, they are provided as an input row, the

same way as they are provided at runtime.

- Bug fixes in C++ UDR code, mostly related to serialization and

to multiple interactions with the UDF through serialized objects.

- Added more info to UDRInvocationInfo (SQL access type, etc.).

- Since there are multiple plans per invocation, each of which

can have multiple interactions with the UDF, plans need to be

numbered so the UDF side can tell them apart to attach the

right state (owned by the UDF) to it.

- The language manager needs some functions that are provided by

the process it's running in. Added those (empty, for now) functions

as cli/CliImplLmExtFunc.cpp.

- Added a new class for Java TMUDFs, LmRoutineJavaObj. Added methods

to allocate such routines and to load their class as well as to

create Java objects by invoking the default constructor through JNI.

- Java TMUDFs use the new UDR interface (to be provided by Suresh and

Pavani). In the language manager, the container is the class of

the UDF, the external path is the fully qualified jar name. The

Java method name is <init>, the default constructor, with signature

"()V". Some code changes were required to do this.

- Created a new directory trafodion/core/sql/src for Java sources in

the sql engine. Right now, only language manager java

sources are in this directory, but I am planning to move the other

java sources under sql in a future checkin. Suresh and Pavani

will add their UDF-related Java files there as well.

- Renamed the udr jar to trafodion-sql-<version>.jar, in anticipation

of combining all the sql Java sources into this jar.

- Created a maven project file trafodion/core/sql/pom.xml and

changed makefiles to invoke maven to build java sources.

- More work to separate new UDR interface from older SPInfo object,

so that we can get rid of SPInfo if/when we don't support the older

style anymore.

- Small fix to odb makefile, make clean failed when executed twice.

Patch set 2: Adding a custom filter for test regress/udr/TEST108.

Change-Id: Ic827a42ac25505fb1ee451b79636c0f9349d8841

  1. … 98 more files in changeset.