-
-
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
Regression in ImportCommand #3237
Comments
Anyone knows how
The above results into:
Other import implementations I saw in PHP would parse the file into multiple statements and execute them one by one but this just passes the file contents to the driver as is. |
Never used it, also unaware of its purpose 😰 |
Linking existing related issue #2700. |
I spent some more time researching and figured out two more things:
This command cannot be fixed across platforms (see, #2700 (comment)), therefore, unless there's a reason to keep is as is, I'd remove it entirely. For the end-user, it can be almost transparently replaced with something like Any objections? |
Fine by me 👍
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/
…On Tue, Aug 7, 2018 at 5:41 AM Sergei Morozov ***@***.***> wrote:
I spent some more time researching and figured out two more things:
1.
Looks like the command relies on a non-documented PDO feature where it
can execute multiple queries at once given the prepared statement emulation
is enabled (source <https://phpdelusions.net/pdo#multiquery>).
Therefore, it doesn't work with non-PDO drivers (mysqli, oci8, sqlsrv
produce an expected syntax error, ibm_db2 silently does nothing).
2.
In its current state, the condition:
https://github.com/doctrine/dbal/blob/df4343721d9981e58afd15eeaf18c885a2399766/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php#L96
always evaluates to false since $conn is a wrapper connection:
https://github.com/doctrine/dbal/blob/df4343721d9981e58afd15eeaf18c885a2399766/lib/Doctrine/DBAL/Tools/Console/ConsoleRunner.php#L98-L99,
therefore, the offending code can at least be removed as dead.
Unless there's a reason to keep this code, I'd remove this command
entirely. For the end-user, it can be almost transparently replaced with
something like mysql < data.sql.
Any objections?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3237 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAJakPcAch9pqPR1WGcqUbwkGtHmAQAeks5uOQxMgaJpZM4VtcKS>
.
|
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. |
On
develop
, the following issue is reported by PHPStan:The issue looks legit. In order to fix the PHPStan job on Travis, I'm going to white-list this issue but it will have to be fixed properly before the release.
The text was updated successfully, but these errors were encountered: