Skip to content

MySQL mode does not respect IGNORECASE/CASE_INSENSITIVE_IDENTIFIERS in 'on duplicate key update' part (H2 2.3.232) #4238

Closed

Description

@kalgon

The following code does not work in MySQL mode with IGNORECASE=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE:

create table foo (
  id bigint not null auto_increment,
  bar varchar2 not null,
  primary key (id),
  unique (bar)
);

insert into FOO (bar) values ('bar'); -- works

select bar from FOO; -- works

insert into FOO (bar) values ('bar') on duplicate key update foo.id = foo.id; -- works

insert into FOO (bar) values ('bar') on duplicate key update FOO.id = FOO.id; -- error: [Table "FOO" not found; SQL statement:]

Activity

  1. katzyn commented on Jun 17, 2025

    @katzyn
    Contributor

    You should always use DATABASE_TO_LOWER=TRUE together with MySQL compatibility mode.

    CASE_INSENSITIVE_IDENTIFIERS=TRUE is only needed when your application uses standard quoted identifiers ("FOO") in incorrect way, but MySQL doesn't use this type of identifiers unless ANSI_QUOTES are enabled, so usually you don't need this setting at all.

    Anyway, it somehow breaks this weird compatibility syntax, so there is a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions