" MAX_ROWS=200000000"
"")
(if (eq *umls-sql-type* :mysql)
- " TYPE=MYISAM CHARACTER SET utf8"
+ " ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_bin"
""))))
(defun create-custom-table-cmd (tablename sql-cmd)
(let ((translated-lines 0)
(input-lines 0)
(eof (cons nil nil)))
- (catch 'done-counting
- (with-open-file (ts output-path :direction :input
- #+(and sbcl sb-unicode) :external-format
- #+(and sbcl sb-unicode) :UTF-8
- #+(and allegro ics) :external-format
- #+(and allegro ics) :UTF-8
- #+lispworks :external-format
- #+lispworks :UTF-8
- #+(and clisp unicode) :external-format
- #+(and clisp unicode) charset:utf-8)
- (do ((c (read-char ts nil eof) (read-char ts nil eof)))
- ((eq c eof))
- (when (eql c #\newline)
- (incf translated-lines))))
- (dolist (input-ufile input-ufiles)
- (with-umls-ufile (line input-ufile)
- (incf input-lines)
- (when (> input-lines translated-lines)
- (throw 'done-counting 'incomplete)))))
+ (with-open-file (ts output-path :direction :input
+ #+(and sbcl sb-unicode) :external-format
+ #+(and sbcl sb-unicode) :UTF-8
+ #+(and allegro ics) :external-format
+ #+(and allegro ics) :UTF-8
+ #+lispworks :external-format
+ #+lispworks :UTF-8
+ #+(and clisp unicode) :external-format
+ #+(and clisp unicode) charset:utf-8)
+ (do ((c (read-char ts nil eof) (read-char ts nil eof)))
+ ((eq c eof))
+ (when (eql c #\newline)
+ (incf translated-lines))))
+ (dolist (input-ufile input-ufiles)
+ (with-umls-ufile (line input-ufile)
+ (incf input-lines)
+ (when (> input-lines translated-lines)
+ (return))))
(cond
((< input-lines translated-lines)
(format t "Translated file ~A incomplete, deleting...~%" output-path)