diff --git a/src/java/org/apache/sqoop/mapreduce/MySQLDumpMapper.java b/src/java/org/apache/sqoop/mapreduce/MySQLDumpMapper.java index 4ec65ef7..2b94271f 100644 --- a/src/java/org/apache/sqoop/mapreduce/MySQLDumpMapper.java +++ b/src/java/org/apache/sqoop/mapreduce/MySQLDumpMapper.java @@ -103,6 +103,10 @@ public void run() { break; // EOF. } + if (inLine.trim().length() == 0 || inLine.startsWith("--")) { + continue; // comments and empty lines are ignored + } + // this line is of the form "INSERT .. VALUES ( actual value text // );" strip the leading preamble up to the '(' and the trailing // ');'. @@ -236,6 +240,10 @@ public void run() { break; // EOF. } + if (inLine.trim().length() == 0 || inLine.startsWith("--")) { + continue; // comments and empty lines are ignored + } + // this line is of the form "INSERT .. VALUES ( actual value text // );" strip the leading preamble up to the '(' and the trailing // ');'.