Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-7479

Cannot escape characters when using like operator on DB2

    Details

      Description

      Steps to reproduce:
      1) start a process instance with a variable foo and the value bar_123
      2) login into cockpit
      3) go to the runtime process instance view of the specific process instance
      4) search for the variable inside the variables tab by using this query:

      foo like "bar\_%"
      

      Problem:
      The variable foo is not returned.

      Expected Behavior:
      The variable foo is found.

      Hint:
      The following sql statement does not return the variable

      select * from ACT_RU_VARIABLE where TEXT_ like 'bar\_%'
      

      When the sql statement is changed as follows (ESCAPE '\' has been added):

      select * from ACT_RU_VARIABLE where TEXT_ like 'bar\_%' ESCAPE '\'
      

      then the variable is found

        Activity

        Hide
        svetlana.dorokhova Svetlana Dorokhova added a comment -

        4 databases are using backslash as default escape character: H2, PostgreSQL, Mysql, MariaDB.
        3 others do not define default escape character: Oracle, DB2, MSSQL Server.

        Within the ticket backslash was explicitly set as escape character for all databases.

        Show
        svetlana.dorokhova Svetlana Dorokhova added a comment - 4 databases are using backslash as default escape character: H2, PostgreSQL, Mysql, MariaDB. 3 others do not define default escape character: Oracle, DB2, MSSQL Server. Within the ticket backslash was explicitly set as escape character for all databases.

          People

          • Assignee:
            michael.schoettes Michael Schoettes
            Reporter:
            roman.smirnov Smirnov Roman
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: