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

Skipped error returning for GRANT/SET PASSWORD

Details

    Description

      CREATE USER foo@localhost;
      GRANT FILE ON *.* TO foo@localhost IDENTIFIED VIA not_installed_plugin;
       
      # Cleanup
      DROP USER foo@localhost;
      

      10.4 2465d3e00b

      mysqld: /data/src/10.4/sql/protocol.cc:588: void Protocol::end_statement(): Assertion `0' failed.
      190106 15:48:06 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f74c9ce7ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000555cbf44a39e in Protocol::end_statement (this=0x7f74a80010c0) at /data/src/10.4/sql/protocol.cc:588
      #9  0x0000555cbf55b05d in dispatch_command (command=COM_QUERY, thd=0x7f74a8000b00, packet=0x7f74a800b421 "GRANT FILE ON *.* TO foo@localhost IDENTIFIED VIA not_installed_plugin", packet_length=70, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:2410
      #10 0x0000555cbf557e92 in do_command (thd=0x7f74a8000b00) at /data/src/10.4/sql/sql_parse.cc:1396
      #11 0x0000555cbf6c40ba in do_handle_one_connection (connect=0x555cc30ff6b0) at /data/src/10.4/sql/sql_connect.cc:1402
      #12 0x0000555cbf6c3e3e in handle_one_connection (arg=0x555cc30ff6b0) at /data/src/10.4/sql/sql_connect.cc:1308
      #13 0x0000555cbfb83164 in pfs_spawn_thread (arg=0x555cc3043970) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #14 0x00007f74cb7a3494 in start_thread (arg=0x7f74c467b700) at pthread_create.c:333
      #15 0x00007f74c9da493f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      The granted privileges don't seem to matter.
      Not reproducible on 10.3.
      No visible effect on a non-debug build.

      Attachments

        Activity

          elenst Elena Stepanova created issue -
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Description {code:sql}
          CREATE USER foo@localhost;
          GRANT FILE ON *.* TO foo@localhost IDENTIFIED VIA not_installed_plugin;

          # Cleanup
          DROP USER foo@localhost;
          {code}

          {noformat:title=10.4 2465d3e00b}
          mysqld: /data/src/10.4/sql/protocol.cc:588: void Protocol::end_statement(): Assertion `0' failed.
          190106 15:48:06 [ERROR] mysqld got signal 6 ;

          #7 0x00007f74c9ce7ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
          #8 0x0000555cbf44a39e in Protocol::end_statement (this=0x7f74a80010c0) at /data/src/10.4/sql/protocol.cc:588
          #9 0x0000555cbf55b05d in dispatch_command (command=COM_QUERY, thd=0x7f74a8000b00, packet=0x7f74a800b421 "GRANT FILE ON *.* TO foo@localhost IDENTIFIED VIA not_installed_plugin", packet_length=70, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:2410
          #10 0x0000555cbf557e92 in do_command (thd=0x7f74a8000b00) at /data/src/10.4/sql/sql_parse.cc:1396
          #11 0x0000555cbf6c40ba in do_handle_one_connection (connect=0x555cc30ff6b0) at /data/src/10.4/sql/sql_connect.cc:1402
          #12 0x0000555cbf6c3e3e in handle_one_connection (arg=0x555cc30ff6b0) at /data/src/10.4/sql/sql_connect.cc:1308
          #13 0x0000555cbfb83164 in pfs_spawn_thread (arg=0x555cc3043970) at /data/src/10.4/storage/perfschema/pfs.cc:1862
          #14 0x00007f74cb7a3494 in start_thread (arg=0x7f74c467b700) at pthread_create.c:333
          #15 0x00007f74c9da493f in clone () from /lib/x86_64-linux-gnu/libc.so.6
          {noformat}

          Not reproducible on 10.3.
          No visible effect on a non-debug build.
          {code:sql}
          CREATE USER foo@localhost;
          GRANT FILE ON *.* TO foo@localhost IDENTIFIED VIA not_installed_plugin;

          # Cleanup
          DROP USER foo@localhost;
          {code}

          {noformat:title=10.4 2465d3e00b}
          mysqld: /data/src/10.4/sql/protocol.cc:588: void Protocol::end_statement(): Assertion `0' failed.
          190106 15:48:06 [ERROR] mysqld got signal 6 ;

          #7 0x00007f74c9ce7ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
          #8 0x0000555cbf44a39e in Protocol::end_statement (this=0x7f74a80010c0) at /data/src/10.4/sql/protocol.cc:588
          #9 0x0000555cbf55b05d in dispatch_command (command=COM_QUERY, thd=0x7f74a8000b00, packet=0x7f74a800b421 "GRANT FILE ON *.* TO foo@localhost IDENTIFIED VIA not_installed_plugin", packet_length=70, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:2410
          #10 0x0000555cbf557e92 in do_command (thd=0x7f74a8000b00) at /data/src/10.4/sql/sql_parse.cc:1396
          #11 0x0000555cbf6c40ba in do_handle_one_connection (connect=0x555cc30ff6b0) at /data/src/10.4/sql/sql_connect.cc:1402
          #12 0x0000555cbf6c3e3e in handle_one_connection (arg=0x555cc30ff6b0) at /data/src/10.4/sql/sql_connect.cc:1308
          #13 0x0000555cbfb83164 in pfs_spawn_thread (arg=0x555cc3043970) at /data/src/10.4/storage/perfschema/pfs.cc:1862
          #14 0x00007f74cb7a3494 in start_thread (arg=0x7f74c467b700) at pthread_create.c:333
          #15 0x00007f74c9da493f in clone () from /lib/x86_64-linux-gnu/libc.so.6
          {noformat}

          The granted privileges don't seem to matter.
          Not reproducible on 10.3.
          No visible effect on a non-debug build.
          elenst Elena Stepanova added a comment - - edited

          The test case from the description doesn't cause a crash anymore (the statement fails with ER_PLUGIN_IS_NOT_LOADED), but this one does:

          If you do it via MTR, run with --mysqld=--unix-socket

          CREATE USER foo;
          GRANT EXECUTE ON * TO foo IDENTIFIED WITH unix_socket AS PASSWORD('bar');
           
          # Cleanup
          DROP USER foo;
          

          10.4 0bc42602

          mysqld: /data/src/10.4/sql/protocol.cc:606: void Protocol::end_statement(): Assertion `0' failed.
          190327 16:09:08 [ERROR] mysqld got signal 6 ;
           
          #7  0x00007efe5474aee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
          #8  0x0000562757d9d4af in Protocol::end_statement (this=0x7efe3c0010c8) at /data/src/10.4/sql/protocol.cc:606
          #9  0x0000562757eba9ce in dispatch_command (command=COM_QUERY, thd=0x7efe3c000b00, packet=0x7efe3c139311 "GRANT EXECUTE ON * TO foo IDENTIFIED WITH unix_socket AS PASSWORD('bar')", packet_length=72, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:2427
          #10 0x0000562757eb72b8 in do_command (thd=0x7efe3c000b00) at /data/src/10.4/sql/sql_parse.cc:1365
          #11 0x00005627580310d5 in do_handle_one_connection (connect=0x56275af6e210) at /data/src/10.4/sql/sql_connect.cc:1398
          #12 0x0000562758030e46 in handle_one_connection (arg=0x56275af6e210) at /data/src/10.4/sql/sql_connect.cc:1301
          #13 0x00005627585269dd in pfs_spawn_thread (arg=0x56275aff4090) at /data/src/10.4/storage/perfschema/pfs.cc:1862
          #14 0x00007efe56639494 in start_thread (arg=0x7efe4e8c5700) at pthread_create.c:333
          #15 0x00007efe5480793f in clone () from /lib/x86_64-linux-gnu/libc.so.6
          

          elenst Elena Stepanova added a comment - - edited The test case from the description doesn't cause a crash anymore (the statement fails with ER_PLUGIN_IS_NOT_LOADED), but this one does: If you do it via MTR, run with --mysqld=--unix-socket CREATE USER foo; GRANT EXECUTE ON * TO foo IDENTIFIED WITH unix_socket AS PASSWORD ( 'bar' );   # Cleanup DROP USER foo; 10.4 0bc42602 mysqld: /data/src/10.4/sql/protocol.cc:606: void Protocol::end_statement(): Assertion `0' failed. 190327 16:09:08 [ERROR] mysqld got signal 6 ;   #7 0x00007efe5474aee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x0000562757d9d4af in Protocol::end_statement (this=0x7efe3c0010c8) at /data/src/10.4/sql/protocol.cc:606 #9 0x0000562757eba9ce in dispatch_command (command=COM_QUERY, thd=0x7efe3c000b00, packet=0x7efe3c139311 "GRANT EXECUTE ON * TO foo IDENTIFIED WITH unix_socket AS PASSWORD('bar')", packet_length=72, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:2427 #10 0x0000562757eb72b8 in do_command (thd=0x7efe3c000b00) at /data/src/10.4/sql/sql_parse.cc:1365 #11 0x00005627580310d5 in do_handle_one_connection (connect=0x56275af6e210) at /data/src/10.4/sql/sql_connect.cc:1398 #12 0x0000562758030e46 in handle_one_connection (arg=0x56275af6e210) at /data/src/10.4/sql/sql_connect.cc:1301 #13 0x00005627585269dd in pfs_spawn_thread (arg=0x56275aff4090) at /data/src/10.4/storage/perfschema/pfs.cc:1862 #14 0x00007efe56639494 in start_thread (arg=0x7efe4e8c5700) at pthread_create.c:333 #15 0x00007efe5480793f in clone () from /lib/x86_64-linux-gnu/libc.so.6
          alice Alice Sherepa made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Rucha Deodhar [ rucha174 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.5 [ 23123 ]
          rucha174 Rucha Deodhar made changes -
          Status Confirmed [ 10101 ] In Progress [ 3 ]
          rucha174 Rucha Deodhar made changes -
          Status In Progress [ 3 ] Stalled [ 10000 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 91510 ] MariaDB v4 [ 143570 ]
          rucha174 Rucha Deodhar made changes -
          Status Stalled [ 10000 ] In Progress [ 3 ]
          rucha174 Rucha Deodhar made changes -
          Status In Progress [ 3 ] Stalled [ 10000 ]
          rucha174 Rucha Deodhar added a comment -

          Can't repeat. Running test with -mysqld=-unix-socket also fails with error ER_PLUGIN_IS_NOT_LOADED and doesn't give assertion

          rucha174 Rucha Deodhar added a comment - Can't repeat. Running test with - mysqld= -unix-socket also fails with error ER_PLUGIN_IS_NOT_LOADED and doesn't give assertion
          rucha174 Rucha Deodhar made changes -
          Fix Version/s 10.4.23 [ 26807 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Resolution Cannot Reproduce [ 5 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          elenst Elena Stepanova added a comment - - edited

          The second test case still fails for me on all 10.4+.
          rucha174, are you sure you copied the test case itself rather than just added a command line option? The test case in the comment is different from the original one. With a good build it shouldn't fail (not with ER_PLUGIN_IS_NOT_LOADED at least), because it uses unix_socket plugin and you force loading it from the command line.

          In retrospect, maybe it was a different bug and I should have filed it separately, but all protocol assertion zero failures look alike, so these two were considered related just due to belonging to the authentication universe.

          elenst Elena Stepanova added a comment - - edited The second test case still fails for me on all 10.4+. rucha174 , are you sure you copied the test case itself rather than just added a command line option? The test case in the comment is different from the original one. With a good build it shouldn't fail (not with ER_PLUGIN_IS_NOT_LOADED at least), because it uses unix_socket plugin and you force loading it from the command line. In retrospect, maybe it was a different bug and I should have filed it separately, but all protocol assertion zero failures look alike, so these two were considered related just due to belonging to the authentication universe.
          elenst Elena Stepanova made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Closed [ 6 ] Stalled [ 10000 ]
          elenst Elena Stepanova made changes -
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.4.23 [ 26807 ]
          rucha174 Rucha Deodhar added a comment -

          elenst Okay, I checked I was running the test in description with -mysqld=-unix-socket. Now I ran the test given in the comment on 10.5. You're right, it still fails on 10.4+. Doesn't fail on 10.4 though. I'll change the affected version and fix version. Thanks!

          rucha174 Rucha Deodhar added a comment - elenst Okay, I checked I was running the test in description with - mysqld= -unix-socket. Now I ran the test given in the comment on 10.5. You're right, it still fails on 10.4+. Doesn't fail on 10.4 though. I'll change the affected version and fix version. Thanks!
          rucha174 Rucha Deodhar made changes -
          Affects Version/s 10.5 [ 23123 ]
          Affects Version/s 10.4 [ 22408 ]
          rucha174 Rucha Deodhar made changes -
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.4 [ 22408 ]

          No, by 10.4+ I mean 10.4 and higher. It does fail for me on the top of current 10.4, see below (I've added revision output directly to the test, to avoid any doubts).
          If it doesn't fail for you, is it possible that you have changes in your local tree which are not in the main 10.4 branch yet which have fixed it?

          10.4 12cad0c34

          show variables like '%revision%';
          Variable_name	Value
          version_source_revision	12cad0c3468d734e041d4ef0cd5a26d2a28606fc
          CREATE USER foo;
          GRANT EXECUTE ON * TO foo IDENTIFIED WITH unix_socket AS PASSWORD('bar');
          bug.t                                    [ fail ]
                  Test ended at 2022-01-28 00:33:56
           
          CURRENT_TEST: bug.t
          mysqltest: At line 4: query 'GRANT EXECUTE ON * TO foo IDENTIFIED WITH unix_socket AS PASSWORD('bar')' failed: 2013: Lost connection to MySQL server during query
          ...
          #7  0x00007fc32c6a9662 in __GI___assert_fail (assertion=0x564ffb080770 "0", file=0x564ffb080380 "/data/src/10.4-bug/sql/protocol.cc", line=615, function=0x564ffb0806e8 "void Protocol::end_statement()") at assert.c:101
          #8  0x0000564ffa293edf in Protocol::end_statement (this=0x7fc314001368) at /data/src/10.4-bug/sql/protocol.cc:615
          #9  0x0000564ffa3bbb4a in dispatch_command (command=COM_QUERY, thd=0x7fc314000d90, packet=0x7fc31400abf1 "GRANT EXECUTE ON * TO foo IDENTIFIED WITH unix_socket AS PASSWORD('bar')", packet_length=72, is_com_multi=false, is_next_command=false) at /data/src/10.4-bug/sql/sql_parse.cc:2441
          #10 0x0000564ffa3b83c6 in do_command (thd=0x7fc314000d90) at /data/src/10.4-bug/sql/sql_parse.cc:1373
          #11 0x0000564ffa54652f in do_handle_one_connection (connect=0x564ffda41f10) at /data/src/10.4-bug/sql/sql_connect.cc:1420
          #12 0x0000564ffa5461d7 in handle_one_connection (arg=0x564ffda41f10) at /data/src/10.4-bug/sql/sql_connect.cc:1316
          #13 0x0000564ffaa61989 in pfs_spawn_thread (arg=0x564ffda89220) at /data/src/10.4-bug/storage/perfschema/pfs.cc:1869
          #14 0x00007fc32cb75ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
          #15 0x00007fc32c772def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
          

          elenst Elena Stepanova added a comment - No, by 10.4+ I mean 10.4 and higher. It does fail for me on the top of current 10.4, see below (I've added revision output directly to the test, to avoid any doubts). If it doesn't fail for you, is it possible that you have changes in your local tree which are not in the main 10.4 branch yet which have fixed it? 10.4 12cad0c34 show variables like '%revision%'; Variable_name Value version_source_revision 12cad0c3468d734e041d4ef0cd5a26d2a28606fc CREATE USER foo; GRANT EXECUTE ON * TO foo IDENTIFIED WITH unix_socket AS PASSWORD('bar'); bug.t [ fail ] Test ended at 2022-01-28 00:33:56   CURRENT_TEST: bug.t mysqltest: At line 4: query 'GRANT EXECUTE ON * TO foo IDENTIFIED WITH unix_socket AS PASSWORD('bar')' failed: 2013: Lost connection to MySQL server during query ... #7 0x00007fc32c6a9662 in __GI___assert_fail (assertion=0x564ffb080770 "0", file=0x564ffb080380 "/data/src/10.4-bug/sql/protocol.cc", line=615, function=0x564ffb0806e8 "void Protocol::end_statement()") at assert.c:101 #8 0x0000564ffa293edf in Protocol::end_statement (this=0x7fc314001368) at /data/src/10.4-bug/sql/protocol.cc:615 #9 0x0000564ffa3bbb4a in dispatch_command (command=COM_QUERY, thd=0x7fc314000d90, packet=0x7fc31400abf1 "GRANT EXECUTE ON * TO foo IDENTIFIED WITH unix_socket AS PASSWORD('bar')", packet_length=72, is_com_multi=false, is_next_command=false) at /data/src/10.4-bug/sql/sql_parse.cc:2441 #10 0x0000564ffa3b83c6 in do_command (thd=0x7fc314000d90) at /data/src/10.4-bug/sql/sql_parse.cc:1373 #11 0x0000564ffa54652f in do_handle_one_connection (connect=0x564ffda41f10) at /data/src/10.4-bug/sql/sql_connect.cc:1420 #12 0x0000564ffa5461d7 in handle_one_connection (arg=0x564ffda41f10) at /data/src/10.4-bug/sql/sql_connect.cc:1316 #13 0x0000564ffaa61989 in pfs_spawn_thread (arg=0x564ffda89220) at /data/src/10.4-bug/storage/perfschema/pfs.cc:1869 #14 0x00007fc32cb75ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477 #15 0x00007fc32c772def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
          rucha174 Rucha Deodhar added a comment -

          elenst , right, sorry. I can repeat it on 10.4. Don't know what happened earlier. Thanks !

          rucha174 Rucha Deodhar added a comment - elenst , right, sorry. I can repeat it on 10.4. Don't know what happened earlier. Thanks !
          rucha174 Rucha Deodhar made changes -
          Affects Version/s 10.4 [ 22408 ]
          Affects Version/s 10.5 [ 23123 ]
          rucha174 Rucha Deodhar made changes -
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          alice Alice Sherepa made changes -
          Affects Version/s 10.5 [ 23123 ]
          Affects Version/s 10.6 [ 24028 ]
          Affects Version/s 10.7 [ 24805 ]
          Affects Version/s 10.8 [ 26121 ]
          Affects Version/s 10.9 [ 26905 ]
          Affects Version/s 10.10 [ 27530 ]
          Affects Version/s 10.11 [ 27614 ]
          alice Alice Sherepa made changes -
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.7 [ 24805 ]
          Fix Version/s 10.8 [ 26121 ]
          Fix Version/s 10.9 [ 26905 ]
          Fix Version/s 10.10 [ 27530 ]
          Fix Version/s 10.11 [ 27614 ]
          alice Alice Sherepa made changes -
          Affects Version/s 10.5 [ 23123 ]
          Affects Version/s 10.6 [ 24028 ]
          Affects Version/s 10.7 [ 24805 ]
          Affects Version/s 10.8 [ 26121 ]
          Affects Version/s 10.9 [ 26905 ]
          Affects Version/s 10.10 [ 27530 ]
          Affects Version/s 10.11 [ 27614 ]
          alice Alice Sherepa made changes -
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.7 [ 24805 ]
          Fix Version/s 10.8 [ 26121 ]
          Fix Version/s 10.9 [ 26905 ]
          Fix Version/s 10.10 [ 27530 ]
          Fix Version/s 10.11 [ 27614 ]
          alice Alice Sherepa made changes -
          Affects Version/s 10.5 [ 23123 ]
          Affects Version/s 10.6 [ 24028 ]
          Affects Version/s 10.7 [ 24805 ]
          Affects Version/s 10.8 [ 26121 ]
          Affects Version/s 10.9 [ 26905 ]
          Affects Version/s 10.10 [ 27530 ]
          Affects Version/s 10.11 [ 27614 ]
          alice Alice Sherepa made changes -
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.7 [ 24805 ]
          Fix Version/s 10.8 [ 26121 ]
          Fix Version/s 10.9 [ 26905 ]
          Fix Version/s 10.10 [ 27530 ]
          Fix Version/s 10.11 [ 27614 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.7 [ 24805 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.8 [ 26121 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.9 [ 26905 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.10 [ 27530 ]
          alice Alice Sherepa made changes -
          Fix Version/s 11.0 [ 28320 ]
          Fix Version/s 11.1 [ 28549 ]
          Fix Version/s 11.2 [ 28603 ]
          Fix Version/s 11.3 [ 28565 ]
          Fix Version/s 11.4 [ 29301 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 11.0 [ 28320 ]
          Fix Version/s 11.3 [ 28565 ]
          alice Alice Sherepa made changes -
          Fix Version/s 11.5 [ 29506 ]
          Fix Version/s 10.4 [ 22408 ]
          serg Sergei Golubchik made changes -
          Labels affects-tests
          serg Sergei Golubchik made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 11.1 [ 28549 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 11.5 [ 29506 ]
          rucha174 Rucha Deodhar made changes -
          Status Stalled [ 10000 ] In Progress [ 3 ]
          rucha174 Rucha Deodhar added a comment - Patch: https://github.com/MariaDB/server/commit/edfc9d8181525ed8ddecf77c5690b38335597601
          rucha174 Rucha Deodhar made changes -
          Assignee Rucha Deodhar [ rucha174 ] Oleksandr Byelkin [ sanja ]
          Status In Progress [ 3 ] In Review [ 10002 ]

          The Original bug probably fixed by MDEV-11340, where plugin checked before set_user_auth call and error returned (instead of warning in set_user_auth)

          sanja Oleksandr Byelkin added a comment - The Original bug probably fixed by MDEV-11340 , where plugin checked before set_user_auth call and error returned (instead of warning in set_user_auth)

          But the warning still make harm:

          install soname 'auth_0x0100';
          CREATE USER foo@localhost IDENTIFIED VIA auth_0x0100;
          uninstall plugin auth_0x0100;
           
          select Priv from mysql.global_priv where User = "foo" and host="localhost"
          into @priv;
          SET PASSWORD FOR foo@localhost = "1111";
          select Priv = @priv from mysql.global_priv where User = "foo" and host="localhost";
          

          result in warning but not changing the password

          CREATE USER foo@localhost;
          GRANT FILE ON *.* TO foo@localhost IDENTIFIED VIA not_installed_plugin;
          ERROR HY000: Plugin 'not_installed_plugin' is not loaded
          DROP USER foo@localhost;
          CREATE USER foo@localhost IDENTIFIED VIA not_installed_plugin;
          ERROR HY000: Plugin 'not_installed_plugin' is not loaded
          install soname 'auth_0x0100';
          CREATE USER foo@localhost IDENTIFIED VIA auth_0x0100;
          uninstall plugin auth_0x0100;
          select Priv from mysql.global_priv where User = "foo" and host="localhost"
          into @priv;
          Warnings:
          Warning	1287	'<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
          SET PASSWORD FOR foo@localhost = "1111";
          Warnings:
          Warning	1524	Plugin 'auth_0x0100' is not loaded
          select Priv = @priv from mysql.global_priv where User = "foo" and host="localhost";
          Priv = @priv
          1
          DROP USER foo@localhost;
          

          sanja Oleksandr Byelkin added a comment - But the warning still make harm: install soname 'auth_0x0100'; CREATE USER foo@localhost IDENTIFIED VIA auth_0x0100; uninstall plugin auth_0x0100;   select Priv from mysql.global_priv where User = "foo" and host="localhost" into @priv; SET PASSWORD FOR foo@localhost = "1111"; select Priv = @priv from mysql.global_priv where User = "foo" and host="localhost"; result in warning but not changing the password CREATE USER foo@localhost; GRANT FILE ON *.* TO foo@localhost IDENTIFIED VIA not_installed_plugin; ERROR HY000: Plugin 'not_installed_plugin' is not loaded DROP USER foo@localhost; CREATE USER foo@localhost IDENTIFIED VIA not_installed_plugin; ERROR HY000: Plugin 'not_installed_plugin' is not loaded install soname 'auth_0x0100'; CREATE USER foo@localhost IDENTIFIED VIA auth_0x0100; uninstall plugin auth_0x0100; select Priv from mysql.global_priv where User = "foo" and host="localhost" into @priv; Warnings: Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead SET PASSWORD FOR foo@localhost = "1111"; Warnings: Warning 1524 Plugin 'auth_0x0100' is not loaded select Priv = @priv from mysql.global_priv where User = "foo" and host="localhost"; Priv = @priv 1 DROP USER foo@localhost;
          sanja Oleksandr Byelkin added a comment - - edited

          Also there is mentioning in the docs https://mariadb.com/kb/en/set-password/ so it should produse warning about using with plugin not required password

          1. It does not and was not from very beginning (even reflected in the tests plugin_auth.test):

          --echo ## test SET PASSWORD
          #--error ER_SET_PASSWORD_AUTH_PLUGIN
          SET PASSWORD = PASSWORD('plug_dest');
          

          (notice commented out error)

          2. if warning return something should be done (password changed) if nothing is done error should be returned

          sanja Oleksandr Byelkin added a comment - - edited Also there is mentioning in the docs https://mariadb.com/kb/en/set-password/ so it should produse warning about using with plugin not required password 1. It does not and was not from very beginning (even reflected in the tests plugin_auth.test): --echo ## test SET PASSWORD #--error ER_SET_PASSWORD_AUTH_PLUGIN SET PASSWORD = PASSWORD('plug_dest'); (notice commented out error) 2. if warning return something should be done (password changed) if nothing is done error should be returned
          sanja Oleksandr Byelkin made changes -
          Summary Assertion `0' failed in Protocol::end_statement upon GRANT .. IDENTIFIED VIA <not installed plugin> Skipped error returning for GRANT/SET PASSWORD
          sanja Oleksandr Byelkin made changes -
          Status In Review [ 10002 ] Stalled [ 10000 ]
          sanja Oleksandr Byelkin added a comment - - edited

          commit 58aa409f161e0899930054f040d19c42a933eceb (HEAD -> bb-10.5-MDEV-18151, origin/bb-10.5-MDEV-18151)
          Author: Oleksandr Byelkin <sanja@mariadb.com>
          Date:   Fri Oct 4 10:15:35 2024 +0200
           
              MDEV-18151 Skipped error returning for GRANT/SET PASSWORD
              
              Make message of error not warning.
           
          commit e2f7e256e049b83c336b289d903e9749b1b1abe4
          Author: Oleksandr Byelkin <sanja@mariadb.com>
          Date:   Fri Oct 4 10:13:10 2024 +0200
           
              fix grant5 test to return to the original database.
           
          commit 778c67f7af0fc65bed94c9a03c1f07e91e6ecc7a
          Author: Oleksandr Byelkin <sanja@mariadb.com>
          Date:   Fri Oct 4 09:28:46 2024 +0200
           
              MDEV-18151 Skipped error returning for GRANT/SET PASSWORD
              
              Make error issueing for GRANT and SET PASSWORD the same.
              Report errors wich were skipped before.
          

          sanja Oleksandr Byelkin added a comment - - edited commit 58aa409f161e0899930054f040d19c42a933eceb (HEAD -> bb-10.5-MDEV-18151, origin/bb-10.5-MDEV-18151) Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Fri Oct 4 10:15:35 2024 +0200   MDEV-18151 Skipped error returning for GRANT/SET PASSWORD Make message of error not warning.   commit e2f7e256e049b83c336b289d903e9749b1b1abe4 Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Fri Oct 4 10:13:10 2024 +0200   fix grant5 test to return to the original database.   commit 778c67f7af0fc65bed94c9a03c1f07e91e6ecc7a Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Fri Oct 4 09:28:46 2024 +0200   MDEV-18151 Skipped error returning for GRANT/SET PASSWORD Make error issueing for GRANT and SET PASSWORD the same. Report errors wich were skipped before.
          sanja Oleksandr Byelkin made changes -
          Status Stalled [ 10000 ] In Progress [ 3 ]
          sanja Oleksandr Byelkin made changes -
          Assignee Oleksandr Byelkin [ sanja ] Sergei Golubchik [ serg ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Oleksandr Byelkin [ sanja ]
          Status In Review [ 10002 ] Stalled [ 10000 ]

          cc59fbfffa63 is ok to push. 236cdc78f5cd is ok, after changing "is not used for" to "is not applicable to"

          serg Sergei Golubchik added a comment - cc59fbfffa63 is ok to push. 236cdc78f5cd is ok, after changing "is not used for" to "is not applicable to"
          sanja Oleksandr Byelkin made changes -
          Fix Version/s 10.5.27 [ 29902 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.11 [ 27614 ]
          Fix Version/s 11.2 [ 28603 ]
          Fix Version/s 11.4 [ 29301 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          JIraAutomate JiraAutomate made changes -
          Fix Version/s 10.6.20 [ 29903 ]
          Fix Version/s 10.11.10 [ 29904 ]
          Fix Version/s 11.2.6 [ 29906 ]
          Fix Version/s 11.4.4 [ 29907 ]

          People

            sanja Oleksandr Byelkin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.