tracker issue : CF-3037129

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 74737:I was doing some simulations of migration, and to my surprise a system that runs on CF8 did not behave well in the centaur, received Query Of Queries runtime error, then put an abort before I made a m

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Pedro Silva / PEDRO CLAUDIO (Pedro Claudio)

Created: 12/23/2008

Components: General Server

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 218401

Priority/Frequency: Major / Unknown

Locale/System: English / Platforms All

Vote Count: 1

Problem:

I was doing some simulations of migration, and to my surprise a system that runs on CF8 did not behave well in the centaur, received Query Of Queries runtime error, then put an abort before I made a mistake and debug, as follows, but I think it is a bug, but I forgot to mention one detail, I am not using Query of Query. 
Method:

<cfquery datasource="venDB" name="qMinhaBaia">
SELECT BaiaId, DescricaoBaia, flgSolicitaPeca FROM Baias WHERE BaiaId = #id#
</cfquery>

<cfdump var="#qMinhaBaia#" >
<cfdump var="#qMinhaBaia.getMetaData().getQueryMetaData(qMinhaBaia)#">
<Cfset d = qMinhaBaia.flgSolicitaPeca eq "S" >



######################################
"cfdump query"
query
RESULTSET
query
  BAIAID DESCRICAOBAIA FLGSOLICITAPECA
1 2 Evaluación Cuerpo de Válvulas S
CACHED false
EXECUTIONTIME 0
SQL SELECT BaiaId, DescricaoBaia, flgSolicitaPeca FROM Baias WHERE BaiaId = 2

#######################################
"cfdump metadata query"
array
1
struct
IsCaseSensitive NO
Name BaiaId
TypeName int
2
struct
IsCaseSensitive NO
Name DescricaoBaia
TypeName nvarchar
3
struct
IsCaseSensitive NO
Name flgSolicitaPeca
TypeName char



#######################################
Error


The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
Query Of Queries runtime error.
Cannot mix types VARCHAR and TIMESTAMP in a compare binary operation.

Following is the Full Test Case:

<cfscript>
	rows = 5;
	qry = queryNew( "TestUUID,TestField" );
	
	queryAddRow( qry, 5 );
	
	for( i=1; i <= rows; i++ )
	{
		querySetCell( qry, "TestUUID", createUUID(), i );
		querySetCell( qry, "TestField", i, i );
	}
	
	data = structNew();
</cfscript>

<cfdump var="#qry#">

<cfloop query="qry">
	<cfquery name="qryCount" dbType="query">
		SELECT
			COUNT(*) AS TestCount
		FROM
			qry
	</cfquery>
	<cfset data[TestUUID] = qryCount.TestCount> 
</cfloop>

<cfdump var="#data#">




Result:

Error


The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
Query Of Queries runtime error.
Cannot mix types VARCHAR and TIMESTAMP in a compare binary operation.

The error occurred in C:\ColdFusionCentaur\wwwroot\Venequip\web\SubRotinas\eDetalhaOS.cfm: line 243

241 : <cfdump var="#qMinhaBaia#" >
242 : <cfdump var="#qMinhaBaia.getMetaData().getQueryMetaData(qMinhaBaia)#">
243 : <Cfset d = qMinhaBaia.flgSolicitaPeca eq "S" >
244 : <cfabort>
245 :

Resources:

    * Check the ColdFusion documentation to verify that you are using the correct syntax.
    * Search the Knowledge Base to find a solution to your problem.

Browser  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 FirePHP/0.1.2
Remote Address  127.0.0.1
Referrer  http://localhost:8500/venequip/web/Venequip.cfm
Date/Time  20-Dec-08 06:53 PM
Stack Trace
at cfeDetalhaOS2ecfm495504045.runPage(C:\ColdFusionCentaur\wwwroot\Venequip\web\SubRotinas\eDetalhaOS.cfm:243) at cfVenequip2ecfm705644516.runPage(C:\ColdFusionCentaur\wwwroot\Venequip\web\Venequip.cfm:82)

coldfusion.sql.imq.ImqTypeMismatchException: Query Of Queries runtime error.
at coldfusion.sql.imq.Row.compareTo(Row.java:196)
at coldfusion.sql.imq.Row.equals(Row.java:133)
at java.util.AbstractList.equals(AbstractList.java:507)
at java.util.Vector.equals(Vector.java:925)
at coldfusion.sql.QueryTable.equals(QueryTable.java:2787)
at coldfusion.runtime.NeoPageContext.checkForQueryTable(NeoPageContext.java:1618)
at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1389)
at coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1761)
at coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1754)
at cfeDetalhaOS2ecfm495504045.runPage(C:\ColdFusionCentaur\wwwroot\Venequip\web\SubRotinas\eDetalhaOS.cfm:243)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:214)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2712)
at cfVenequip2ecfm705644516.runPage(C:\ColdFusionCentaur\wwwroot\Venequip\web\Venequip.cfm:82)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:214)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:295)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
at coldfusion.CfmServlet.service(CfmServlet.java:177)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3037129

External Customer Info:
External Company:  
External Customer Name: PEDRO CLAUDIO
External Customer Email: 52BF13DC4456EC7B992016B6
External Test Config: 12/23/2008

Attachments:

Comments:

Bugs 74737, 74211, and 74046 are ALL the same issue. Notice the QoQ runtime error, and more specifically the "Cannot mix types" errors. Also notice that, in each of these cases, the user is trying to reference a field in the FIRST row of the query as qry.FieldName, which worked in CF 8, but breaks in CF 9. Replacing the broken code with qry.FieldName[1] fixes the problem, but this NEEDS to be fixed, because many programmers omit the row number when referring to the first row of a query. Contact me via email and I can provide a very simple code example, with no database tables necessary, to reproduce this prioblem. Thanks for your time.
Vote by External U.
24341 | November 10, 2011 07:09:59 PM GMT