Skip to content

Loading…

DDC-300: RunSqlTask needs the ability to parse an SQL file #3766

Closed
doctrinebot opened this Issue · 7 comments

2 participants

@doctrinebot

Jira issue originally created by user brandon.parise:

I made the following assumptions with the patch...

  • Well-formed SQL file with 1 statement per line.
  • No empty lines or comments.
  • Will not continue processing SQL if an error occurs.

Should I assume differently? Or are there more assumptions I should consider?

@doctrinebot

Comment created by @beberlei:

My assumptions are phpMyAdmin biased. All statements are separated by ; - Lines dont matter. Problem here is that ; is a valid sign inside a literal.

@doctrinebot

Comment created by @guilhermeblanco:

We should not be so granular during this execution.
Also, OPTIMIZE, EXPLAIN, SHOW actually returns ResultSets and break the executeUpdate.

The correct way to do it would be using a RowSet support of PDOStatement.

The patch is ok, but a small modification and it'll be great to be merged. I'm assigning this issue to me and marking it as work in progress. I'll try to commit it tonight.

Cheers,

@doctrinebot

Comment created by @guilhermeblanco:

First draft for patch: http://pastie.org/809510

@doctrinebot

Comment created by @beberlei:

Problem is "nextRowset()" is not a method on the Doctrine\DBAL\Driver\Statement interface

@doctrinebot

Comment created by @guilhermeblanco:

In r7306 this issue was fixed.

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.0-ALPHA4 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.