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

SYSTEM_INVISIBLE behaviour not consistent

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3.3
    • 10.3.5
    • Server
    • None
    • All

    Description

      Currently System Invisible behaviour is inconsistent. We can not create index on them , but we can create virtual column based on them and also check constraint based on SYSTEM_INVISIBLE. This should not be allowed.
      There is one more issue , We can also insert data into SYSTEM_INVISIBLE column if we use
      insert like "Insert into t1(a, invisible) values(1,1)" , (invisible is sytem_invisible column). Which is wrong

      Attachments

        Activity

          sachin.setiya.007 Sachin Setiya (Inactive) created issue -
          sachin.setiya.007 Sachin Setiya (Inactive) made changes -
          Field Original Value New Value
          Summary SYSTEM_INVISIBLE behaviour not dd SYSTEM_INVISIBLE behaviour not Consistant
          sachin.setiya.007 Sachin Setiya (Inactive) made changes -
          Component/s Server [ 13907 ]
          Affects Version/s 10.3.3 [ 22644 ]
          Assignee Sachin Setiya [ sachin.setiya.007 ]
          Description Currently System Invisible behaviour is inconsistent. We can not create index on them , but we can create virtual column based on them and also check constraint based on SYSTEM_INVISIBLE. This should not be allowed.
          Environment All

          FWIW, we've had this discussion before.

          elenst
          @sachin: MDEV-10177 says for system-invisible: "Can be queried explicitly, otherwise invisible from everything". However, they can still be used in virtual columns, check constraints and such (at least those created under test_pseudo_invisible can). Is it intentional?

          sachin
          I think yes, we can think of SYSTEM_INVISBLE as ID columns , So user might use them , I am not sure If it is right or wrong

          serg
          yeah, I think it's ok. a user cannot drop/modify them, but virtual columns and check constraints just reading, like selects

          elenst Elena Stepanova added a comment - FWIW, we've had this discussion before. elenst @sachin: MDEV-10177 says for system-invisible: "Can be queried explicitly, otherwise invisible from everything". However, they can still be used in virtual columns, check constraints and such (at least those created under test_pseudo_invisible can). Is it intentional? sachin I think yes, we can think of SYSTEM_INVISBLE as ID columns , So user might use them , I am not sure If it is right or wrong serg yeah, I think it's ok. a user cannot drop/modify them, but virtual columns and check constraints just reading, like selects

          But I think after this serg said we need a more homogeneous behaviour.

          sachin.setiya.007 Sachin Setiya (Inactive) added a comment - But I think after this serg said we need a more homogeneous behaviour.
          sachin.setiya.007 Sachin Setiya (Inactive) added a comment - - edited

          elenst
          okay then. It seemed kind of odd that you can use it in a check constraint but not in an index, but apart from "odd", i don't have any grounds for objections.

          sachin
          I think check constraint should not be allowed , user should not put a rule on column which is created by system (edited)

          serg
          I don't have a strong opinion, either way is fine, whatever is easier to do. Not allowing them anywhere is ok, allowing them in indexes is also ok.

          marko
          if we allow them in unique indexes or FOREIGN KEY, we should allow them in CHECK constraints too, for the sake of consistency.

          sachin.setiya.007 Sachin Setiya (Inactive) added a comment - - edited elenst okay then. It seemed kind of odd that you can use it in a check constraint but not in an index, but apart from "odd", i don't have any grounds for objections. sachin I think check constraint should not be allowed , user should not put a rule on column which is created by system (edited) serg I don't have a strong opinion, either way is fine, whatever is easier to do. Not allowing them anywhere is ok, allowing them in indexes is also ok. marko if we allow them in unique indexes or FOREIGN KEY, we should allow them in CHECK constraints too, for the sake of consistency.
          sachin.setiya.007 Sachin Setiya (Inactive) made changes -
          Description Currently System Invisible behaviour is inconsistent. We can not create index on them , but we can create virtual column based on them and also check constraint based on SYSTEM_INVISIBLE. This should not be allowed. Currently System Invisible behaviour is inconsistent. We can not create index on them , but we can create virtual column based on them and also check constraint based on SYSTEM_INVISIBLE. This should not be allowed.
          There is one more issue , We can also insert data into SYSTEM_INVISIBLE column if we use
          insert like <<code>>Insert into t1(a, invisible) values(1,1)<</code>> , (invisible is sytem_invisible column). Which is wrong
          sachin.setiya.007 Sachin Setiya (Inactive) made changes -
          Description Currently System Invisible behaviour is inconsistent. We can not create index on them , but we can create virtual column based on them and also check constraint based on SYSTEM_INVISIBLE. This should not be allowed.
          There is one more issue , We can also insert data into SYSTEM_INVISIBLE column if we use
          insert like <<code>>Insert into t1(a, invisible) values(1,1)<</code>> , (invisible is sytem_invisible column). Which is wrong
          Currently System Invisible behaviour is inconsistent. We can not create index on them , but we can create virtual column based on them and also check constraint based on SYSTEM_INVISIBLE. This should not be allowed.
          There is one more issue , We can also insert data into SYSTEM_INVISIBLE column if we use
          insert like "Insert into t1(a, invisible) values(1,1)" , (invisible is sytem_invisible column). Which is wrong
          sachin.setiya.007 Sachin Setiya (Inactive) made changes -
          Attachment a.patch [ 44813 ]

          But I think after this serg said we need a more homogeneous behaviour.

          Okay, thanks, good, I must have missed or forgotten that part. I am certainly for consistency – was then and still am.

          elenst Elena Stepanova added a comment - But I think after this serg said we need a more homogeneous behaviour. Okay, thanks, good, I must have missed or forgotten that part. I am certainly for consistency – was then and still am.
          serg Sergei Golubchik made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          elenst Elena Stepanova made changes -
          Summary SYSTEM_INVISIBLE behaviour not Consistant SYSTEM_INVISIBLE behaviour not consistent

          sachin.setiya.007, please also consider the following in regard to system-invisible columns – maybe some changes are due here as well:

          • show fields in does not show them, but show index in does
          • EITS collects stats for them and stores in stat tables
          • if they form a constraint together with normal columns, those normal columns can't be dropped

          The above is based on the assumption that the current variant of system versioning without explicit versioning columns exhibits the typical behavior of system-invisible columns.

          elenst Elena Stepanova added a comment - sachin.setiya.007 , please also consider the following in regard to system-invisible columns – maybe some changes are due here as well: show fields in does not show them, but show index in does EITS collects stats for them and stores in stat tables if they form a constraint together with normal columns, those normal columns can't be dropped The above is based on the assumption that the current variant of system versioning without explicit versioning columns exhibits the typical behavior of system-invisible columns.
          serg Sergei Golubchik made changes -
          Fix Version/s 10.3 [ 22126 ]
          serg Sergei Golubchik made changes -
          Sprint 10.1.31 [ 225 ]
          sachin.setiya.007 Sachin Setiya (Inactive) made changes -
          Assignee Sachin Setiya [ sachin.setiya.007 ] Sergei Golubchik [ serg ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Sachin Setiya [ sachin.setiya.007 ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          serg Sergei Golubchik made changes -
          Assignee Sachin Setiya [ sachin.setiya.007 ] Sergei Golubchik [ serg ]
          serg Sergei Golubchik made changes -
          Sprint 10.1.31 [ 225 ] 10.1.31, 10.3.5-1 [ 225, 229 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.3.5 [ 22905 ]
          Fix Version/s 10.3 [ 22126 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Sprint 10.1.31, 10.3.5-1 [ 225, 229 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 84621 ] MariaDB v4 [ 153449 ]

          People

            serg Sergei Golubchik
            sachin.setiya.007 Sachin Setiya (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.