﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21126	Potential data corruption issue with Oracle and Mysql due to SQLCompiler.resolve_columns row, fields misalignment	Michael Manfre	Michael Manfre	"When a query is annotated, the aggregate_select values are included in the row, but there are no matching entries in the fields list. This results in the values and fields getting misaligned when attempting to convert the database value to a python value.

Problem can be viewed by adding the following to the top of the for loop in either oracle's or mysql's SQLCompiler.resolve_columns methods:

{{{
print '\tfield= %s\tvalue=%s' % (repr(field), value)
}}}

Run the test {{{aggregation_regress.AggregationTests.test_more_more}}} and grep for ""Peter Norvig"" to see that is paired with the ""age"" column.

Depending on the specific query and data, this can result in the incorrect conversion being applied to the data, which might result in data corruption or an unexpected exception."	Bug	closed	Database layer (models, ORM)	1.5	Normal	fixed		Simon Charette	Accepted	1	0	1	1	0	0
