From b202d73b46ffeabae0f954d5f87b85d6dbc5a001 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 3 May 2011 11:09:30 +0000 Subject: [PATCH] bug fix for MSSQL identificators which were starting with d, b, o and . Thing is that .lstrip strips all occurances of the given chars :) (spotted ancidentally) --- lib/core/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index 8969e6a65..21f687c15 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -2571,7 +2571,9 @@ def unsafeSQLIdentificatorNaming(name): elif Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE, DBMS.PGSQL): retVal = name.replace("\"", "") if Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE): - retVal = retVal.lstrip("%s." % DEFAULT_MSSQL_SCHEMA) + prefix = "%s." % DEFAULT_MSSQL_SCHEMA + if retVal.startswith(prefix): + retVal = retVal[len(prefix):] return retVal