[GitHub] trafodion pull request #1608: jira TRAFODION-1782 Auto assignment of NOT NUL...
Github user zellerh commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1608#discussion_r195274939 --- Diff: core/sql/sqlcomp/CmpSeabaseDDLtable.cpp --- @@ -8047,14 +8149,36 @@ void CmpSeabaseDDL::alterSeabaseTableAddPKeyConstraint( if (cliRC < 0) { cliInterface.retrieveSQLDiagnostics(CmpCommon::diags()); + + goto label_return; } str_sprintf(cqdbuf, "cqd traf_create_table_with_uid '' ;"); cliInterface.executeImmediate(cqdbuf); - if (cliRC < 0) + str_sprintf(cqdbuf, "cqd traf_no_hbase_drop_create 'OFF';"); + cliInterface.executeImmediate(cqdbuf); + + if (NOT isEmpty) // non-empty table { - return; + // remove NATable so current definition could be loaded + ActiveSchemaDB()->getNATableDB()->removeNATable +(cn, + ComQiScope::REMOVE_FROM_ALL_USERS, + COM_BASE_TABLE_OBJECT, + alterAddConstraint->ddlXns(), FALSE); + + // copy tempTable data into newly created table + str_sprintf(buf, "insert with no rollback into %s select * from %s", --- End diff -- A general question, this also happens in the existing code: When we make a copy of a table in a DDL operation, do we need to make sure that nobody writes data into the table? If there are inserts or updates, what would happen? Could the DDL operation fail with a conflict, or would we potentially lose that data? ---
[GitHub] trafodion pull request #1608: jira TRAFODION-1782 Auto assignment of NOT NUL...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/trafodion/pull/1608 jira TRAFODION-1782 Auto assignment of NOT NULL attr to primary key cols details in jira. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/trafodion ansharma_nnpk_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/trafodion/pull/1608.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 #1608 commit 5724b2e6c1b2a955ee4ab4cd6a582d1d74fd1003 Author: Anoop Sharma Date: 2018-06-04T18:07:45Z nonnull pkey, commit #1 commit ba15b2e37c20d2fdc11340e826045c9ce0950571 Author: Anoop Sharma Date: 2018-06-11T17:14:40Z Merge remote branch 'origin/master' into ansharma_nnpk_br Conflicts: core/sql/regress/seabase/EXPECTED031 core/sql/sqlcomp/CmpDescribe.cpp core/sql/sqlcomp/CmpSeabaseDDLtable.cpp core/sql/sqlcomp/DefaultConstants.h commit bc77872838d0e42766e0e54b7a5c3d2139bb7a5b Author: Anoop Sharma Date: 2018-06-11T17:15:00Z Merge remote branch 'origin/master' into ansharma_nnpk_br commit a5eb0b26465fce538b2b5c1e054cdc42aa7423ff Author: Anoop Sharma Date: 2018-06-13T23:22:18Z jira TRAFODION-1782 Auto assignment of NOT NULL attr to primary key columns. details in jira. regress/seabase/TEST032 has new tests for this enhancement. ---
[GitHub] trafodion pull request #1604: Trafodion 2884
Github user zcorrea commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1604#discussion_r195174647 --- Diff: core/sqf/sqenvcom.sh --- @@ -673,17 +673,31 @@ export SQ_LUNMGR_VERBOSITY=1 # Control SQ default startup behavior (c=cold, w=warm, if removed sqstart will autocheck) export SQ_STARTUP=r -# Monitor process creator: +# +# NOTE: in a Python installation when SQ_MON_RUN_MODE below +# is AGENT the SQ_MON_CREATOR must be MPIRUN +# # MPIRUN - monitor process is created by mpirun -# Uncomment SQ_MON_CREATOR when running monitor in AGENT mode +#(meaning that mpirun is the parent process of the monitor process) +# AGENT - monitor process runs in agent mode versus MPI collective +# +# Uncomment the next four environment variables #export SQ_MON_CREATOR=MPIRUN - -# Monitor process run mode: -# AGENT - monitor process runs in agent mode versus MPI collective -# Uncomment the three environment variables below #export SQ_MON_RUN_MODE=AGENT -#export MONITOR_COMM_PORT=23399 -#export MONITOR_SYNC_PORT=23398 +#export MONITOR_COMM_PORT=23390 +#export MONITOR_SYNC_PORT=23380 + +# +# NAME-SERVER - to disable process replication and enable the name-server +# +# Uncomment the next environment variable +#export SQ_NAMESERVER_ENABLED=1 +if [[ "$SQ_NAMESERVER_ENABLED" == "1" ]]; then + export NS_COMM_PORT=23370 + export NS_SYNC_PORT=23360 + export NS_M2N_COMM_PORT=23350 + export MON2MON_COMM_PORT=23340 +fi --- End diff -- I'll fix this. Thanks! ---
[GitHub] trafodion pull request #1604: Trafodion 2884
Github user svarnau commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1604#discussion_r195160478 --- Diff: core/sqf/sqenvcom.sh --- @@ -673,17 +673,31 @@ export SQ_LUNMGR_VERBOSITY=1 # Control SQ default startup behavior (c=cold, w=warm, if removed sqstart will autocheck) export SQ_STARTUP=r -# Monitor process creator: +# +# NOTE: in a Python installation when SQ_MON_RUN_MODE below +# is AGENT the SQ_MON_CREATOR must be MPIRUN +# # MPIRUN - monitor process is created by mpirun -# Uncomment SQ_MON_CREATOR when running monitor in AGENT mode +#(meaning that mpirun is the parent process of the monitor process) +# AGENT - monitor process runs in agent mode versus MPI collective +# +# Uncomment the next four environment variables #export SQ_MON_CREATOR=MPIRUN - -# Monitor process run mode: -# AGENT - monitor process runs in agent mode versus MPI collective -# Uncomment the three environment variables below #export SQ_MON_RUN_MODE=AGENT -#export MONITOR_COMM_PORT=23399 -#export MONITOR_SYNC_PORT=23398 +#export MONITOR_COMM_PORT=23390 +#export MONITOR_SYNC_PORT=23380 + +# +# NAME-SERVER - to disable process replication and enable the name-server +# +# Uncomment the next environment variable +#export SQ_NAMESERVER_ENABLED=1 +if [[ "$SQ_NAMESERVER_ENABLED" == "1" ]]; then + export NS_COMM_PORT=23370 + export NS_SYNC_PORT=23360 + export NS_M2N_COMM_PORT=23350 + export MON2MON_COMM_PORT=23340 +fi --- End diff -- Yes ---
[GitHub] trafodion pull request #1604: Trafodion 2884
Github user zcorrea commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1604#discussion_r195155067 --- Diff: core/sqf/sqenvcom.sh --- @@ -673,17 +673,31 @@ export SQ_LUNMGR_VERBOSITY=1 # Control SQ default startup behavior (c=cold, w=warm, if removed sqstart will autocheck) export SQ_STARTUP=r -# Monitor process creator: +# +# NOTE: in a Python installation when SQ_MON_RUN_MODE below +# is AGENT the SQ_MON_CREATOR must be MPIRUN +# # MPIRUN - monitor process is created by mpirun -# Uncomment SQ_MON_CREATOR when running monitor in AGENT mode +#(meaning that mpirun is the parent process of the monitor process) +# AGENT - monitor process runs in agent mode versus MPI collective +# +# Uncomment the next four environment variables #export SQ_MON_CREATOR=MPIRUN - -# Monitor process run mode: -# AGENT - monitor process runs in agent mode versus MPI collective -# Uncomment the three environment variables below #export SQ_MON_RUN_MODE=AGENT -#export MONITOR_COMM_PORT=23399 -#export MONITOR_SYNC_PORT=23398 +#export MONITOR_COMM_PORT=23390 +#export MONITOR_SYNC_PORT=23380 + +# +# NAME-SERVER - to disable process replication and enable the name-server +# +# Uncomment the next environment variable +#export SQ_NAMESERVER_ENABLED=1 +if [[ "$SQ_NAMESERVER_ENABLED" == "1" ]]; then + export NS_COMM_PORT=23370 + export NS_SYNC_PORT=23360 + export NS_M2N_COMM_PORT=23350 + export MON2MON_COMM_PORT=23340 +fi --- End diff -- Is the '-' part of the syntax? ---
[GitHub] trafodion pull request #1605: [TRAFODION-3104] Add Syntax Descriptions for *...
Github user robertamarton commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1605#discussion_r195132039 --- Diff: docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc --- @@ -5268,95 +5268,99 @@ displays a list of all the existing components. displays the names of all the user-defined functions (UDFs) in the catalog and schema of the current session. By default, the catalog is TRAFODION, and the schema is SEABASE. -* `FUNCTIONS FOR LIBRARY \[[_catalog-name_.]_schema-name_.]_library-name_` +* `FUNCTIONS FOR LIBRARY _[[catalog-name.]schema-name.]library-name_` + displays the UDFs that reference the specified library. -* `functions in schema [_catalog-name_.]_schema-name_` +* `FUNCTIONS [IN SCHEMA _[catalog-name.]schema-name_` + displays the names of all the UDFs in the specified schema. -* `libraries` +* `LIBRARIES` + displays the names of all the libraries in the catalog and schema of the current session. By default, the catalog is trafodion, and the schema is seabase. -* `libraries in schema [_catalog-name_.]_schema-name_` +* `LIBRARIES [IN SCHEMA _[catalog-name.]schema-name_` + displays the libraries in the specified schema. -* `procedures` +* `PROCEDURES` + displays the names of all the procedures in the catalog and schema of the current session. By default, the catalog is trafodion, and the schema is seabase. -* `procedures for library \[[_catalog-name_.]_schema-name_.]_library-name_` +* `PROCEDURES FOR LIBRARY for _[[catalog-name.]schema-name.]library-name_` + displays the procedures that reference the specified library. -* `procedures in schema [_catalog-name_.]_schema-name_` +* `PROCEDURES [IN SCHEMA _[catalog-name.]schema-name_` + displays the names of all the procedures in the specified schema. -* `roles` +* `ROLES` + displays a list of all the existing roles. -* `roles for user _database-username_` +* `ROLES [FOR USER _database-username_]` + displays all the roles that have been granted to the specified database user. The _database-username_ can be a regular or delimited case-insensitive identifier. see <>. -* `schemas` +* `SCHEMAS` + displays the names of all the schemas in the catalog of the current session. By default, the catalog is trafodion. -* `schemas in catalog _catalog-name_` +* `SCHEMAS [IN CATALOG _catalog-name_]` + displays the names of all the schemas in the specified catalog. For the _catalog-name_, you can specify only trafodion. -* `schemas for [user | role] _authorization-id_` +* `SCHEMAS FOR [USER | ROLE] _authorization-id_` + displays all the schemas managed (or owned) by a specified user or role. -* `_authorization-id_` +** `_authorization-id_` + is the name of a user or role. you may specify either user or role for users or roles. -* `tables` +* `TABLES` + displays the names of all the tables in the catalog and schema of the current session. By default, the catalog is trafodion, and the schema is seabase. -* `tables in schema [_catalog-name_.]_schema-name_` +* `TABLES [IN SCHEMA _[catalog-name.]schema-name_` + displays the names of all the tables in the specified schema. -* `users` +* `USERS` + displays a list of all the registered database users. -* `users for role _role-name_` +* `USERS [FOR ROLE _role-name_]` + displays all the database users who have been granted the specified role. The _role-name_ can be a regular or delimited case-insensitive identifier. For more information, see <>. <<< -* `views` +* `VIEWS` + displays the names of all the views in the catalog and schema of the current session. By default, the catalog is trafodion, and the schema is seabase. -* `views in schema [_catalog-name_.]_schema-name_` +* `VIEWS [IN SCHEMA _[catalog-name.]schema-name_` + displays the names of all the views in the specified schema. For the _catalog-name_, you can specify only trafodion. -* `views on table \[[_catalog-name_.]_schema-name_.]_table-name_` +* `VIEWS ON TABLE _[[catalog-name.]schema-name.]table-name_` + displays the names of all the views that were created for the specified table. If you do not qualify the table name with catalog and schema names, get uses the catalog and schema of the current session. For the _catalog-name_, you can specify only trafodion. +* `PRIVILEGES FOR {USER _database-username_ | ROLE _role-name_}` ++ +displays all privileges for a specified user or role. + --- End diff -- Consistency, the other commands you did
[GitHub] trafodion pull request #1605: [TRAFODION-3104] Add Syntax Descriptions for *...
Github user robertamarton commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1605#discussion_r195129619 --- Diff: docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc --- @@ -5268,95 +5268,99 @@ displays a list of all the existing components. displays the names of all the user-defined functions (UDFs) in the catalog and schema of the current session. By default, the catalog is TRAFODION, and the schema is SEABASE. -* `FUNCTIONS FOR LIBRARY \[[_catalog-name_.]_schema-name_.]_library-name_` +* `FUNCTIONS FOR LIBRARY _[[catalog-name.]schema-name.]library-name_` + displays the UDFs that reference the specified library. -* `functions in schema [_catalog-name_.]_schema-name_` +* `FUNCTIONS [IN SCHEMA _[catalog-name.]schema-name_` + displays the names of all the UDFs in the specified schema. -* `libraries` +* `LIBRARIES` + displays the names of all the libraries in the catalog and schema of the current session. By default, the catalog is trafodion, and the schema is seabase. -* `libraries in schema [_catalog-name_.]_schema-name_` +* `LIBRARIES [IN SCHEMA _[catalog-name.]schema-name_` + displays the libraries in the specified schema. -* `procedures` +* `PROCEDURES` + displays the names of all the procedures in the catalog and schema of the current session. By default, the catalog is trafodion, and the schema is seabase. -* `procedures for library \[[_catalog-name_.]_schema-name_.]_library-name_` +* `PROCEDURES FOR LIBRARY for _[[catalog-name.]schema-name.]library-name_` + displays the procedures that reference the specified library. -* `procedures in schema [_catalog-name_.]_schema-name_` +* `PROCEDURES [IN SCHEMA _[catalog-name.]schema-name_` + displays the names of all the procedures in the specified schema. -* `roles` +* `ROLES` + displays a list of all the existing roles. -* `roles for user _database-username_` +* `ROLES [FOR USER _database-username_]` + displays all the roles that have been granted to the specified database user. The _database-username_ can be a regular or delimited case-insensitive identifier. see <>. -* `schemas` +* `SCHEMAS` + displays the names of all the schemas in the catalog of the current session. By default, the catalog is trafodion. -* `schemas in catalog _catalog-name_` +* `SCHEMAS [IN CATALOG _catalog-name_]` + displays the names of all the schemas in the specified catalog. For the _catalog-name_, you can specify only trafodion. -* `schemas for [user | role] _authorization-id_` +* `SCHEMAS FOR [USER | ROLE] _authorization-id_` + displays all the schemas managed (or owned) by a specified user or role. -* `_authorization-id_` +** `_authorization-id_` + is the name of a user or role. you may specify either user or role for users or roles. -* `tables` +* `TABLES` + displays the names of all the tables in the catalog and schema of the current session. By default, the catalog is trafodion, and the schema is seabase. -* `tables in schema [_catalog-name_.]_schema-name_` +* `TABLES [IN SCHEMA _[catalog-name.]schema-name_` + displays the names of all the tables in the specified schema. -* `users` +* `USERS` + displays a list of all the registered database users. -* `users for role _role-name_` +* `USERS [FOR ROLE _role-name_]` + displays all the database users who have been granted the specified role. The _role-name_ can be a regular or delimited case-insensitive identifier. For more information, see <>. <<< -* `views` +* `VIEWS` + displays the names of all the views in the catalog and schema of the current session. By default, the catalog is trafodion, and the schema is seabase. -* `views in schema [_catalog-name_.]_schema-name_` +* `VIEWS [IN SCHEMA _[catalog-name.]schema-name_` + --- End diff -- Need an ending "]" ---
[GitHub] trafodion pull request #1606: [TRAFODION-3105] DatabaseMetaData.getColumns s...
Github user mashengchen commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1606#discussion_r195020882 --- Diff: core/sqf/sqenvcom.sh --- @@ -40,12 +40,12 @@ export TRAFODION_VER="${TRAFODION_VER_MAJOR}.${TRAFODION_VER_MINOR}.${TRAFODION_ export PRODUCT_COPYRIGHT_HEADER="2015-2017 Apache Software Foundation" ## # Trafodion authentication: -#Set TRAFODION_ENABLE_AUTHENTICATION to YES to enable +#Set TRAFODION_ENABLE_AUTHENTICATION=NO # authentication in the Trafodion environment. # LDAP configuration must also be setup--see # $TRAF_HOME/sql/scripts/traf_authentication_config for details. ## -export TRAFODION_ENABLE_AUTHENTICATION=${TRAFODION_ENABLE_AUTHENTICATION:-NO} +export TRAFODION_ENABLE_AUTHENTICATION=NO --- End diff -- sorry, wrong for git add ---
[GitHub] trafodion pull request #1606: [TRAFODION-3105] DatabaseMetaData.getColumns s...
Github user venkat1m commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1606#discussion_r194968081 --- Diff: core/sqf/sqenvcom.sh --- @@ -40,12 +40,12 @@ export TRAFODION_VER="${TRAFODION_VER_MAJOR}.${TRAFODION_VER_MINOR}.${TRAFODION_ export PRODUCT_COPYRIGHT_HEADER="2015-2017 Apache Software Foundation" ## # Trafodion authentication: -#Set TRAFODION_ENABLE_AUTHENTICATION to YES to enable +#Set TRAFODION_ENABLE_AUTHENTICATION=NO # authentication in the Trafodion environment. # LDAP configuration must also be setup--see # $TRAF_HOME/sql/scripts/traf_authentication_config for details. ## -export TRAFODION_ENABLE_AUTHENTICATION=${TRAFODION_ENABLE_AUTHENTICATION:-NO} +export TRAFODION_ENABLE_AUTHENTICATION=NO --- End diff -- Was this an accidental commit for sqenvcom.sh where you disabled authentication to test your other changes? export TRAFODION_ENABLE_AUTHENTICATION=${TRAFODION_ENABLE_AUTHENTICATION:-NO} is what we need ---
[GitHub] trafodion pull request #1599: Trafodion 3099
Github user gdgy closed the pull request at: https://github.com/apache/trafodion/pull/1599 ---
[GitHub] trafodion pull request #1606: [TRAFODION-3105] meta.getColumns should return...
GitHub user mashengchen opened a pull request: https://github.com/apache/trafodion/pull/1606 [TRAFODION-3105] meta.getColumns should return 24 columns odbc & jdbc have two rules, odbc return 18 columns while jdbc needs 24 columns, so there use two case to separate. also we don't support java.sql.types.REF, so value of the new added columns are just null. You can merge this pull request into a Git repository by running: $ git pull https://github.com/mashengchen/trafodion getColumns Alternatively you can review and apply these changes as the patch at: https://github.com/apache/trafodion/pull/1606.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 #1606 commit 0211325eb8ac59574d0cb0d77a3949bde9a03d08 Author: mashengchen Date: 2018-06-13T06:20:44Z [TRAFODION-3105] meta.getColumns should return 24 columns ---