diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-10-24 19:24:11 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-10-24 19:39:55 -0400 |
| commit | b1cd6e4295b07e01983deb2845f6e22a059f5b76 (patch) | |
| tree | 3daf50c7d1410bbb2a40e9c2bda74d2dbe1cfba6 /lib/sqlalchemy/testing | |
| parent | 13766228c19954f8860de6a2401c44a32832ae3e (diff) | |
| download | sqlalchemy-b1cd6e4295b07e01983deb2845f6e22a059f5b76.tar.gz | |
add Oracle-specific parameter escapes for expanding params
Fixed issue where bound parameter names, including those automatically
derived from similarly-named database columns, which contained characters
that normally require quoting with Oracle would not be escaped when using
"expanding parameters" with the Oracle dialect, causing execution errors.
The usual "quoting" for bound parameters used by the Oracle dialect is not
used with the "expanding parameters" architecture, so escaping for a large
range of characters is used instead, now using a list of characters/escapes
that are specific to Oracle.
Fixes: #8708
Change-Id: I90c24e48534e1b3a4c222b3022da58159784d91a
Diffstat (limited to 'lib/sqlalchemy/testing')
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_dialect.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_dialect.py b/lib/sqlalchemy/testing/suite/test_dialect.py index efad81930..33e395c48 100644 --- a/lib/sqlalchemy/testing/suite/test_dialect.py +++ b/lib/sqlalchemy/testing/suite/test_dialect.py @@ -379,6 +379,8 @@ class DifficultParametersTest(fixtures.TestBase): ("par(ens)",), ("percent%(ens)yah",), ("col:ons",), + ("_starts_with_underscore",), + ("dot.s",), ("more :: %colons%",), ("/slashes/",), ("more/slashes",), @@ -414,6 +416,13 @@ class DifficultParametersTest(fixtures.TestBase): # name works as the key from cursor.description eq_(row._mapping[name], "some name") + # use expanding IN + stmt = select(t.c[name]).where( + t.c[name].in_(["some name", "some other_name"]) + ) + + row = connection.execute(stmt).first() + class ReturningGuardsTest(fixtures.TablesTest): """test that the various 'returning' flags are set appropriately""" |
