Mike Bayer [Sat, 12 Jan 2013 22:32:32 +0000 (17:32 -0500)]
Fixed potential memory leak which could occur if an
arbitrary number of :func:`.sessionmaker` objects
were created. The anonymous subclass created by
the sessionmaker, when dereferenced, would not be garbage
collected due to remaining class-level references from the
event package. This issue also applies to any custom system
that made use of ad-hoc subclasses in conjunction with
an event dispatcher. [ticket:2650]
Mike Bayer [Fri, 14 Dec 2012 15:32:56 +0000 (10:32 -0500)]
More adjustment to this SQLite related issue which was released in
0.7.9, to intercept legacy SQLite quoting characters when reflecting
foreign keys. In addition to intercepting double quotes, other
quoting characters such as brackets, backticks, and single quotes
are now also intercepted. [ticket:2568]
Mike Bayer [Sun, 9 Dec 2012 01:31:06 +0000 (20:31 -0500)]
Fixed bug where using server_onupdate=<FetchedValue|DefaultClause>
without passing the "for_update=True" flag would apply the default
object to the server_default, blowing away whatever was there.
The explicit for_update=True argument shouldn't be needed with this usage
(especially since the documentation shows an example without it being
used) so it is now arranged internally using a copy of the given default
object, if the flag isn't set to what corresponds to that argument.
[ticket:2631]
Mike Bayer [Fri, 7 Dec 2012 00:32:58 +0000 (19:32 -0500)]
The Oracle LONG type, while an unbounded text type, does not appear
to use the cx_Oracle.LOB type when result rows are returned,
so the dialect has been repaired to exclude LONG from
having cx_Oracle.LOB filtering applied.
[ticket:2620]
Mike Bayer [Fri, 7 Dec 2012 00:14:12 +0000 (19:14 -0500)]
Repaired the usage of ``.prepare()`` in conjunction with
cx_Oracle so that a return value of ``False`` will result
in no call to ``connection.commit()``, hence avoiding
"no transaction" errors. Two-phase transactions have
now been shown to work in a rudimental fashion with
SQLAlchemy and cx_oracle, however are subject to caveats
observed with the driver; check the documentation
for details. [ticket:2611]
Mike Bayer [Tue, 4 Dec 2012 00:56:55 +0000 (19:56 -0500)]
The :class:`.MutableComposite` type did not allow for the
:meth:`.MutableBase.coerce` method to be used, even though
the code seemed to indicate this intent, so this now works
and a brief example is added. As a side-effect,
the mechanics of this event handler have been changed so that
new :class:`.MutableComposite` types no longer add per-type
global event handlers. Also in 0.8.0b2.
[ticket:2624]
Mike Bayer [Wed, 14 Nov 2012 05:51:38 +0000 (00:51 -0500)]
Fixed :meth:`.MetaData.reflect` to correctly use
the given :class:`.Connection`, if given, without
opening a second connection from that connection's
:class:`.Engine`. [ticket:2604]
Mike Bayer [Wed, 14 Nov 2012 04:45:52 +0000 (23:45 -0500)]
Fixed bug whereby using "key" with Column
in conjunction with "schema" for the owning
Table would fail to locate result rows due
to the MSSQL dialect's "schema rendering"
logic's failure to take .key into account.
[ticket:2607]
Mike Bayer [Wed, 10 Oct 2012 17:22:57 +0000 (13:22 -0400)]
- [bug] changed the list of cx_oracle types that are
excluded from the setinputsizes() step to only include
STRING and UNICODE; CLOB and NCLOB are removed. This
is to work around cx_oracle behavior which is broken
for the executemany() call. In 0.8, this same change
is applied however it is also configurable via the
exclude_setinputsizes argument. [ticket:2561]
Mike Bayer [Wed, 3 Oct 2012 15:06:22 +0000 (11:06 -0400)]
- [bug] Fixed Session accounting bug whereby replacing
a deleted object in the identity map with another
object of the same primary key would raise a
"conflicting state" error on rollback(),
if the replaced primary key were established either
via non-unitofwork-established INSERT statement
or by primary key switch of another instance.
[ticket:2583]
Mike Bayer [Sun, 30 Sep 2012 21:20:04 +0000 (17:20 -0400)]
- [bug] Fixed bug in over() construct whereby
passing an empty list for either partition_by
or order_by, as opposed to None, would fail
to generate correctly.
Courtesy Gunnlaugur Por Briem.
[ticket:2574]
Mike Bayer [Sun, 30 Sep 2012 20:57:23 +0000 (16:57 -0400)]
- [bug] Fixed compiler bug whereby using a correlated
subquery within an ORDER BY would fail to render correctly
if the stament also used LIMIT/OFFSET, due to mis-rendering
within the ROW_NUMBER() OVER clause. Fix courtesy
sayap [ticket:2538]
Mike Bayer [Tue, 25 Sep 2012 20:54:50 +0000 (16:54 -0400)]
- [bug] Added 'terminating connection' to the list
of messages we use to detect a disconnect with PG, which
appears to be present in some versions when the server
is restarted. [ticket:2570]
Mike Bayer [Sun, 23 Sep 2012 17:42:41 +0000 (13:42 -0400)]
- [bug] Columns in reflected primary key constraint
are now returned in the order in which the constraint
itself defines them, rather than how the table
orders them. Courtesy Gunnlaugur Por Briem.
[ticket:2531].
Mike Bayer [Sun, 23 Sep 2012 16:51:24 +0000 (12:51 -0400)]
- [bug] When the primary key column of a Table
is replaced, such as via extend_existing,
the "auto increment" column used by insert()
constructs is reset. Previously it would
remain referring to the previous primary
key column. [ticket:2525]
Mike Bayer [Sun, 23 Sep 2012 15:30:07 +0000 (11:30 -0400)]
- [bug] Adjusted column default reflection code to
convert non-string values to string, to accommodate
old SQLite versions that don't deliver
default info as a string. [ticket:2265]
- factor sqlite column reflection to be like we did for postgresql,
in a separate method.
Mike Bayer [Sat, 22 Sep 2012 20:31:32 +0000 (16:31 -0400)]
- [bug] Added missing operators is_(), isnot()
to the ColumnOperators base, so that these long-available
operators are present as methods like all
the other operators. [ticket:2544]
Mike Bayer [Sat, 22 Sep 2012 20:03:57 +0000 (16:03 -0400)]
- [bug] Extra logic has been added to the "flush"
that occurs within Session.commit(), such that the
extra state added by an after_flush() or
after_flush_postexec() hook is also flushed in a
subsequent flush, before the "commit" completes.
Subsequent calls to flush() will continue until
the after_flush hooks stop adding new state.
An "overflow" counter of 100 is also in place,
in the event of a broken after_flush() hook
adding new content each time. [ticket:2566]
Mike Bayer [Thu, 20 Sep 2012 16:05:16 +0000 (12:05 -0400)]
- repair bool() for instance level event listener where events are classlevel, continuing [ticket:2516],
for some reason the impl was different here than that of 0.8
Mike Bayer [Wed, 19 Sep 2012 04:34:30 +0000 (00:34 -0400)]
- [bug] Adjusted a very old bugfix which attempted
to work around a SQLite issue that itself was
"fixed" as of sqlite 3.6.14, regarding quotes
surrounding a table name when using
the "foreign_key_list" pragma. The fix has been
adjusted to not interfere with quotes that
are *actually in the name* of a column or table,
to as much a degree as possible; sqlite still
doesn't return the correct result for foreign_key_list()
if the target table actually has quotes surrounding
its name, as *part* of its name (i.e. """mytable""").
[ticket:2568]
Mike Bayer [Mon, 17 Sep 2012 01:15:55 +0000 (21:15 -0400)]
- [bug] Fixed bug where incorrect type information
would be passed when the ORM would bind the
"version" column, when using the "version" feature.
Tests courtesy Daniel Miller. [ticket:2539]
Mike Bayer [Sun, 9 Sep 2012 06:06:32 +0000 (02:06 -0400)]
almost obliterate the concept of "implicit execution" from the docs, move it only
to the "engines and connections" chapter nobody reads, put big green "note:"
boxes with the word "discouraged" in them for "bound metadata", "implicit execution",
"threadlocal strategy"
Mike Bayer [Sat, 1 Sep 2012 00:03:57 +0000 (20:03 -0400)]
- [bug] Fixed a regression since 0.6 regarding
result-row targeting. It should be possible
to use a select() statement with string
based columns in it, that is
select(['id', 'name']).select_from('mytable'),
and have this statement be targetable by
Column objects with those names; this is the
mechanism by which
query(MyClass).from_statement(some_statement)
works. At some point the specific case of
using select(['id']), which is equivalent to
select([literal_column('id')]), stopped working
here, so this has been re-instated and of
course tested. [ticket:2558]
Mike Bayer [Wed, 22 Aug 2012 23:06:19 +0000 (19:06 -0400)]
- [bug] Fixed bug whereby usage of a UNION
or similar inside of an embedded subquery
would interfere with result-column targeting,
in the case that a result-column had the same
ultimate name as a name inside the embedded
UNION. [ticket:2552]
Mike Bayer [Wed, 22 Aug 2012 22:49:16 +0000 (18:49 -0400)]
- [bug] Fixed cextension bug whereby the
"ambiguous column error" would fail to
function properly if the given index were
a Column object and not a string.
Note there are still some column-targeting
issues here which are fixed in 0.8.
[ticket:2553]
Mike Bayer [Mon, 13 Aug 2012 01:07:24 +0000 (21:07 -0400)]
- [bug] Fixed compiler bug whereby a given
select() would be modified if it had an "offset"
attribute, causing the construct to not compile
correctly a second time. [ticket:2545]
Mike Bayer [Mon, 13 Aug 2012 00:41:17 +0000 (20:41 -0400)]
- [bug] Fixed bug whereby user error in related-object
assignment could cause recursion overflow if the
assignment triggered a backref of the same name
as a bi-directional attribute on the incorrect
class to the same target. An informative
error is raised now.
Mike Bayer [Sun, 15 Jul 2012 00:36:43 +0000 (20:36 -0400)]
- [bug] Fixed bug mostly local to new
AbstractConcreteBase helper where the "type"
attribute from the superclass would not
be overridden on the subclass to produce the
"reserved for base" error message, instead placing
a do-nothing attribute there. This was inconsistent
vs. using ConcreteBase as well as all the behavior
of classical concrete mappings, where the "type"
column from the polymorphic base would be explicitly
disabled on subclasses, unless overridden
explicitly.
Mike Bayer [Tue, 10 Jul 2012 15:10:42 +0000 (11:10 -0400)]
- [bug] Fixed more un-intuitivenesses in CTEs
which prevented referring to a CTE in a union
of itself without it being aliased.
CTEs now render uniquely
on name, rendering the outermost CTE of a given
name only - all other references are rendered
just as the name. This even includes other
CTE/SELECTs that refer to different versions
of the same CTE object, such as a SELECT
or a UNION ALL of that SELECT. We are
somewhat loosening the usual link between object
identity and lexical identity in this case.
A true name conflict between two unrelated
CTEs now raises an error.