Trafodion

Clone Tools
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Preventing user CQDs from affecting metadata queries

We now won't pass user CQDs to new CmpContext instance (CI) during

embedded CI switch. This is to prevent metadata query plans

being influenced by user CQDs unintentionally. Also, temporarily added a

flag to retrieve the latest hbase snapshot info for user tables

disrespect to whether we use the snapshots for scan or not. The CQD

TRAF_TABLE_SNAPSHOT_SCAN will only affect the user query plan

generations.

Reworked LP 1420826, Turning off nested_joins fails meta-data query

compilation, by reverting the changes because when compiling the

metadata queries, the default optimization level would be '3' and won't

be affected by user setting anymore.

LP 1426479: Row mismatch between index/table cause init auth to fail.

Fixed LP 1411355: User-level CQDs also seem to apply to metadata

queries.

Change-Id: Idd0388b626ecd3dbf3c3d1e75c1d6dc30b0ce021

    • -67
    • +77
    /sql/regress/compGeneral/EXPECTED042
    • -3
    • +29
    /sql/sqlcomp/CmpSeabaseDDLcommon.cpp
LP bug 1435479. Explain query looping.

in current code, executor buffer for returned explain row

was hardcoded at 4K. That caused no buffer to be found if

explain description column value was greater

than 3000(the default). Executor would go in a loop

trying to find space in sql buffer.

In this case, query text caused total explain len

to become greater than the buffer size.

It has been fixed to compute buffer len based on the

returned explain virtual table row size.

Change-Id: I33a806d4baffb18f4311e1320f8af1b759ea5863

Fixes for a few scalar UDF bugs

LP 1426605: change in NormRelExpr.cpp. When left linearizing a join backbone

sufficients inputs were not being provided. The change ensures that inputs

from the old tree and still marked as required inputs for a node in the new

tree.

LP 1420530: Error handling added to BiArith::bindNode.

LP 1420938: Error handling to CREATE FUNCTION statement to flag more than 32

parameters.

LP 1421438: showddl [function | procedure | table_mapping function] <name>;

now works. If one of the optional tokens is not specified then we will look

for a table called <name>.

Patch Set 1

Changes to address comments by Dave.

One more fix in ExUdr.cpp. There is no LP for this bug. If a dll is missing

at runtime or other LOAD errors during UDF fixup could lead to an assertion,

since we try to place an error in UDF's up queue, before there are entries

in the corresponding down queue. Fix is to remove this line and let existing

error handling report this error. Thanks for your help Hans.

Couple of items that I forgot to mention before

1) Changes in Analyzer.cpp related to printing predecessorJBBC are due to Hans.

2) Showddl code is mostly refactored from previous versions.

Change-Id: Idfde89d73c47735c4405befa6b9cdd4ae0d2e641

    • -0
    • +10
    /sql/sqlcomp/CmpSeabaseDDLroutine.cpp
Miscellaneous DDL and security bug fixes

Fixed a testware issue with fullstack2/TEST062 that occurred during

release testing

Bug 1415196 - Alter volatile table add column cores at CmpSeabaseDDL::alterSeabaseTableAddColumn()

Added a check to not allow add or drop column for volatile tables:

- sqlcomp/CmpSeabaseDDLtable.cpp

Bug 1415232 - A failed create view causes a volatile table to disappear

The code to bind a view does not correctly reset the volatile schema in use

session parameter in case of an error. Subsequent calls do not check for

volatile objects.

parser/BindStmtDDL.cpp

Bug 1371265 - should not allow grants to DB__ROOT or current user

Added a check at grant to prevent this

- sqlcomp/PrivMgrPrivileges.cpp

Bug 1392491 - Unavailability of privmgr metadata error is incomplete

If not all the privmgr metadata is available, then a new Compile context

flag called IS_AUTHORIZATION_READY is set. This flag is adjusted when

a new compiler context is started, and when authorization is enabled and

disabled.

When isAuthorizationEnabled is called and authorization is incomplete,

error 1234 is now returned by default.

After coding changes were added, a request to not check all privmgr metadata

table at context startup was requseted - a performance concern. Fix was

changed to check all tables for debug builds but check only one table for

release builds. If the performance problem is fixed, then we can go back

and check for all privmgr tables.

- arkcmp/CmpContext.h

- arkcmp/CmpContext.cpp

- sqlcomp/CmpSeabaseDDLcommon.cpp

- sqlcomp/nadefaults.cpp

Bug 1402009 - DB__ROOT is unable to grant privilege on object in private schema

When DB__ROOT executes a grant or revoke on objects it does not own, need to

change the grantor from DB__ROOT to the object owner. This matches the same

behavior for other DDL operations such as CREATE.

As part of this fix, the GRANTED BY clause is now allowed for GRANT

statements but it won't be complete until LP bug 1414225 is done.

- sqlcomp/CmpSeabaseDDLtable.cpp (seabaseGrantRevoke)

- sqlcomp/PrivMgrCommands.h

- sqlcomp/PrivMgrCommands.cpp

- sqlcomp/PrivMgrPrivileges.h

- sqlcomp/PrivMgrPrivileges.cpp

- sqlcomp/PrivMgrMD.h

Bug 1414125 - User without priv can view data in metadata tables

Fixes were in place for all metadata tables except the privmgr metadata

tables. The priv information was always being set to none in setupPrivInfo

(NATable) and revoking a privilege was not correctly removing privilege

information from object_privileges.

- optimizer/NATable.cpp

- sqlcomp/PrivMgrCommands.cpp

Bug - create library checking privileges when authorization is not enabled

- CmpSeabaseDDLroutine.cpp

Enhanced the sqlci env command:

- alphabetize the output

- add the following information

-- authentication status

-- authorization status

-- external (LDAP) user connected

A new session parameter called SESSION_EXTERNAL_USER_NAME was added to return

the external user name connected.

A new cli request called SQL_EXEC_GetAuthState_Internal was written to return

the authentication & authorization status. Code was also added, but not yet

supported, for auditing status.

Renamed member/methods that use ldap to external

Changed sqlci env command to return new format

- cli/sqlcli.h

- cli/SQLCLIdev.h

- cli/CliExtern.cpp

- cli/Cli.h

- cli/Cli.cpp

- cli/Context.h

- cli/Context.cpp

- qmscommon/QRQueries.cpp

- sqlci/SqlciEnv.h

- sqlci/SqlciEnv.cpp

- regress/fullstack2/EXPECTED062.SB

- regress/funnstack2/DIFF062.KNOWN.SB.OS

Change-Id: I04627435a0e644c6b14bbf6bd8aa1162d81224fb

    • -24
    • +36
    /sql/regress/fullstack2/EXPECTED062.SB
  1. … 13 more files in changeset.
Merge "Added dummy link to update phandle"

Merge "tm id server - part-II."

Merge "changed default schema to TRAFODION.SEABASE"

Added dummy link to update phandle

Change-Id: Idb3b9225774a69f4fd12e7e5e6b56c181f9ee43a

Merge "Fix for thread/memory leak on table create/drop"

Merge "Add missing ignore directives for recently added build output"

Optimization for stateless put, remove dead code

Change-Id: Ieec94c4615ff9779d9368c65faecaf4548039f01

Merge "Initial changes for SSCC stateless put"

Fix child/parent query IDs for update stats

Failure to setup child/parent query IDs for update stats and

other non-embedded compiler scenarios caused problems in cancel

including frequest but intermittent failure of executor/TEST106.

This change fixes the problem.

Change-Id: I0d6b80aeddf9906f08d3dab09f9775414ea7bfc3

Closes-Bug: #1404963

    • -170
    • +176
    /sql/regress/executor/EXPECTED106
tm id server - part-II.

Change-Id: Ie92fe02f8ceafe91f32279dd09044e9f2a336364

    • -0
    • +21
    /sqf/src/seabed/test/go284
    • -0
    • +32
    /sqf/src/seabed/test/go284j
    • -0
    • +87
    /sqf/src/seabed/test/goshell284
    • -0
    • +93
    /sqf/src/seabed/test/t284.h
    • -0
    • +37
    /sqf/src/seabed/test/t284cb.java
    • -0
    • +160
    /sqf/src/seabed/test/t284cli.cpp
    • -0
    • +169
    /sqf/src/seabed/test/t284cli.java
    • -0
    • +361
    /sqf/src/seabed/test/t284clicom.h
    • -0
    • +38
    /sqf/src/seabed/test/t284exc.java
    • -0
    • +34
    /sqf/src/seabed/test/t284id.java
    • -0
    • +220
    /sqf/src/seabed/test/t284lib.cpp
    • -0
    • +311
    /sqf/src/seabed/test/t284srv.cpp
  1. … 13 more files in changeset.
New and updated repository columns

Repository column changes...

"_REPOS_".METRIC_QUERY_TABLE

Added:

QUERY_STATUS

QUERY_SUB_STATUS --> for future use

----------------------------------------------------

"_REPOS_".METRIC_QUERY_AGGR_TABLE;

Added:

SESSION_START_UTC_TS

AGGREGATION_LAST_UPDATE_UTC_TS

AGGREGATION_LAST_ELAPSED_TIME

TOTAL_DDL_STMTS --> Falls under OTHER category since no

corresponding sql type exists today

TOTAL_UTIL_STMTS

TOTAL_CATALOG_STMTS

TOTAL_OTHER_STMTS

TOTAL_INSERT_ERRORS

TOTAL_DELETE_ERRORS

TOTAL_UPDATE_ERRORS

TOTAL_SELECT_ERRORS

TOTAL_DDL_ERRORS

TOTAL_UTIL_ERRORS

TOTAL_CATALOG_ERRORS

TOTAL_OTHER_ERRORS

DELTA_DDL_STMTS

DELTA_UTIL_STMTS

DELTA_CATALOG_STMTS

DELTA_OTHER_STMTS

DELTA_INSERT_ERRORS

DELTA_DELETE_ERRORS

DELTA_UPDATE_ERRORS

DELTA_SELECT_ERRORS

DELTA_DDL_ERRORS

DELTA_UTIL_ERRORS

DELTA_CATALOG_ERRORS

DELTA_OTHER_ERRORS

Deleted:

AGGREGATION_START_UTC_TS

Updated:

DELTA_NUM_ROWS_IUD

Note: These columns were already added to the insert/update statements as

part of Anoop's earlier commit.

Packed explain plan to follow soon.

Change-Id: I268d1d24a8886ba1f0dc6181e1f0a65e53143fac

    • -7
    • +35
    /conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
    • -0
    • +3
    /conn/odbc/src/odbc/nsksrvrcore/csrvrstmt.cpp
    • -0
    • +2
    /conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
Merge "hive/test018 fixes"

Merge "New ustat algorithm and bulk load integration"

changed default schema to TRAFODION.SEABASE

Change-Id: I2d079ed749c0a8110629d23710479f1f7892f9bf

    • -1
    • +1
    /conn/jdbc_type2/native/SqlInterface.cpp
    • -2
    • +2
    /conn/jdbc_type2/native/SrvrOthers.cpp
Fix for thread/memory leak on table create/drop

Objects that were put into our shared map between

coprocessors were not being removed. This change

adds a remove of the objects on a postClose() of

the region. A local thread was not being stopped

which lead to the TrxRegionEndpoint,TrxRegionObserver

and the thread itself not being GC'd as there was

still a reference.

Change-Id: Idaf3788d4a0b2065b93ec8746e3ea814615180b0

Merge "Transactions for DDL, Abort and Commit processing."

Merge "fix LP1420826 NJ off fails meta query compilation"

Merge "Phase5-DDLTransactions, SQL and TM changes"

Merge "Local Hadoop JDBC test script and test_env short-circuit"

Merge "Code review changes."

Merge "Squashed commit of the following:"

Initial changes for SSCC stateless put

Change-Id: I899c537548b09eb2d860063cd47a837769c00962

Merge "Getting a scanner from the correct table"

hive/test018 fixes

Disabling select from hive table emporarily to avoid the hang issue

(there is an LP 1436333 for the hang issue) and let the test finish.

Change-Id: Idfe5b1a980a169b4b7da8db18717ada0a23eb105

Merge "PHASE3&4- Transactional DDL - TM, RM, TMlib and JNI changes for create"

Merge "Avoid calling ResStatisticsStatement::start if stats is disabled."