-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix getTableNames for cockroachdb #3752
Conversation
The query to fetch table names was incorrectly including internal tables that are part of the crdb_internal schema.
CockroachDB has auto-commit, so forcing a commit would result in an error.
85aadff
to
9ce12ce
Compare
Thanks @rafiss for the PR. I have some questions for the changes. The table name filter that we are using is We are also getting the Is it possible that this is some kind of a bug in cockroachdb? Thanks for the improvements with |
Thanks for taking a look!
That's because when using LIKE in both PostgreSQL and CockroachDB,
I used Wireshark to capture the query that Flowable was sending. It was this:
From a read of the PGJDBC Lines 100 to 111 in 09fe1bd
|
Thanks for pointing that out. Seems like a bug in that case. In that case a solution like the one for Oracle would work here I guess. e.g. if we do tableNameFilter = databaseTablePrefix + flowableTablePrefix.toLowerCase(Locale.ROOT) + databaseMetaData.getSearchStringEscape() +"_%"; I'll talk with the rest of the team and we'll try to merge this as soon as possible.
I made a wrong assumption. I was thinking that the user does not have access to the schema. However, the problem is that the user does have access, so we will get it when querying from the database metatada. The problem happens when we try to get the count. |
Hi! Just wanted to check if that fix you mentioned above is still going in?
|
Thanks for the ping @rafiss, sorry that it took a bit longer. I've pushed a fix for this in 3eca3b9. I believe that this now solves the problem then you are having. Can you perhaps try with what is on main? Apart from the |
The query to fetch table names was incorrectly including internal tables that are part of the crdb_internal schema.
Previously, running tests would fail with an error:
Check List: