File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -2888,7 +2888,14 @@ private function translate_show_like_or_where_condition( WP_Parser_Node $like_or
2888
2888
}
2889
2889
2890
2890
/**
2891
- * Translate INSERT body, emulating MySQL implicit defaults in non-strict mode.
2891
+ * Translate INSERT or REPLACE statement body to SQLite, while emulating
2892
+ * the behavior of MySQL implicit default values in non-strict mode.
2893
+ *
2894
+ * Rewrites a statement body in the following form:
2895
+ * INSERT INTO table (optionally some columns) <select-or-values>
2896
+ * To a statement body with the following structure:
2897
+ * INSERT INTO table (all table columns)
2898
+ * SELECT <non-strict-mode-adjusted-values> FROM (<select-or-values>) WHERE true
2892
2899
*
2893
2900
* In MySQL, the behavior of INSERT and UPDATE statements depends on whether
2894
2901
* the STRICT_TRANS_TABLES (InnoDB) or STRICT_ALL_TABLES SQL mode is enabled.
@@ -3024,6 +3031,11 @@ private function translate_insert_or_replace_body_in_non_strict_mode(
3024
3031
/**
3025
3032
* Translate UPDATE list, emulating MySQL implicit defaults in non-strict mode.
3026
3033
*
3034
+ * Rewrites an UPDATE statement list in the following form:
3035
+ * UPDATE table SET <non-null-column> = <value>
3036
+ * To a list with the following structure:
3037
+ * UPDATE table SET <non-null-column> = COALESCE(<value>, <implicit-default>)
3038
+ *
3027
3039
* In MySQL, the behavior of INSERT and UPDATE statements depends on whether
3028
3040
* the STRICT_TRANS_TABLES (InnoDB) or STRICT_ALL_TABLES SQL mode is enabled.
3029
3041
*
You can’t perform that action at this time.
0 commit comments