Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2709

Using multi-threads app with linux-odbc to connect trafodion will make dcs down

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1-incubating, 2.2.0
    • 2.2.0, 2.3
    • client-odbc-linux
    • None
    • centos 6.7
      centos 7.2

    Description

      getpwuid is not a Thread-safe function

      // Get client user name.
      struct passwd passwd; / man getpwuid */
      passwd = getpwuid (getuid()); /* Get the uid of the running processand use it to get a record from /etc/passwd */
      if (strlen(passwd->pw_name) > 0)

      { inContext.clientUserName = passwd->pw_name; inContext.inContextOptions1 = inContext.inContextOptions1 | INCONTEXT_OPT1_CLIENT_USERNAME; }

      else
      inContext.clientUserName = NULL;

      Attachments

        Issue Links

          Activity

            People

              XuWeixin XuWeixin
              XuWeixin XuWeixin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: