 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[SA 7.1.228 Pro] - Funny glitch with braces |
|
I ran into a funny glitch with braces today. I have a snippet that I wanted to edit and dropped its content into SQL Editor to sort out the required number of braces.
 |
 |
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
INSERT INTO ertekesites.error_log(error_msg)
VALUES (CONCAT(TRIM(TRAILING ', ' FROM CONCAT('/*Failed statement:*/ CALL $OBJECT(ins_qualname, proc)$(', "COALESCE("$ARGS$", 'NULL'),', '")),');'));
SELECT @id_error_log := LAST_INSERT_ID();
END;
|
The Jump to Matching Brace function does not work very well with this one. It's not supposed to happen very often but this time it was deeply misleading :) I'm not sure this one should (or could easily) be fixed, though.
|
|
Fri Nov 28, 2014 5:31 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I don't think this is a bug. The code here is very snippet-syntax specific, that piece "COALESCE("$ARGS$", 'NULL'),', '" of code is not a valid SQL code, it converts to a valid code only after the snippet code execution. The SQL parser chokes on that and it fails to match brackets correctly in the present format.
Last edited by SysOp on Mon Dec 01, 2014 9:23 am; edited 1 time in total |
|
Sat Nov 29, 2014 12:00 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
 |
 |
I don't think this is a bug. The code here is very snippet-syntax specific, that piece "COALESCE("$ARGS$", 'NULL'),', '" of code is not a valid SQL code, it converts to a valid code only after the snippet code execution. The SQL parser chokes on that and it fails to match brackets correctly in the present format. |
Neither do I. That's why I said it was just a glitch and that I wasn't sure it should be fixed. It's just a funny anomaly.
|
|
Mon Dec 01, 2014 4:30 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|