Currently comint.el does not respect local values of comint-input-ring-separator. Sql mode on the other hand sets it locally. This prevents multi-line sql history from working. Sql history is stored using comint-write-input-ring. When it saves the history file, it uses with-current-buffer, thus ignoring previous local value. When read comint-read-input-ring uses with-temp-buffer with similar results. This seems to have been caused by the fix for this bug . -- Best Regards, Nikolay Kudryavtsev