Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33749

a hyphen in table name can cause galera certification failures

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.11.7
    • 10.5.5
    • Galera
    • None

    Description

      If a table or database name contains a hyphen '-' and the table is referenced by a foreign key constraint, then inserts in the foreign key referencing table will append into the galera replication key set values, which have distorted able or database component.
      As a consequence, any DML operation on the FK referenced table is not detected as conflicting operation with inserts into the FK referencing table, in the galera certification.

      Attachments

        Activity

          seppo Seppo Jaakola added a comment -

          attached a mtr test, which can make the issue to surface
          Test is not deterministic, several rounds will be needed
          Should be possible to execute the test e.g. in innodb suite, just to debug how table name is presented in innodb foreign structure

          seppo Seppo Jaakola added a comment - attached a mtr test, which can make the issue to surface Test is not deterministic, several rounds will be needed Should be possible to execute the test e.g. in innodb suite, just to debug how table name is presented in innodb foreign structure
          seppo Seppo Jaakola added a comment -

          rr debugger of the mtr test execution gives following intel:

          table_share structure for the update of `par-ent` table:
            table_cache_key = {
              str = 0x7efc24026a90 "test",
              length = 13
            },
            db = {
              str = 0x7efc24026a90 "test",
              length = 4
            },
            table_name = {
              str = 0x7efc24026a95 "par-ent",
              length = 7
            },
            path = {
              str = 0x7efc24026aa8 "./test/par@002dent",
              length = 18
            },
            normalized_path = {
              str = 0x7efc24026aa8 "./test/par@002dent",
              length = 18
            },
          

          foreing strucure in the child table insert:

          $3 = {
            heap = 0x7efc2403ac18,
            id = 0x7efc24033a18 "test/child_ibfk_1",
            n_fields = 1,
            type = 0,
            foreign_table_name = 0x7efc24033a38 "test/child",
            foreign_table_name_lookup = 0x7efc24033a38 "test/child",
            foreign_table = 0x7efc2403d968,
            foreign_col_names = 0x7efc24033a48,
            referenced_table_name = 0x7efc24033a50 "test/par@002dent",
            referenced_table_name_lookup = 0x7efc24033a50 "test/par@002dent",
            referenced_table = 0x7efc24032f88,
            referenced_col_names = 0x7efc24033a70,
            foreign_index = 0x7efc24038418,
            referenced_index = 0x7efc24035488,
            v_cols = 0x0
          }
          

          seppo Seppo Jaakola added a comment - rr debugger of the mtr test execution gives following intel: table_share structure for the update of `par-ent` table: table_cache_key = { str = 0x7efc24026a90 "test", length = 13 }, db = { str = 0x7efc24026a90 "test", length = 4 }, table_name = { str = 0x7efc24026a95 "par-ent", length = 7 }, path = { str = 0x7efc24026aa8 "./test/par@002dent", length = 18 }, normalized_path = { str = 0x7efc24026aa8 "./test/par@002dent", length = 18 }, foreing strucure in the child table insert: $3 = { heap = 0x7efc2403ac18, id = 0x7efc24033a18 "test/child_ibfk_1", n_fields = 1, type = 0, foreign_table_name = 0x7efc24033a38 "test/child", foreign_table_name_lookup = 0x7efc24033a38 "test/child", foreign_table = 0x7efc2403d968, foreign_col_names = 0x7efc24033a48, referenced_table_name = 0x7efc24033a50 "test/par@002dent", referenced_table_name_lookup = 0x7efc24033a50 "test/par@002dent", referenced_table = 0x7efc24032f88, referenced_col_names = 0x7efc24033a70, foreign_index = 0x7efc24038418, referenced_index = 0x7efc24035488, v_cols = 0x0 }
          seppo Seppo Jaakola added a comment - PR submitted: https://github.com/MariaDB/server/pull/3164

          Pushed to 10.5 branch

          monty Michael Widenius added a comment - Pushed to 10.5 branch

          People

            monty Michael Widenius
            seppo Seppo Jaakola
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.