Illegal group reference error when filtering by specific value

We are getting a wierd error. Using MySQL connector. We are using the builder and trying to pick list of possible values.

field = “Value1” OR field = “Value2” etc …

The problem is that if we are trying to filter by a value which has $ sign or / the query is failing and we are getting an error
Illegal group reference or No group 4

Here is the error from the logs:

:class java.lang.IndexOutOfBoundsException,
:error “No group 4”,
:stacktrace
(“java.util.regex.Matcher.start(Matcher.java:375)”
“java.util.regex.Matcher.appendReplacement(Matcher.java:880)”
“java.util.regex.Matcher.replaceFirst(Matcher.java:1004)”
“clojure.string$replace_first.invokeStatic(string.clj:174)”
“clojure.string$replace_first.invoke(string.clj:138)”
“–> driver.sql.util.unprepare$fn__66933$fn__66937.invoke(unprepare.clj:89)”
“driver.sql.util.unprepare$fn__66933.invokeStatic(unprepare.clj:81)”
“driver.sql.util.unprepare$fn__66933.invoke(unprepare.clj:80)”
“driver.sql_jdbc$fn__67329.invokeStatic(sql_jdbc.clj:65)”
“driver.sql_jdbc$fn__67329.invoke(sql_jdbc.clj:61)”
“query_processor.middleware.splice_params_in_response$splice_params_in_response_STAR_.invokeStatic(splice_params_in_response.clj:17)”
“query_processor.middleware.splice_params_in_response$splice_params_in_response_STAR_.invoke(splice_params_in_response.clj:4)”
“query_processor.middleware.resolve_driver$resolve_driver$fn__40795.invoke(resolve_driver.clj:22)”
“query_processor.middleware.bind_effective_timezone$bind_effective_timezone$fn__36881$fn__36882.invoke(bind_effective_timezone.clj:9)”
“util.date$call_with_effective_timezone.invokeStatic(date.clj:88)”
“util.date$call_with_effective_timezone.invoke(date.clj:77)”
“query_processor.middleware.bind_effective_timezone$bind_effective_timezone$fn__36881.invoke(bind_effective_timezone.clj:8)”
“query_processor.middleware.store$initialize_store$fn__43915$fn__43916.invoke(store.clj:11)”
“query_processor.store$do_with_store.invokeStatic(store.clj:46)”
“query_processor.store$do_with_store.invoke(store.clj:40)”
“query_processor.middleware.store$initialize_store$fn__43915.invoke(store.clj:10)”
“query_processor.middleware.async$async__GT_sync$fn__34195.invoke(async.clj:23)”
“query_processor.middleware.async_wait$runnable$fn__36607.invoke(async_wait.clj:89)”),

Any help will be highly appreciated.

P.S. - we are running the latest possible version.

Hi @david-real
I’m sure you’re seeing this issue:
https://github.com/metabase/metabase/issues/10002 - upvote by clicking :+1: on the first post
In the future, please post “Diagnostic Info” from Admin > Troubleshooting, since saying you’re using “latest” can mean a lot of different things.

Oh ok, here is the info that I have
{
“browser-info”: {
“language”: “en-GB”,
“platform”: “MacIntel”,
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0”,
“vendor”: “”
},
“system-info”: {
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10”,
“java.vendor”: “Private Build”,
“java.vendor.url”: “http://java.oracle.com/”,
“java.version”: “1.8.0_222”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “25.222-b10”,
“os.name”: “Linux”,
“os.version”: “4.4.0-1098-aws”,
“user.language”: “en”,
“user.timezone”: “Etc/UTC”
},
“metabase-info”: {
“databases”: [
“mysql”
],
“hosting-env”: “unknown”,
“application-database”: “h2”,
“run-mode”: “prod”,
“version”: {
“tag”: “v0.33.6”,
“date”: “2019-11-19”,
“branch”: “release-0.33.x”,
“hash”: “be1e0e1”
},
“settings”: {
“report-timezone”: “US/Eastern”
}
}
}

In this case I will have to revert back to 0.31.2 in order to solve that. Thanks

@david-real I would recommend that you migrate away from H2 at some point too:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html