DBZ-8170 Error caused by database name containing regular keywords
https://issues.redhat.com/browse/DBZ-8170
Error caused by database name containing regular keywords, such as database name: test$user
Welcome as a new contributor to Debezium, @jw-itq. Reviewers, please add missing author name(s) and alias name(s) to the COPYRIGHT.txt and Aliases.txt respectively.
Hi @jw-itq would it be possible to add a test not only for the use case you've described with test$user, but also checking what this change will do should the configuration supply the regular expression contain escaped syntax values, such as test\$user, does this cause such a configuration to no longer work or be interpreted incorrectly?
Hi @jw-itq would it be possible to add a test not only for the use case you've described with
test$user, but also checking what this change will do should the configuration supply the regular expression contain escaped syntax values, such astest\$user, does this cause such a configuration to no longer work or be interpreted incorrectly?
thanks, I will attempt to add a test case. Yes, this could potentially cause test$user not to be interpreted correctly. However, on the JDBC URL, you cannot use $ but you can use \$. If the Matcher.quoteReplacement is used, test$user will still be effective.
Hi @jw-itq would it be possible to add a test not only for the use case you've described with
test$user, but also checking what this change will do should the configuration supply the regular expression contain escaped syntax values, such astest\$user, does this cause such a configuration to no longer work or be interpreted incorrectly?thanks, I will attempt to add a test case. Yes, this could potentially cause test$user not to be interpreted correctly. However, on the JDBC URL, you cannot use $ but you can use $. If the Matcher.quoteReplacement is used, test$user will still be effective.
But you're also adjusting the Predicates class which is used for many other configuration options such as the include and exclude list configurations that we've always communicated that special regex characters should be escaped if they're part of the database, schema, or table name. So we need to consider all those variants with this change imo.
Hi @jw-itq would it be possible to add a test not only for the use case you've described with
test$user, but also checking what this change will do should the configuration supply the regular expression contain escaped syntax values, such astest\$user, does this cause such a configuration to no longer work or be interpreted incorrectly?thanks, I will attempt to add a test case. Yes, this could potentially cause test$user not to be interpreted correctly. However, on the JDBC URL, you cannot use $ but you can use $. If the Matcher.quoteReplacement is used, test$user will still be effective.
But you're also adjusting the
Predicatesclass which is used for many other configuration options such as the include and exclude list configurations that we've always communicated that special regex characters should be escaped if they're part of the database, schema, or table name. So we need to consider all those variants with this change imo.
thanks, the Predicate indeed requires more thought, and I will reconsider the changes regarding the Predicate. Or do you have any better suggestions?