-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OraclePlatform newly escapes backslahes and this leads to a problem #3328
Comments
Please upgrade your DBAL version before reporting an issue
…On Tue, 23 Oct 2018, 13:25 vavra, ***@***.***> wrote:
Bug Report
This statement should return exactly one row and returns nothing
$sql = "SELECT 1 FROM DUAL WHERE '*123' LIKE " .
$this->xgCon->getDatabasePlatform()->quoteStringLiteral('\*%') . " ESCAPE
'\'";
Executed at version
"name": "doctrine/dbal",
"version": "v2.8.0",
At version
"name": "doctrine/dbal",
"version": "v2.5.1",
there is missing function quoteStringLiteral in OraclePlatform
The error is that newer version has in OraclePlatform function
quoteStringLiteral with row
$str = str_replace('\', '\\', $str); // Oracle requires backslashes to be
escaped aswell.
Please remove the function quoteStringLiteral from OraclePlatform.
The only thing that must be esacaped is a quote char and this is done at
AbstractPlatform.
Note. This query
SELECT '' FROM Dual;
executed at Sql Developer is valid, no backslash chars must be escaped and
exactly one backshlash is returned.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3328>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJakE6Tv_5tXvhZ-Eg3i1zwynTH02iXks5unvywgaJpZM4X1V9g>
.
|
Well, it is obvious that in the latest source the bad line still remains: |
The proposed approach seems legit: $platform = $conn->getDatabasePlatform();
$query = $platform->getDummySelectSQL("'\\'");
var_dump($query);
var_dump($conn->fetchColumn($query));
// string(20) "SELECT '\' FROM DUAL"
// string(1) "\" The additional escaping is not needed by default, and 1222e94 doesn't contain any functional tests explaining when exactly it's needed. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug Report
This statement should return exactly one row and returns nothing
Executed at version
"name": "doctrine/dbal",
"version": "v2.8.0",
At version
"name": "doctrine/dbal",
"version": "v2.5.1",
there is missing function quoteStringLiteral in OraclePlatform
The error is that newer version has in OraclePlatform function quoteStringLiteral with row
$str = str_replace('\', '\\', $str); // Oracle requires backslashes to be escaped aswell.
Please remove the function quoteStringLiteral from OraclePlatform.
The only thing that must be esacaped is a quote char and this is done at AbstractPlatform.
Note. This query
executed at Sql Developer is valid, no backslash chars must be escaped and exactly one backshlash is returned.
The text was updated successfully, but these errors were encountered: