Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lower case table doesnt guard against column from other table copied in #5618

Closed
zzzeek opened this issue Sep 30, 2020 · 2 comments
Closed
Labels
bug Something isn't working sql
Milestone

Comments

@zzzeek
Copy link
Member

zzzeek commented Sep 30, 2020

as noticed in #5617, metadata works, but lower cases dont guard:

from sqlalchemy import *


c1 = column('x', Integer)
c2 = column('y', Integer)

t = table('t', c1, c2)

t2 = table('t2', c1, c2)

t.c.x is t2.c.x



m = MetaData()


c1 = Column('x', Integer)
c2 = Column('y', Integer)

t = Table('t', m, c1, c2)

t2 = Table('t2', m, c1, c2)

t.c.x is t2.c.x
@zzzeek zzzeek added requires triage New issue that requires categorization bug Something isn't working sql labels Sep 30, 2020
@zzzeek zzzeek added this to the 1.3.x milestone Sep 30, 2020
@zzzeek zzzeek removed the requires triage New issue that requires categorization label Sep 30, 2020
@sqla-tester
Copy link
Collaborator

Mike Bayer has proposed a fix for this issue in the master branch:

raise on lower-case column shared to multiple tables https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/2277

@sqla-tester
Copy link
Collaborator

Mike Bayer has proposed a fix for this issue in the rel_1_3 branch:

raise on lower-case column shared to multiple tables https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/2278

sqlalchemy-bot pushed a commit that referenced this issue Sep 30, 2020
Fixed bug where an error was not raised for lower-case
:func:`_column` added to lower-case :func:`_table` object. This now raises
:class:`_exc.ArgumentError` which has always been the case for
upper-case :class:`_schema.Column` and :class:`_schema.Table`.

Fixes: #5618
Change-Id: Ifcbdf27c022fd2996a5b99559df71fc1c1e0f19c
(cherry picked from commit ba0febcf54f194fc93d40a6bf72502ee50ba9993)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sql
Projects
None yet
Development

No branches or pull requests

2 participants