Unverified Commit 931a247c authored by aiwenmo's avatar aiwenmo Committed by GitHub

[Fix-2947] Fix the issue of missing single quotes in the default value of MySQL…

[Fix-2947] Fix the issue of missing single quotes in the default value of MySQL table building statements (#3001) Co-authored-by: 's avatarwenmo <32723967+wenmo@users.noreply.github.com>
parent 722e38fc
...@@ -108,7 +108,7 @@ public class MySqlDriver extends AbstractJdbcDriver { ...@@ -108,7 +108,7 @@ public class MySqlDriver extends AbstractJdbcDriver {
final String dv = column.getDefaultValue(); final String dv = column.getDefaultValue();
String defaultValue = Asserts.isNotNull(dv) String defaultValue = Asserts.isNotNull(dv)
? String.format(" DEFAULT %s", dv.isEmpty() ? "\"\"" : dv) ? String.format(" DEFAULT '%s'", dv.isEmpty() ? "''" : dv)
: String.format("%s NULL ", !column.isNullable() ? " NOT " : ""); : String.format("%s NULL ", !column.isNullable() ? " NOT " : "");
return String.format( return String.format(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment