summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-11-28 12:37:15 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-11-28 12:37:15 -0500
commitbb60a8ad946dd331f546f06a156b7ebb87d1709d (patch)
treed530604307af524dc87355811fd103718114c258 /lib/sqlalchemy/dialects/mysql/base.py
parent106e793d0573b5bcd1ddee549bca1a546aa13972 (diff)
downloadsqlalchemy-bb60a8ad946dd331f546f06a156b7ebb87d1709d.tar.gz
- work in progress, will squash
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/mysql/base.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py
index 324ff2d36..971005a84 100644
--- a/lib/sqlalchemy/dialects/mysql/base.py
+++ b/lib/sqlalchemy/dialects/mysql/base.py
@@ -1437,17 +1437,10 @@ class MySQLCompiler(compiler.SQLCompiler):
self.process(join.onclause, **kwargs)))
def for_update_clause(self, select):
- # backwards compatibility
- if isinstance(select.for_update, bool):
- return ' FOR UPDATE'
- elif isinstance(select.for_update, str):
- if select.for_update == 'read':
- return ' LOCK IN SHARE MODE'
-
- if select.for_update.mode == 'read':
- return ' LOCK IN SHARE MODE'
+ if select._for_update_arg.read:
+ return " LOCK IN SHARE MODE"
else:
- return super(MySQLCompiler, self).for_update_clause(select)
+ return " FOR UPDATE"
def limit_clause(self, select):
# MySQL supports: