Hi all. I have just discovered a new issue since u...
# lucee
g
Hi all. I have just discovered a new issue since upgrading to 5.3.12.1 recently. I have some existing queries which have nested comments in them which no longer work when I add "param" options into the queryExecute statement. Any thoughts/workarounds appreciated (hopefully apart from modifying the query too much šŸ™‚ ) eg This works:
Copy code
local.qryTest = queryExecute(
        sql: "
            SELECT 
                CAST(1 AS integer) as testcol1,
                /*
                CAST(2 AS integer) as testcol2,
                    /*
                    CAST('another comment' AS text) as testcol3,
                    */
                    CAST('test' AS text) as testcol3a,  
                */
                CAST(4 AS integer) as testcol4              
        "
    );
    writeDump(local.qryTest);
but this doesn't
Copy code
local.qryTest2 = queryExecute(
        sql: "
            SELECT 
                CAST(1 AS integer) as testcol1,
                /*
                CAST(2 AS integer) as testcol2,
                    /*
                    CAST('another comment' AS text) as testcol3,
                    */
                    CAST('test' AS text) as testcol3a,  
                */
                CAST(4 AS integer) as testcol4            
        ",
        params: {}
    );
    writeDump(local.qryTest2);
Here's the error from qryTest2:
Copy code
ERROR: operator does not exist: */ integer
Copy code
SELECT CAST(1 AS integer) as testcol1, CAST('test' AS text) as testcol3a, */ CAST(4 AS integer) as testcol4
z
do you have the top of the java stack trace
also which database? both mysql and hsqldb throw errors at the nested syntax
also, when reporting an upgrade issue, it's really useful to mention which version you are upgrading from šŸ˜‰
g
Thanks Zackster (and apologies for not including those other details) • DB is Postgres • Upgrade from 5.3.10.120 Looks like there was a bit of work done around this as part of https://luceeserver.atlassian.net/browse/LDEV-4394 Here' the stacktrace:
Copy code
lucee.runtime.exp.DatabaseException: ERROR: operator does not exist: */ integer at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1343) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:194) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:470) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:355) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:347) at lucee.runtime.type.util.QueryUtil.execute(QueryUtil.java:320) at lucee.runtime.type.QueryImpl.execute(QueryImpl.java:287) at lucee.runtime.type.QueryImpl.<init>(QueryImpl.java:235) at lucee.runtime.tag.Query.executeDatasoure(Query.java:1135) at lucee.runtime.tag.Query._doEndTag(Query.java:700) at lucee.runtime.tag.Query.doEndTag(Query.java:566) at lucee.runtime.functions.query.QueryExecute.call(QueryExecute.java:86) at tests.sqlcomments_cfm$cf.call(/tests/sqlComments.cfm:60) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1056) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:948) at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:929) at applicationevents_cfc$cf.udfCall(/ApplicationEvents.cfc:118) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:350) at lucee.runtime.type.UDFImpl.call(UDFImpl.java:223) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:696) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:584) at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1931) at lucee.runtime.listener.ModernAppListener.call(ModernAppListener.java:444) at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:218) at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2493) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2478) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2449) at lucee.runtime.engine.Request.exe(Request.java:45) at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1216) at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1162) at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97) at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:834)
šŸ‘ 1
z
ok, can you file a bug and link it back to that ticket?