SQLite dotted-names limitation repaired in SQLite 3.10.0

Issue #3633 resolved
Mike Bayer repo owner created an issue

this script in http://docs.sqlalchemy.org/en/latest/dialects/sqlite.html#dotted-column-names now passes:

import sqlite3

conn = sqlite3.connect(":memory:")
cursor = conn.cursor()

cursor.execute("create table x (a integer, b integer)")
cursor.execute("insert into x (a, b) values (1, 1)")
cursor.execute("insert into x (a, b) values (2, 2)")

cursor.execute("select x.a, x.b from x")
assert [c[0] for c in cursor.description] == ['a', 'b']

cursor.execute('''
    select x.a, x.b from x where a=1
    union
    select x.a, x.b from x where a=2
''')
assert [c[0] for c in cursor.description] == ['a', 'b'], \
    [c[0] for c in cursor.description]

the sqlite checkin is http://www.sqlite.org/src/info/47f10b7e5d8c1d96. We need to turn off translate_colnames for this version and also some tests fail.

Comments (9)

  1. Mike Bayer reporter
    • documenation updates to clarify specific SQLite versions that have problems with right-nested joins and UNION column keys; references #3633 references #3634. backport from 1.1 to 0.9 announcing 1.1 as where these behaviors will be retired based on version-specific checks
    • fix test_resultset so that it passes when SQLite 3.10.0 is present, references #3633

    → <<cset 89fa08792e98>>

  2. Mike Bayer reporter
    • documenation updates to clarify specific SQLite versions that have problems with right-nested joins and UNION column keys; references #3633 references #3634. backport from 1.1 to 0.9 announcing 1.1 as where these behaviors will be retired based on version-specific checks
    • fix test_resultset so that it passes when SQLite 3.10.0 is present, references #3633

    → <<cset 89fa08792e98>>

  3. Mike Bayer reporter
    • documenation updates to clarify specific SQLite versions that have problems with right-nested joins and UNION column keys; references #3633 references #3634. backport from 1.1 to 0.9 announcing 1.1 as where these behaviors will be retired based on version-specific checks
    • fix test_resultset so that it passes when SQLite 3.10.0 is present, references #3633

    (cherry picked from commit 89fa08792e98b9e31452aa3c949d9b909b10e7cd)

    → <<cset 9cc769ac4004>>

  4. Mike Bayer reporter
    • documenation updates to clarify specific SQLite versions that have problems with right-nested joins and UNION column keys; references #3633 references #3634. backport from 1.1 to 0.9 announcing 1.1 as where these behaviors will be retired based on version-specific checks
    • fix test_resultset so that it passes when SQLite 3.10.0 is present, references #3633

    (cherry picked from commit 89fa08792e98b9e31452aa3c949d9b909b10e7cd)

    → <<cset 9cc769ac4004>>

  5. Mike Bayer reporter
    • documenation updates to clarify specific SQLite versions that have problems with right-nested joins and UNION column keys; references #3633 references #3634. backport from 1.1 to 0.9 announcing 1.1 as where these behaviors will be retired based on version-specific checks
    • fix test_resultset so that it passes when SQLite 3.10.0 is present, references #3633

    (cherry picked from commit 89fa08792e98b9e31452aa3c949d9b909b10e7cd)

    → <<cset dc4eb7904e22>>

  6. Mike Bayer reporter
    • documenation updates to clarify specific SQLite versions that have problems with right-nested joins and UNION column keys; references #3633 references #3634. backport from 1.1 to 0.9 announcing 1.1 as where these behaviors will be retired based on version-specific checks
    • fix test_resultset so that it passes when SQLite 3.10.0 is present, references #3633

    (cherry picked from commit 89fa08792e98b9e31452aa3c949d9b909b10e7cd)

    → <<cset dc4eb7904e22>>

  7. Mike Bayer reporter
    • The workaround for right-nested joins on SQLite, where they are rewritten as subqueries in order to work around SQLite's lack of support for this syntax, is lifted when SQLite version 3.7.16 or greater is detected. fixes #3634
    • The workaround for SQLite's unexpected delivery of column names as tablename.columnname for some kinds of queries is now disabled when SQLite version 3.10.0 or greater is detected. fixes #3633

    → <<cset 9d9fc93b7065>>

  8. Log in to comment