Closed zendesk-jjtheo closed 2 years ago
@zendesk-jjtheo As a workaround, try this.
String sql = SqlFormatter.extend(cfg -> cfg.plusReservedWords("@@SESSION"))
.format("SET @@SESSION.session_track_transaction_info='CHARACTERISTICS';");
System.out.println(sql);
output:
SET
@@SESSION.session_track_transaction_info = 'CHARACTERISTICS';
@vertical-blank Thank you!
@@SESSION
is a reserved word in MySQL. https://dev.mysql.com/doc/refman/8.0/en/session-state-tracking.html The formatter is currently adding a space after the first@
as it's considering it as a special word char.Maybe a same fix as #42 would work? although it's not an operator in MySQL