diff --git a/test/fixtures/cross_agent_tests/sql_obfuscation/sql_obfuscation.json b/test/fixtures/cross_agent_tests/sql_obfuscation/sql_obfuscation.json index 1d32e1c1fe..f8d644cfb2 100644 --- a/test/fixtures/cross_agent_tests/sql_obfuscation/sql_obfuscation.json +++ b/test/fixtures/cross_agent_tests/sql_obfuscation/sql_obfuscation.json @@ -674,5 +674,35 @@ "cassandra", "mssql" ] + }, + { + "name": "prepended_comments_with_quotes.postgres", + "sql": "/*application:Demo,controller:posts,action:update*/ UPDATE \"posts\" SET \"updated_at\" = '2023-11-01 19:02:34.795909' WHERE \"posts\".\"id\" = 3", + "obfuscated": [ + "? UPDATE \"posts\" SET \"updated_at\" = ? WHERE \"posts\".\"id\" = ?" + ], + "dialects": [ + "postgres" + ] + }, + { + "name": "prepended_comments_with_quotes.mysql", + "sql": "/*action='show',application='TrilogyTest',controller='users'*/ SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1", + "obfuscated": [ + "? SELECT `users`.* FROM `users` WHERE `users`.`id` = ? LIMIT ?" + ], + "dialects": [ + "mysql" + ] + }, + { + "name": "prepended_multiline_comments_with_quotes.mysql", + "sql": "/*action='show',\napplication='TrilogyTest',controller='users'*/\nSELECT `users`.*\nFROM `users`\nWHERE `users`.`id` = 1 LIMIT 1", + "obfuscated": [ + "?\nSELECT `users`.*\nFROM `users`\nWHERE `users`.`id` = ? LIMIT ?" + ], + "dialects": [ + "mysql" + ] } ] diff --git a/test/fixtures/cross_agent_tests/sql_parsing.json b/test/fixtures/cross_agent_tests/sql_parsing.json index 5590f2f93c..90311b13a7 100644 --- a/test/fixtures/cross_agent_tests/sql_parsing.json +++ b/test/fixtures/cross_agent_tests/sql_parsing.json @@ -57,7 +57,8 @@ {"input":"SELECT * /* a */ FROM alpha", "operation":"select", "table":"alpha"}, {"input":"SELECT * FROM /* a */ alpha", "operation":"select", "table":"alpha"}, {"input":"/* X */ SELECT /* Y */ foo/**/ FROM /**/alpha/**/", "operation":"select", "table":"alpha"}, - + {"input":"/* insert */ SELECT * FROM alpha", "operation":"select", "table":"alpha"}, + {"input":"mystoredprocedure'123'", "operation":"other", "table":null}, {"input":"mystoredprocedure\t'123'", "operation":"other", "table":null}, {"input":"mystoredprocedure\r'123'", "operation":"other", "table":null},