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

SET STATEMENT old_passwords has no effect

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: N/A
    • Fix Version/s: 10.1.2
    • Component/s: Admin statements
    • Labels:
      None

      Description

      MariaDB [test]> set statement OLD_PASSWORDS = 0 for select password('test');
      +-------------------------------------------+
      | password('test')                          |
      +-------------------------------------------+
      | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 |
      +-------------------------------------------+
      1 row in set (0.00 sec)
      
      MariaDB [test]> set statement OLD_PASSWORDS = 1 for select password('test');
      +-------------------------------------------+
      | password('test')                          |
      +-------------------------------------------+
      | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 |
      +-------------------------------------------+
      1 row in set (0.00 sec)
      
      MariaDB [test]> set  old_passwords = 1;
      Query OK, 0 rows affected (0.00 sec)
      
      MariaDB [test]>  select password('test');
      +------------------+
      | password('test') |
      +------------------+
      | 378b243e220ca493 |
      +------------------+
      1 row in set (0.00 sec)
      

      Percona server seems to work all right.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              sanja Oleksandr Byelkin added a comment -

              The variable prohibited as a workaround.

              Show
              sanja Oleksandr Byelkin added a comment - The variable prohibited as a workaround.
              Hide
              sanja Oleksandr Byelkin added a comment -

              Parameters set during parsing so changing variables has no effect.

              Show
              sanja Oleksandr Byelkin added a comment - Parameters set during parsing so changing variables has no effect.
              Hide
              serg Sergei Golubchik added a comment -

              Don't set NO_SET_STMT for it, fix the following bug instead:

              create table t1 (a char(10));
              insert t1 values ('qwertyuiop');
              prepare x from "select password(a) from t1";
              execute x;
              set old_passwords=1;
              execute x;
              alter table t1 engine=myisam;
              execute x;
              
              Show
              serg Sergei Golubchik added a comment - Don't set NO_SET_STMT for it, fix the following bug instead: create table t1 (a char(10)); insert t1 values ('qwertyuiop'); prepare x from " select password(a) from t1" ; execute x; set old_passwords=1; execute x; alter table t1 engine=myisam; execute x;
              Hide
              serg Sergei Golubchik added a comment - - edited

              one possible fix would be to extend the grammar to support PASSWORD(string, mode) function, and use Item_func_get_system_var as needed. Alternatively, there can be a hidden flag, not available from SQL. Like password_func_item->check_old_passwords_variable=1;

              Show
              serg Sergei Golubchik added a comment - - edited one possible fix would be to extend the grammar to support PASSWORD(string, mode) function, and use Item_func_get_system_var as needed. Alternatively, there can be a hidden flag, not available from SQL. Like password_func_item->check_old_passwords_variable=1;
              Hide
              sanja Oleksandr Byelkin added a comment -

              You pickup workaround to review instead of fix. Fix include decision about what function to use on fixfields call.

              Subject of the e-mail is:
              [Commits] b1f8911: MDEV-7015: SET STATEMENT old_passwords has no effect
              20.11.14 12:45

              Show
              sanja Oleksandr Byelkin added a comment - You pickup workaround to review instead of fix. Fix include decision about what function to use on fixfields call. Subject of the e-mail is: [Commits] b1f8911: MDEV-7015 : SET STATEMENT old_passwords has no effect 20.11.14 12:45
              Hide
              serg Sergei Golubchik added a comment -

              ok to push

              Show
              serg Sergei Golubchik added a comment - ok to push

                People

                • Assignee:
                  sanja Oleksandr Byelkin
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: