trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traflm <>
Subject [GitHub] incubator-trafodion pull request #715: [TRAFDODION-2170] create table with t...
Date Tue, 20 Sep 2016 16:46:05 GMT
Github user traflm commented on a diff in the pull request:
    --- Diff: core/sqf/src/tm/tmddlrequests.cpp ---
    @@ -40,14 +40,21 @@ JNIEXPORT jint JNICALL Java_org_apache_hadoop_hbase_client_transactional_RMInter
        char la_tbldesc[TM_MAX_DDLREQUEST_STRING];
        char la_tblname[TM_MAX_DDLREQUEST_STRING];
        char* str_key;
    -   str_key = new char[TM_MAX_DDLREQUEST_STRING];
        char** la_keys;
        la_keys = new char *[TM_MAX_DDLREQUEST_STRING];
        int lv_error = FEOK;
    +   if(pv_keyLength <= 0 || pv_keyLength >= TM_MAX_DDLREQUEST_STRING)
    +   {
    +     cout << "Table key length is larger than max allowed" << endl;
    +     return FEBADKEYDESC;
    +   }
    +   str_key = new char[pv_keyLength];
        int lv_tblname_len = pp_env->GetArrayLength(pv_tblname);
        if(lv_tblname_len > TM_MAX_DDLREQUEST_STRING) {
           cout << "Table name length is larger than max allowed" << endl;
    +      return FEBADNAME;
    --- End diff --
    Yes, will fix it. I will abandon this RP and create another one. This PR cannot pass basic
regression test.
    All the metadata table created with key length as 0, so 'initialize trafodion' will not
    I will create a new PR and with this leak fix as well.
    thanks Hans for the careful review.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message