[Erp5-report] r16312 - in /erp5/trunk/products: ZMySQLDA/ ZMySQLDDA/
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Sep 12 18:19:20 CEST 2007
Author: vincent
Date: Wed Sep 12 18:19:19 2007
New Revision: 16312
URL: http://svn.erp5.org?rev=16312&view=rev
Log:
Add a connection string prefix to allow access to "compress" option of MySQL connector.
WARNING: this is an upstream-incompatible feature. If upstream allows access to compression in another way and you enable this feature, you will have to update your connection string yourself.
Modified:
erp5/trunk/products/ZMySQLDA/connectionAdd.dtml
erp5/trunk/products/ZMySQLDA/db.py
erp5/trunk/products/ZMySQLDDA/connectionAdd.dtml
erp5/trunk/products/ZMySQLDDA/db.py
Modified: erp5/trunk/products/ZMySQLDA/connectionAdd.dtml
URL: http://svn.erp5.org/erp5/trunk/products/ZMySQLDA/connectionAdd.dtml?rev=16312&r1=16311&r2=16312&view=diff
==============================================================================
--- erp5/trunk/products/ZMySQLDA/connectionAdd.dtml (original)
+++ erp5/trunk/products/ZMySQLDA/connectionAdd.dtml Wed Sep 12 18:19:19 2007
@@ -49,7 +49,7 @@
The connection string used for Z MySQL Database Connection
is of the form:
<pre>
- [*lock] [+/-][database][@host[:port]] [user [password [unix_socket]]]
+ [~] [*lock] [+/-][database][@host[:port]] [user [password [unix_socket]]]
</pre>
or typically:
<pre>
@@ -76,7 +76,10 @@
supports TSTs, use '-'. If you require transactions, use '+'. If
you aren't sure, don't use either.
<p>
- *<em>lock</em> at the begining of the connection string means to
+ A '~' at the begining of the connection string enables client-server
+ exchange compression (if supported by both client and server).
+<p>
+ *<em>lock</em> means to
psuedo-transactional. When the transaction begins, it will acquire
a lock on the server named <em>lock</em> (i.e. MYLOCK). When the
transaction commits, the lock will be released. If the transaction
Modified: erp5/trunk/products/ZMySQLDA/db.py
URL: http://svn.erp5.org/erp5/trunk/products/ZMySQLDA/db.py?rev=16312&r1=16311&r2=16312&view=diff
==============================================================================
--- erp5/trunk/products/ZMySQLDA/db.py (original)
+++ erp5/trunk/products/ZMySQLDA/db.py Wed Sep 12 18:19:19 2007
@@ -200,6 +200,10 @@
items = split(connection)
self._use_TM = None
if not items: return kwargs
+ compress = items[0]
+ if compress == "~":
+ kwargs['compress'] = True
+ items = items[1:]
lockreq, items = items[0], items[1:]
if lockreq[0] == "*":
self._mysql_lock = lockreq[1:]
Modified: erp5/trunk/products/ZMySQLDDA/connectionAdd.dtml
URL: http://svn.erp5.org/erp5/trunk/products/ZMySQLDDA/connectionAdd.dtml?rev=16312&r1=16311&r2=16312&view=diff
==============================================================================
--- erp5/trunk/products/ZMySQLDDA/connectionAdd.dtml (original)
+++ erp5/trunk/products/ZMySQLDDA/connectionAdd.dtml Wed Sep 12 18:19:19 2007
@@ -49,7 +49,7 @@
The connection string used for Z MySQL Database Connection
is of the form:
<pre>
- [*lock] [+/-][database][@host[:port]] [user [password [unix_socket]]]
+ [~] [*lock] [+/-][database][@host[:port]] [user [password [unix_socket]]]
</pre>
or typically:
<pre>
@@ -76,7 +76,10 @@
supports TSTs, use '-'. If you require transactions, use '+'. If
you aren't sure, don't use either.
<p>
- *<em>lock</em> at the begining of the connection string means to
+ A '~' at the begining of the connection string enables client-server
+ exchange compression (if supported by both client and server).
+<p>
+ *<em>lock</em> means to
psuedo-transactional. When the transaction begins, it will acquire
a lock on the server named <em>lock</em> (i.e. MYLOCK). When the
transaction commits, the lock will be released. If the transaction
Modified: erp5/trunk/products/ZMySQLDDA/db.py
URL: http://svn.erp5.org/erp5/trunk/products/ZMySQLDDA/db.py?rev=16312&r1=16311&r2=16312&view=diff
==============================================================================
--- erp5/trunk/products/ZMySQLDDA/db.py (original)
+++ erp5/trunk/products/ZMySQLDDA/db.py Wed Sep 12 18:19:19 2007
@@ -198,6 +198,10 @@
items = split(connection)
self._use_TM = None
if not items: return kwargs
+ compress = items[0]
+ if compress == "~":
+ kwargs['compress'] = True
+ items = items[1:]
lockreq, items = items[0], items[1:]
if lockreq[0] == "*":
self._mysql_lock = lockreq[1:]
More information about the Erp5-report
mailing list