diff --git a/CHANGELOG.md b/CHANGELOG.md index e193d01f..6e3fcb0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changes +* 2.4.next in progress + * Fix [#441](https://github.com/seancorfield/honeysql/issues/441) by adding `:replace-into` to in-flight clause order (as well as registering it for the `:mysql` dialect). + * 2.4.947 -- 2022-11-05 * Fix [#439](https://github.com/seancorfield/honeysql/issues/439) by rewriting how DDL options are processed; also fixes [#386](https://github.com/seancorfield/honeysql/issues/386) and [#437](https://github.com/seancorfield/honeysql/issues/437); **Whilst this is intended to be purely a bug fix, it has the potential to be a breaking change -- hence the version jump to 2.4!** * Fix [#438](https://github.com/seancorfield/honeysql/issues/438) by diff --git a/src/honey/sql.cljc b/src/honey/sql.cljc index f91589f7..b8e51f00 100644 --- a/src/honey/sql.cljc +++ b/src/honey/sql.cljc @@ -106,8 +106,12 @@ :mysql {:quote #(strop \` % \`) :clause-order-fn #(do + ;; side-effect: updates global clauses... (register-clause! :replace-into :insert-into :insert-into) - (add-clause-before % :set :where))} + (-> % + (add-clause-before :set :where) + ;; ...but not in-flight clauses: + (add-clause-before :replace-into :insert-into)))} :oracle {:quote #(strop \" % \") :as false}}))) ; should become defonce