Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-1606

Catch lua plugin errors

    Details

    • Type: Bug
    • Status: Invalid
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: Qserv
    • Labels:
      None

      Description

      mysql-proxy lua plugin errors have to be catched, to insure the luq script execution was successful.

      For exemple error below wasn't catched at each time, letting user think their query was successfully executed.

      [fjammes@clrlsstwn04 qserv]$ git diff c4dd922e798bfdb545145f09fc0b9cb95a82cadb 5e16bc9e98ece65c8f0b6c17cae68d7de477bc2e
      diff --git a/core/modules/proxy/mysqlProxy.lua b/core/modules/proxy/mysqlProxy.lua
      index c4b6ed5..7bad98a 100755
      --- a/core/modules/proxy/mysqlProxy.lua
      +++ b/core/modules/proxy/mysqlProxy.lua
      @@ -186,6 +186,9 @@ function utilities()
               -- convert new lines and tabs to a space
               q = string.gsub(q, '[\n\t]+', ' ')
       
      +        -- remove all spaces at the beginning
      +        q = string.ltrim(q)
      +
               -- remove all spaces before/after '='
               q = string.gsub(q, '[ ]+=', '=')
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jammes Fabrice Jammes
                Watchers:
                Andy Salnikov, Daniel Wang [X] (Inactive), Fabrice Jammes, Fritz Mueller, Jacek Becla, Serge Monkewitz
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel