]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fixed the raise for mysql to re-raise the error rel_0_3_3
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 15 Dec 2006 07:43:42 +0000 (07:43 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 15 Dec 2006 07:43:42 +0000 (07:43 +0000)
CHANGES
doc/build/content/adv_datamapping.txt
doc/build/genhtml.py
lib/sqlalchemy/databases/mysql.py
setup.py

diff --git a/CHANGES b/CHANGES
index 6c95164383538a0ebed0459551206858370a66b2..8642ebf692d49c96d39ce137c97533e603146347 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+0.3.3
+
 - string-based FROM clauses fixed, i.e. select(..., from_obj=["sometext"])
 - fixes to passive_deletes flag, lazy=None (noload) flag
 - added example/docs for dealing with large collections
@@ -6,7 +8,8 @@
 that was not reachable (thanks to Sébastien Lelong), also fixed dispose()
 method
 - patch that makes MySQL rowcount work correctly! [ticket:396]
+- fix to MySQL catch of 2006/20014 errors
+
 0.3.2
 - major connection pool bug fixed.  fixes MySQL out of sync
 errors, will also prevent transactions getting rolled back
index 50e8980d5685c1a46dc36543e48e82b24b8db7f4..79f8158a25f66fbc5f1515864b1c456fd9052bcb 100644 (file)
@@ -253,8 +253,6 @@ Deferred columns can be placed into groups so that they load together:
 
 #### Working with Large Collections
 
-(requires some bugfixes released as of version 0.3.3)
-
 SQLAlchemy relations are generally simplistic; the lazy loader loads in the full list of child objects when accessed, and the eager load builds a query that loads the full list of child objects.  Additionally, when you are deleting a parent object, SQLAlchemy insures that it has loaded the full list of child objects so that it can mark them as deleted as well (or to update their parent foreign key to NULL).  It does not issue an en-masse "delete from table where parent_id=?" type of statement in such a scenario.  This is because the child objects themselves may also have further dependencies, and additionally may also exist in the current session in which case SA needs to know their identity so that their state can be properly updated.
 
 So there are several techniques that can be used individually or combined together to address these issues, in the context of a large collection where you normally would not want to load the full list of relationships:
index 858d100dfbace355146cce0fb444f842add2b532..f30a7997d632c25d6470482664ae9955eb5b4146 100644 (file)
@@ -24,7 +24,7 @@ files = [
     ]
 
 title='SQLAlchemy 0.3 Documentation'
-version = '0.3.2'
+version = '0.3.3'
 
 root = toc.TOCElement('', 'root', '', version=version, doctitle=title)
 
index a452a696e2ce9a7b75e500bf5fb56439a6813509..966912d3aac9044bb034fb26d28eda255b004b5c 100644 (file)
@@ -307,14 +307,14 @@ class MySQLDialect(ansisql.ANSIDialect):
         except mysql.OperationalError, o:
             if o.args[0] == 2006 or o.args[0] == 2014:
                 cursor.invalidate()
-                raise o
+            raise o
     def do_execute(self, cursor, statement, parameters, **kwargs):
         try:
             cursor.execute(statement, parameters)
         except mysql.OperationalError, o:
             if o.args[0] == 2006 or o.args[0] == 2014:
                 cursor.invalidate()
-                raise o
+            raise o
             
 
     def do_rollback(self, connection):
index 1c9c2bdbf39c812d1cb289b89604c6ef6ae48451..6b2f55522ed89b67873bd5991016ccfb297854aa 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ use_setuptools()
 from setuptools import setup, find_packages
 
 setup(name = "SQLAlchemy",
-    version = "0.3.2",
+    version = "0.3.3",
     description = "Database Abstraction Library",
     author = "Mike Bayer",
     author_email = "mike_mp@zzzcomputing.com",