An error occurred fetching the project authors.
  1. 07 May, 2020 1 commit
    • Oleksandr Byelkin's avatar
      MDEV-19650: Privilege bug on MariaDB 10.4 · 0253ea7f
      Oleksandr Byelkin authored
      Also fixes:
      MDEV-21487: Implement option for mysql_upgrade that allows root@localhost to be replaced
      MDEV-21486: Implement option for mysql_install_db that allows root@localhost to be replaced
      
      Add user mariadb.sys to be definer of user view
      (and has right on underlying table global_priv for
      required operation over global_priv
      (SELECT,UPDATE,DELETE))
      
      Also changed definer of gis functions in case of creation,
      but they work with any definer so upgrade script do not try
      to push this change.
      0253ea7f
  2. 27 Apr, 2020 1 commit
  3. 05 Mar, 2020 1 commit
  4. 05 Feb, 2020 1 commit
  5. 25 Jul, 2019 1 commit
  6. 02 May, 2019 1 commit
  7. 11 Dec, 2018 1 commit
  8. 10 Dec, 2018 1 commit
  9. 08 Dec, 2018 1 commit
  10. 31 Oct, 2018 1 commit
    • Sergei Golubchik's avatar
      Use mysql.user.authentication_string for password · 76151f3c
      Sergei Golubchik authored
      Don't distinguish between a "password hash" and "authentication string"
      anymore. Now both are stored in mysql.user.authentication_string, both
      are handled identically internally. A "password hash" is just how some
      particular plugins interpret authentication string.
      
      Set mysql.user.plugin even if there is no password. The server will use
      mysql_native_password plugin in these cases, let's make it expicit.
      
      Remove LEX_USER::pwhash.
      76151f3c
  11. 04 Jul, 2018 1 commit
  12. 29 Mar, 2018 1 commit
  13. 12 Feb, 2018 1 commit
  14. 12 Dec, 2017 1 commit
  15. 08 Dec, 2017 1 commit
  16. 20 Sep, 2017 1 commit
  17. 08 Sep, 2017 1 commit
  18. 02 Jun, 2017 1 commit
  19. 07 Apr, 2017 1 commit
  20. 27 Feb, 2017 2 commits
    • Sergei Golubchik's avatar
      MDEV-5999 MySQL Bug#12766319 - 61865: RENAME USER DOES NOT WORK CORRECTLY -... · 199f88cb
      Sergei Golubchik authored
      MDEV-5999 MySQL Bug#12766319 - 61865: RENAME USER DOES NOT WORK CORRECTLY - REQUIRES FLUSH PRIVILEGES
      
      use update_hostname() to update the hostname.
      test case comes from
      
        commit 0abdeed1d6d
        Author: gopal.shankar@oracle.com <>
        Date:   Thu Mar 29 00:20:54 2012 +0530
      
          Bug#12766319 - 61865: RENAME USER DOES NOT WORK CORRECTLY -
                                REQUIRES FLUSH PRIVILEGES
      199f88cb
    • Dmitry Lenev's avatar
      Fix for bug#11759114 - '51401: GRANT TREATS NONEXISTENT · 494a9415
      Dmitry Lenev authored
      FUNCTIONS/PRIVILEGES DIFFERENTLY'.
      
      The problem was that attempt to grant EXECUTE or ALTER
      ROUTINE privilege on stored procedure which didn't exist
      succeed instead of returning an appropriate error like
      it happens in similar situation for stored functions or
      tables.
      
      The code which handles granting of privileges on individual
      routine calls sp_exist_routines() function to check if routine
      exists and assumes that the 3rd parameter of the latter
      specifies whether it should check for existence of stored
      procedure or function. In practice, this parameter had
      completely different meaning and, as result, this check was
      not done properly for stored procedures.
      
      This fix addresses this problem by bringing sp_exist_routines()
      signature and code in line with expectation of its caller.
      494a9415
  21. 12 Dec, 2016 2 commits
    • Sergei Golubchik's avatar
      Item::print(): remove redundant parentheses · 180065eb
      Sergei Golubchik authored
      by introducing new Item::precedence() method and using it
      to decide whether parentheses are required
      180065eb
    • Sergei Golubchik's avatar
      store/show vcols as item->print() · a411d7f4
      Sergei Golubchik authored
      otherwise we'd need to store sql_mode *per vcol*
      (consider CREATE INDEX...) and how SHOW CREATE TABLE would
      support that?
      
      Additionally, get rid of vcol::expr_str, just to make sure
      the string is always generated and never leaked in the
      original form.
      a411d7f4
  22. 30 Jun, 2016 2 commits
  23. 31 Mar, 2016 1 commit
  24. 04 Sep, 2015 1 commit
  25. 23 Jul, 2015 1 commit
    • Dmitry Lenev's avatar
      MDEV-5997 - MySQL bug#11759114 - '51401: GRANT TREATS NONEXISTENT · a6ab8ef9
      Dmitry Lenev authored
      FUNCTIONS/PRIVILEGES DIFFERENTLY'
      
      Fix for bug#11759114 - '51401: GRANT TREATS NONEXISTENT
      FUNCTIONS/PRIVILEGES DIFFERENTLY'.
      
      The problem was that attempt to grant EXECUTE or ALTER
      ROUTINE privilege on stored procedure which didn't exist
      succeed instead of returning an appropriate error like
      it happens in similar situation for stored functions or
      tables.
      
      The code which handles granting of privileges on individual
      routine calls sp_exist_routines() function to check if routine
      exists and assumes that the 3rd parameter of the latter
      specifies whether it should check for existence of stored
      procedure or function. In practice, this parameter had
      completely different meaning and, as result, this check was
      not done properly for stored procedures.
      
      This fix addresses this problem by bringing sp_exist_routines()
      signature and code in line with expectation of its caller.
      Conflicts:
      	mysql-test/r/grant.result
      	mysql-test/t/grant.test
      	sql/sp.cc
      a6ab8ef9
  26. 07 Oct, 2014 1 commit
    • Monty's avatar
      MDEV 4427: query timeouts · cc8aed3e
      Monty authored
      Added MAX_STATEMENT_TIME user variable to automaticly kill queries after a given time limit has expired.
      
      - Added timer functions based on pthread_cond_timedwait
      - Added kill_handlerton() to signal storage engines about kill/timeout
      - Added support for GRANT ... MAX_STATEMENT_TIME=#
      - Copy max_statement_time to current user, if stored in mysql.user
      - Added status variable max_statement_time_exceeded
      - Added KILL_TIMEOUT
      - Removed digest hash from performance schema tests as they change all the time.
      - Updated test results that changed because of the new user variables or new fields in mysql.user
      
      This functionallity is inspired by work done by Davi Arnaut at twitter.
      Test case is copied from Davi's work.
      
      Documentation can be found at
      https://kb.askmonty.org/en/how-to-limittimeout-queries/
      
      mysql-test/r/mysqld--help.result:
        Updated for new help message
      mysql-test/suite/perfschema/r/all_instances.result:
        Added new mutex
      mysql-test/suite/sys_vars/r/max_statement_time_basic.result:
        Added testing of max_statement_time
      mysql-test/suite/sys_vars/t/max_statement_time_basic.test:
        Added testing of max_statement_time
      mysql-test/t/max_statement_time.test:
        Added testing of max_statement_time
      mysys/CMakeLists.txt:
        Added thr_timer
      mysys/my_init.c:
      mysys/mysys_priv.h:
        Added new mutex and condition variables
        Added new mutex and condition variables
      mysys/thr_timer.c:
        Added timer functions based on pthread_cond_timedwait()
        This can be compiled with HAVE_TIMER_CREATE to benchmark agains timer_create()/timer_settime()
      sql/lex.h:
        Added MAX_STATEMENT_TIME
      sql/log_event.cc:
        Safety fix (timeout should be threated as an interrupted query)
      sql/mysqld.cc:
        Added support for timers
        Added status variable max_statement_time_exceeded
      sql/share/errmsg-utf8.txt:
        Added ER_QUERY_TIMEOUT
      sql/signal_handler.cc:
        Added support for KILL_TIMEOUT
      sql/sql_acl.cc:
        Added support for GRANT ... MAX_STATEMENT_TIME=#
        Copy max_statement_time to current user
      sql/sql_class.cc:
        Added timer functionality to THD.
        Added thd_kill_timeout()
      sql/sql_class.h:
        Added timer functionality to THD.
        Added KILL_TIMEOUT
        Added max_statement_time variable in similar manner as long_query_time was done.
      sql/sql_connect.cc:
        Added handling of max_statement_time_exceeded
      sql/sql_parse.cc:
        Added starting and stopping timers for queries.
      sql/sql_show.cc:
        Added max_statement_time_exceeded for user/connects status in MariaDB 10.0
      sql/sql_yacc.yy:
        Added support for GRANT ... MAX_STATEMENT_TIME=# syntax, to be enabled in 10.0
      sql/structs.h:
        Added max_statement_time user resource
      sql/sys_vars.cc:
        Added max_statement_time variables
      mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test
        Removed test as we require all fields in mysql.user table.
      scripts/mysql_system_tables.sql
      scripts/mysql_system_tables_data.sql
      scripts/mysql_system_tables_fix.sql
        Updated mysql.user with new max_statement_time field
      cc8aed3e
  27. 23 Jul, 2014 1 commit
  28. 05 Jun, 2014 1 commit
    • Sergei Golubchik's avatar
      MDEV-5998 MySQL Bug#11756966 - 48958: STORED PROCEDURES CAN BE LEVERAGED TO... · 37d35377
      Sergei Golubchik authored
      MDEV-5998 MySQL Bug#11756966 - 48958: STORED PROCEDURES CAN BE LEVERAGED TO BYPASS DATABASE SECURITY
      
      Merge from mysql-5.6:
      revno: 3257
      committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
      branch nick: mysql-trunk-bug11756966
      timestamp: Thu 2011-07-14 09:32:01 +0200
      message:
        Bug#11756966 - 48958: STORED PROCEDURES CAN BE LEVERAGED TO BYPASS
                       DATABASE SECURITY
      
        The problem was that CREATE PROCEDURE/FUCTION could be used to
        check the existence of databases for which the user had no
        privileges and therefore should not be allowed to see.
      
        The reason was that existence of a given database was checked
        before privileges. So trying to create a stored routine in
        a non-existent database would give a different error than trying
        to create a stored routine in a restricted database.
      
        This patch fixes the problem by changing the order of the checks
        for CREATE PROCEDURE/FUNCTION so that privileges are checked first.
        This means that trying to create a stored routine in a
        non-existent database and in a restricted database both will
        give ER_DBACCESS_DENIED_ERROR error.
      
        Test case added to grant.test.
      37d35377
  29. 03 Nov, 2013 1 commit
  30. 18 Oct, 2013 3 commits
    • Sergei Golubchik's avatar
      remove old incorrect bugfix that moved reading of procs_priv table into a separate function. · 40c43c39
      Sergei Golubchik authored
      FLUSH PRIVILEGES no longer returns an error, when it was successful.
      LOCK_grant is no longed unlocked/relocked between tables_priv and procs_priv
      40c43c39
    • Sergei Golubchik's avatar
      Remove the very old historical but never documented behavior, · 4cc8cda3
      Sergei Golubchik authored
      than an empty host '' is the same as any-host wildcard '%'.
      
      Replace '' with '%' in the parser (for GRANT ... foo@'') and when loading grant tables.
      
      Side effect: one cannot have foo@'' and foo@'%' both at the same time
      (but one can have foo@'%' and foo@'%%')
      4cc8cda3
    • Sergei Golubchik's avatar
      Fixes for mysql-test failures · 72d8b533
      Sergei Golubchik authored
      mysql-test/r/acl_roles_show_grants.result:
        one can do SHOW GRANTS for himself
      mysql-test/t/acl_roles_set_role-table-column-priv.test:
        correct error message
      mysql-test/t/acl_roles_show_grants.test:
        one can SHOW GRANTS for himself
      sql/sql_acl.cc:
        bugfixing:
        * don't assign with && - it can shortcut and the second assignment won't be executed
        * correct the test in check_grant_all_columns() - want_access should not be modified
        *
      sql/sql_cmd.h.OTHER:
        add new commands at the end
      sql/sql_db.cc:
        don't call acl_get() if all privileges are already satisfied
        (crashes when run with --skip-grants, because acl data stuctures aren't initialized)
      sql/sql_parse.cc:
        * test for current_user in get_current_user()
        * map explicitly specified user@host to current_user
      72d8b533
  31. 28 Aug, 2013 1 commit
  32. 04 Jul, 2013 1 commit
  33. 27 Sep, 2012 1 commit
    • Sergei Golubchik's avatar
      fixes for test failures · 474fe6d9
      Sergei Golubchik authored
      and small collateral changes
      
      mysql-test/lib/My/Test.pm:
        somehow with "print" we get truncated writes sometimes
      mysql-test/suite/perfschema/r/digest_table_full.result:
        md5 hashes of statement digests differ, because yacc token codes are different in mariadb
      mysql-test/suite/perfschema/r/dml_handler.result:
        host table is not ported over yet
      mysql-test/suite/perfschema/r/information_schema.result:
        host table is not ported over yet
      mysql-test/suite/perfschema/r/nesting.result:
        this differs, because we don't rewrite general log queries, and multi-statement
        packets are logged as a one entry. this result file is identical to what mysql-5.6.5
        produces with the --log-raw option.
      mysql-test/suite/perfschema/r/relaylog.result:
        MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB.
      mysql-test/suite/perfschema/r/server_init.result:
        MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup.
      mysql-test/suite/perfschema/r/stage_mdl_global.result:
        this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not
        do that, and this causes useless mutex locks and waits.
      mysql-test/suite/perfschema/r/statement_digest.result:
        md5 hashes of statement digests differ, because yacc token codes are different in mariadb
      mysql-test/suite/perfschema/r/statement_digest_consumers.result:
        md5 hashes of statement digests differ, because yacc token codes are different in mariadb
      mysql-test/suite/perfschema/r/statement_digest_long_query.result:
        md5 hashes of statement digests differ, because yacc token codes are different in mariadb
      mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result:
        will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged
      mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result:
        will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged
      474fe6d9
  34. 02 Jul, 2011 1 commit
  35. 25 Apr, 2011 1 commit