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

Server crashes in get_current_user upon SET PASSWORD via SP

    XMLWordPrintable

Details

    Description

      CREATE USER foo@localhost;
      CREATE  PROCEDURE pr() SET PASSWORD FOR foo@localhost = PASSWORD('x');
      CALL pr();
       
      # Cleanup
      DROP PROCEDURE pr;
      DROP USER foo@localhost;
      

      10.5 6073049a

      #3  <signal handler called>
      #4  0x00005587a6387a11 in get_current_user (thd=0x7f4938000b10, user=0xa5a5a5a5a5a5a5a5, lock=true) at /data/src/10.5/sql/sql_acl.cc:12246
      #5  0x00005587a636c16b in check_change_password (thd=0x7f4938000b10, user=0xa5a5a5a5a5a5a5a5) at /data/src/10.5/sql/sql_acl.cc:3679
      #6  0x00005587a632a413 in set_var_password::check (this=0x7f49381541f0, thd=0x7f4938000b10) at /data/src/10.5/sql/set_var.cc:922
      #7  0x00005587a6329d1a in sql_set_variables (thd=0x7f4938000b10, var_list=0x7f4938139300, free=true) at /data/src/10.5/sql/set_var.cc:733
      #8  0x00005587a643c5cb in mysql_execute_command (thd=0x7f4938000b10) at /data/src/10.5/sql/sql_parse.cc:4924
      #9  0x00005587a63530e5 in sp_instr_stmt::exec_core (this=0x7f4938154210, thd=0x7f4938000b10, nextp=0x7f494eccd6b4) at /data/src/10.5/sql/sp_head.cc:3606
      #10 0x00005587a6352442 in sp_lex_keeper::reset_lex_and_exec_core (this=0x7f4938154258, thd=0x7f4938000b10, nextp=0x7f494eccd6b4, open_tables=false, instr=0x7f4938154210) at /data/src/10.5/sql/sp_head.cc:3334
      #11 0x00005587a6352c8a in sp_instr_stmt::execute (this=0x7f4938154210, thd=0x7f4938000b10, nextp=0x7f494eccd6b4) at /data/src/10.5/sql/sp_head.cc:3512
      #12 0x00005587a634c86c in sp_head::execute (this=0x7f4938153458, thd=0x7f4938000b10, merge_da_on_success=true) at /data/src/10.5/sql/sp_head.cc:1346
      #13 0x00005587a634f1e3 in sp_head::execute_procedure (this=0x7f4938153458, thd=0x7f4938000b10, args=0x7f49380058f8) at /data/src/10.5/sql/sp_head.cc:2288
      #14 0x00005587a6435f8d in do_execute_sp (thd=0x7f4938000b10, sp=0x7f4938153458) at /data/src/10.5/sql/sql_parse.cc:3019
      #15 0x00005587a6436b80 in Sql_cmd_call::execute (this=0x7f4938013458, thd=0x7f4938000b10) at /data/src/10.5/sql/sql_parse.cc:3261
      #16 0x00005587a6441562 in mysql_execute_command (thd=0x7f4938000b10) at /data/src/10.5/sql/sql_parse.cc:6075
      #17 0x00005587a64467fc in mysql_parse (thd=0x7f4938000b10, rawbuf=0x7f49380133a8 "CALL pr()", length=9, parser_state=0x7f494eccf170, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7884
      #18 0x00005587a6432b88 in dispatch_command (command=COM_QUERY, thd=0x7f4938000b10, packet=0x7f4938008341 "CALL pr()", packet_length=9, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1843
      #19 0x00005587a64312ce in do_command (thd=0x7f4938000b10) at /data/src/10.5/sql/sql_parse.cc:1360
      #20 0x00005587a65be30a in do_handle_one_connection (connect=0x5587a8e3cbf0, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1414
      #21 0x00005587a65be039 in handle_one_connection (arg=0x5587a8e3cbf0) at /data/src/10.5/sql/sql_connect.cc:1309
      #22 0x00005587a6ac1beb in pfs_spawn_thread (arg=0x5587a8da67a0) at /data/src/10.5/storage/perfschema/pfs.cc:1862
      #23 0x00007f495a6804a4 in start_thread (arg=0x7f494ecd0700) at pthread_create.c:456
      #24 0x00007f4958bc8d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Both debug and release builds crash.

      The problem appeared in 10.5 tree with this commit:

      commit bf5a144e1692f6cc6a6d781b7e75ff4abf32bdf3
      Author: Alexander Barkov
      Date:   Fri May 31 16:44:17 2019 +0400
       
          MDEV-19639 + MDEV-19640 fix + preparatory changes for WL#4179
      ...
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            elenst Elena Stepanova
            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.