[MDEV-17944] Assertion `0' failed in Protocol::end_statement upon GRANT with non-existing plugin Created: 2018-12-09  Updated: 2019-02-19  Resolved: 2019-02-19

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System
Affects Version/s: 10.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Vladislav Vaintroub
Resolution: Cannot Reproduce Votes: 0
Labels: None


 Description   

CREATE USER foo;
GRANT ALL ON *.* TO foo IDENTIFIED WITH non_existing_plugin;
 
# Cleanup
DROP USER foo;

10.4 fac997feef

mysqld: /data/src/10.4-travis/sql/protocol.cc:588: void Protocol::end_statement(): Assertion `0' failed.
181209  3:35:24 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f2a9636eee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055c35c3b24ba in Protocol::end_statement (this=0x7f2a800010b8) at /data/src/10.4-travis/sql/protocol.cc:588
#9  0x000055c35c4c1833 in dispatch_command (command=COM_QUERY, thd=0x7f2a80000b00, packet=0x7f2a8000b411 "GRANT ALL ON *.* TO foo IDENTIFIED WITH non_existing_plugin", packet_length=59, is_com_multi=false, is_next_command=false) at /data/src/10.4-travis/sql/sql_parse.cc:2408
#10 0x000055c35c4be6b2 in do_command (thd=0x7f2a80000b00) at /data/src/10.4-travis/sql/sql_parse.cc:1396
#11 0x000055c35c62a1a0 in do_handle_one_connection (connect=0x55c3601c4a70) at /data/src/10.4-travis/sql/sql_connect.cc:1402
#12 0x000055c35c629f24 in handle_one_connection (arg=0x55c3601c4a70) at /data/src/10.4-travis/sql/sql_connect.cc:1308
#13 0x000055c35cae141a in pfs_spawn_thread (arg=0x55c3602bd4b0) at /data/src/10.4-travis/storage/perfschema/pfs.cc:1862
#14 0x00007f2a97e2a494 in start_thread (arg=0x7f2a90516700) at pthread_create.c:333
#15 0x00007f2a9642b93f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Not reproducible on 10.3, but reproducible on older builds of 10.4, e.g. 10.4.0.



 Comments   
Comment by Vladislav Vaintroub [ 2019-02-19 ]

Was probably fixed at some point. I ran the statements on current 10.2, 10.3, 10.4 , debug build and nothing asserted

Comment by Elena Stepanova [ 2019-02-19 ]

It disappeared after

commit 5b15cc613ec60f44003dd7d2fdb6421d220b6ee9
Author: Sergei Golubchik
Date:   Thu Jan 10 13:51:51 2019 +0100
 
    MDEV-11340 Allow multiple alternative authentication methods for the same user

Generated at Thu Feb 08 08:40:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.