Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-1296

Lowercase start transaction is not detected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1.3
    • Fix Version/s: 2.1.4
    • Component/s: Core
    • Labels:
      None

      Description

      Executing a start transaction statement with all characters in lowercase fails to be detected as the starting edge of a transaction.

      This is caused by the following case-sensitive check for the character T in trxboundaryprser.hh on line 773:

                  case 's':
                  case 'S':
                      if (is_next_alpha('E'))
                      {
                          if (is_next_alpha('S', 2))
                          {
                              token = expect_token(TBP_EXPECT_TOKEN("SESSION"), TK_SESSION);
                          }
                          else
                          {
                              token = expect_token(TBP_EXPECT_TOKEN("SET"), TK_SET);
                          }
                      }
                      else if (is_next_alpha('N'))
                      {
                          token = expect_token(TBP_EXPECT_TOKEN("SNAPSHOT"), TK_SNAPSHOT);
                      }
                      else if (is_next_char('T'))
                      {
                          token = expect_token(TBP_EXPECT_TOKEN("START"), TK_START);
                      }
                      break;
      

      As all tokens can be lowercase, the use of the is_next_char function should be replaced with is_next_alpha.

        Attachments

          Activity

            People

            Assignee:
            markus makela markus makela
            Reporter:
            markus makela markus makela
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: