Hello,
it hits this case:
} else if ((storesMixedCase || storesLowerCase) &&
columnName.equals(StringUtils.toLowerEnglish(columnName))) {
columnName = StringUtils.toUpperEnglish(columnName);
- storesMixedCase is false
- storesLowerCase is true
- column name is "rf" so "rf".equals( StringUtils.toLowerEnglish("rf"))
I further traced the problem down to the statement which really fails
("update rfd set rf=false").
For some reason that I need to find out separately the variable emitUpdates
is false so the code tries to execute a delete followed by an insert.
Building the delete ("DELETE FROM RFD where "RF"=?) inserts the name of the
column (LinkedIndex.java, Line 217) using a routine named "addColumnName".
This routine fetches the name of the column ( LinkedIndex.java, Line 136)
which is now upper case.
I applied a hot patch there, converting the name to lower and everything
works.
Looks we have the smoking gun here. It only needs a better way to fix that
problem than my hot patch.
Maybe it's a bit naive, but wouldn't it be possible to store the original
name beside the local name and reflect that original name back to the
linked database?
That might make a lot of complicated logic unnecessary.
BR
Gerhard
On Fri, Oct 14, 2022 at 8:44 AM Noel Grandin <[email protected]> wrote:
> Firstly, let me congratulate you some very good debugging!
>
> On Fri, 14 Oct 2022 at 08:05, Gerhard Duennebeil <
> [email protected]> wrote:
>
>>
>> Within the routine at line 199 a routine is called "n =
>> convertColumnName(n);"
>>
>>
> Can you debug into that convertColumnName and see which of the 4 if
> branches it is hitting?
> and what values the
>
> storesMixedCase
>
> storesLowerCase
>
> storesMixedCaseQuoted
>
> supportsMixedCaseIdentifiers
>
> fields have ?
>
> It is possible we may have to add another special case, to make
> Postgresql happy.
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/h2-database/CAFYHVnVUyBa9x4DhkZXBH1a00n6Dx9qrZNHxmN97yc0bAk7wUw%40mail.gmail.com
> <https://groups.google.com/d/msgid/h2-database/CAFYHVnVUyBa9x4DhkZXBH1a00n6Dx9qrZNHxmN97yc0bAk7wUw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/h2-database/CAJxppmYWbsW-j9P0beRB7Rxfnvk01-4gU%3D6DFZjfjaN9ZaUuvg%40mail.gmail.com.