0

when i try to execute this

<pdosqlexec 
    url="${pdo_driver}:host=${host};dbname=${db.name};" 
    userid="${mysql_user}" 
    password="${mysql_pwd}" 
    encoding="utf8" 
    onerror="abort">
    <fileset dir="./cache/mysql/">
        <include name="dump.sql"/>
    </fileset>
    <formatter type="plain" outfile="./cache/mysql/output4.txt"/>
</pdosqlexec>

i get a segmentation fault, and the loading of the dump.sql is interrupted. Any solution?

Easly
  • 334
  • 2
  • 11
  • what did you do to debug the problem? – cweiske Mar 19 '13 at 10:59
  • actually i don't know what to do to debug the problem.. – Easly Mar 19 '13 at 11:04
  • Use a smaller dump file, use no dump file, change encoding, change password, write some plain php code that does the same as the phing code and see where it fails by removing/commenting lines out. Also, update PHP to the latest version. This will most likely fix the problem. – cweiske Mar 19 '13 at 11:07
  • what i've noticed is that with small dump files it never triggers the Segmentation fault error (talking about less then 4MB dump) but my dump are much bigger.. and it is a problem if it doesn't work – Easly Mar 19 '13 at 11:19

1 Answers1

1

You can try add delimitertype="row" option to pdosqlexec. For me this solution helps load files larger then 4 MB

full example of use

<pdosqlexec
    url="mysql:host=${DB_HOST};dbname=${DB_NAME}"
    userid="${DB_USER}"
    password="${DB_PASS}"
    delimitertype="row">
        <transaction src="${DB_SCHEMA_PATH}/notus-backend.sql"/>
        <formatter type="plain" outfile="${LOG_PATH}/phing.CreateTables.log"/>
</pdosqlexec>
cweiske
  • 30,033
  • 14
  • 133
  • 194
Alexey
  • 157
  • 1
  • 1
  • 8