# Catch lua plugin errors

XMLWordPrintable

## Details

• Type: Bug
• Status: Invalid
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Team:
Data Access and Database

## 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, '[ ]+=', '=') 

## Activity

Hide
Fritz Mueller added a comment -

Andy Salnikov, could you please check and see if this is still and issue, and comment here?

Show
Fritz Mueller added a comment - Andy Salnikov , could you please check and see if this is still and issue, and comment here?
Hide
Andy Salnikov added a comment -

I can't figure out which error is not caught in that piece of code, Fabrice Jammes do you remember what was it. In any case I don't think this is an issue, that code (ltrim) does not exist anymore, I believe lua script is sufficiently robust now and error handling behaves reasonably well. This ticket should be closed.

Show
Andy Salnikov added a comment - I can't figure out which error is not caught in that piece of code, Fabrice Jammes do you remember what was it. In any case I don't think this is an issue, that code (ltrim) does not exist anymore, I believe lua script is sufficiently robust now and error handling behaves reasonably well. This ticket should be closed.
Hide
Fritz Mueller added a comment -

Closing "INVALID", per Andy comment above

Show
Fritz Mueller added a comment - Closing "INVALID", per Andy comment above

## People

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

## Dates

• Created:
Updated:
Resolved: