Commit 928274e1 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fixup! ZMySQLDA: support isolation level per connector.

parent 89f517c8
......@@ -50,6 +50,7 @@ from Products.ERP5Type.mixin.response_header_generator import ResponseHeaderGene
from zLOG import LOG, INFO, WARNING, ERROR
from zExceptions import BadRequest
import os
import re
import warnings
import transaction
from App.config import getConfiguration
......@@ -2291,8 +2292,7 @@ class ERP5Generator(PortalGenerator):
# The only difference compared to activity connection is the
# minus prepended to the connection string.
if id == 'erp5_sql_transactionless_connection':
index = [i for i, x in enumerate(p.cmf_activity_sql_connection_string.split()) if not x[0] in ('%', '*', '!')][0]
connection_string = ' '.join('-' + x if i == index else x for i, x in enumerate(p.cmf_activity_sql_connection_string.split()))
connection_string = '-' + re.sub(r'^([%*!][^ ]+ )*[+-]?', '', p.cmf_activity_sql_connection_string)
else:
connection_string = getattr(p, id + '_string')
manage_add(id, title, connection_string, **kw)
......
......@@ -110,9 +110,8 @@ def _getConnectionStringDict():
connection_string_dict[connection] = connection_string
connection = 'erp5_sql_transactionless_connection_string'
if os.environ.get(connection, connection_string):
index = [i for i, x in enumerate(connection_string.split()) if not x[0] in ('%', '*', '!')][0]
connection_string_dict[connection] = \
connection_string = ' '.join('-' + x if i == index else x for i, x in enumerate(connection_string.split()))
os.environ.get(connection, '-' + re.sub(r'^([%*!][^ ]+ )*[+-]?', '', connection_string)
return connection_string_dict
def _getConversionServerUrlList():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment