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

View created as "select b''; " references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

Details

    Description

      Test:

      CREATE VIEW v1 as select b'';
      SELECT * FROM v1;
      DROP VIEW v1;
      

      Actual value:

      At line 3: query 'SELECT * FROM v1' failed: 1356: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
      

      Expected value:

      b''
      
      

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov added a comment - sanja , please review a patch: https://github.com/MariaDB/server/commit/7b4c7fb949d23ce0be64081e0cb6684d286a1c07

            Patch looks OK, but you should also remove :

            #enable after fix MDEV-28696
            --disable_view_protocol
            ...
            --enable_view_protocol
            

            in mysql-test/main/varbinary.test

            sanja Oleksandr Byelkin added a comment - Patch looks OK, but you should also remove : #enable after fix MDEV-28696 --disable_view_protocol ... --enable_view_protocol in mysql-test/main/varbinary.test

            Done. Here's a fixed version:

            https://github.com/MariaDB/server/commit/5798380a384fb44728242a3cd7851235454c6fc1

            Now this test passes:

            ./mtr --view-protocol main.varbinary
            

            It failed before the patch.

            bar Alexander Barkov added a comment - Done. Here's a fixed version: https://github.com/MariaDB/server/commit/5798380a384fb44728242a3cd7851235454c6fc1 Now this test passes: ./mtr --view-protocol main.varbinary It failed before the patch.

            People

              bar Alexander Barkov
              lstartseva Lena Startseva
              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.