From 1f3e5d9826fe989f2212745f6b3592b2ef9b5e32 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 21 Apr 2016 10:36:19 -0400 Subject: Fix result set handling for case insensitive dupe cols Fixed bug where when using ``case_sensitive=False`` with an :class:`.Engine`, the result set would fail to correctly accomodate for duplicate column names in the result set, causing an error when the statement is executed in 1.0, and preventing the "ambiguous column" exception from functioning in 1.1. Change-Id: If582bb9fdd057e4da3ae42f7180b17d1a1a2d98e Fixes: #3690 --- lib/sqlalchemy/engine/result.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/sqlalchemy/engine') diff --git a/lib/sqlalchemy/engine/result.py b/lib/sqlalchemy/engine/result.py index 0333d9ec2..773022ed2 100644 --- a/lib/sqlalchemy/engine/result.py +++ b/lib/sqlalchemy/engine/result.py @@ -257,6 +257,7 @@ class ResultMetaData(object): if key in seen: # this is an "ambiguous" element, replacing # the full record in the map + key = key.lower() if not self.case_sensitive else key by_key[key] = (None, key, None) seen.add(key) -- cgit v1.2.1