Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-300

RunSqlTask needs the ability to parse an SQL file

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-ALPHA4
    • Fix Version/s: 2.0-ALPHA4
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None

      Description

      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?

        Activity

        Hide
        beberlei Benjamin Eberlei added a comment -

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

        Show
        beberlei Benjamin Eberlei added a comment - My assumptions are phpMyAdmin biased. All statements are separated by ; - Lines dont matter. Problem here is that ; is a valid sign inside a literal.
        Hide
        guilhermeblanco Guilherme Blanco added a comment -

        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,

        Show
        guilhermeblanco Guilherme Blanco added a comment - 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,
        Hide
        guilhermeblanco Guilherme Blanco added a comment -

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

        Show
        guilhermeblanco Guilherme Blanco added a comment - First draft for patch: http://pastie.org/809510
        Hide
        beberlei Benjamin Eberlei added a comment -

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

        Show
        beberlei Benjamin Eberlei added a comment - Problem is "nextRowset()" is not a method on the Doctrine\DBAL\Driver\Statement interface
        Hide
        guilhermeblanco Guilherme Blanco added a comment -

        In r7306 this issue was fixed.

        Show
        guilhermeblanco Guilherme Blanco added a comment - In r7306 this issue was fixed.

          People

          • Assignee:
            guilhermeblanco Guilherme Blanco
            Reporter:
            brandon.parise Brandon Parise
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: