r12972 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12971‎ | r12972 | r12973 >
Date:10:24, 7 February 2006
Author:vibber
Status:old
Tags:
Comment:
Successfully imported a jawiki dump with some manual setup. woo
Modified paths:
  • /trunk/mwdumper/src/org/mediawiki/dumper/gui/DumperGui.java (modified) (history)
  • /trunk/mwdumper/src/org/mediawiki/importer/SqlServerStream.java (modified) (history)

Diff [purge]

Index: trunk/mwdumper/src/org/mediawiki/importer/SqlServerStream.java
@@ -3,6 +3,7 @@
44 import java.io.IOException;
55 import java.sql.Connection;
66 import java.sql.SQLException;
 7+import java.sql.SQLWarning;
78 import java.sql.Statement;
89
910 public class SqlServerStream implements SqlStream {
@@ -20,6 +21,7 @@
2122 Statement statement;
2223 try {
2324 statement = connection.createStatement();
 25+ statement.setEscapeProcessing(false);
2426 statement.execute(sql.toString());
2527 } catch (SQLException e) {
2628 throw new IOException(e.toString());
@@ -29,6 +31,8 @@
3032 public void close() throws IOException {
3133 try {
3234 connection.close();
 35+ } catch (SQLWarning e) {
 36+ e.printStackTrace();
3337 } catch (SQLException e) {
3438 throw new IOException(e.toString());
3539 }
Index: trunk/mwdumper/src/org/mediawiki/dumper/gui/DumperGui.java
@@ -59,7 +59,10 @@
6060 ":" + port +
6161 "/" + // dbname +
6262 "?user=" + username +
63 - "&password=" + password;
 63+ "&password=" + password +
 64+ "&useUnicode=true" +
 65+ "&characterEncoding=UTF-8" +
 66+ "&jdbcCompliantTruncation=false";
6467 System.err.println("Connecting to " + url);
6568 conn = DriverManager.getConnection(url);
6669 connected = true;
@@ -159,6 +162,7 @@
160163 reader.readDump();
161164 stream.close();
162165 } catch(IOException e) {
 166+ e.printStackTrace();
163167 gui.setProgress("FAILED: " + e.getMessage());
164168 }
165169 running = false;

Status & tagging log