Refrain from controling the encoding in pgloader, qmynd now handles it.

This commit is contained in:
Dimitri Fontaine 2014-03-02 01:23:16 +01:00
parent f92817191e
commit 42635c70bd
2 changed files with 3 additions and 5 deletions

View File

@ -33,6 +33,7 @@
(defun batch-row (row copy queue)
"Add ROW to the reader batch. When the batch is full, provide it to the
writer as the *writer-batch*."
(log-message :data "< ~s" row)
(let ((oversized? (oversized? *current-batch*)))
(when (or (= (batch-count *current-batch*) *copy-batch-rows*)
oversized?)

View File

@ -60,13 +60,10 @@
(defmethod map-rows ((mysql copy-mysql) &key process-row-fn)
"Extract MySQL data and call PROCESS-ROW-FN function with a single
argument (a list of column values) for each row."
(let ((dbname (source-db mysql))
(table-name (source mysql)))
(let ((dbname (source-db mysql))
(table-name (source mysql)))
(with-mysql-connection (dbname)
(mysql-query "SET NAMES 'utf8'")
(mysql-query "SET character_set_results = utf8;")
(let* ((cols (get-column-list dbname table-name))
(sql (format nil "SELECT ~{~a~^, ~} FROM `~a`;" cols table-name))
(row-fn