summaryrefslogtreecommitdiff
path: root/mysql-test/main/grant5.test
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-30023 Revoking Privilege on the Column Yields the Errorbb-10.3-vicentiuVicențiu Ciorbaru2022-11-301-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change from MDEV-29465 exposed a flaw in replace_column_table where again we were not properly updating the column-level bits. replace_table_table was changed in MDEV-29465 to properly update grant_table->init_cols, however replace_column_table still only modified grant_column->rights when the GRANT_COLUMN already existed. This lead to a missmatch between GRANT_COLUMN::init_rights and GRANT_COLUMN::rights, *if* the GRANT_COLUMN already existed. As an example: GRANT SELECT (col1) ... Here: For col1 GRANT_COLUMN::init_rights and GRANT_COLUMN::rights are set to 1 (SELECT) in replace_column_table. GRANT INSERT (col1) ... Here, without this patch GRANT_COLUMN::init_rights is still 1 and GRANT_COLUMN::rights is 3 (SELECT_PRIV | INSERT_PRIV) Finally, if before this patch, one does: REVOKE SELECT (col1) ... replace_table_table will see that init_rights loses bit 1 thus it considers there are no more rights granted on that particular table. This prompts the whole GRANT_TABLE to be removed via the first revoke, when the GRANT_COLUMN corresponding to it should still have init_rights == 2. By also updating replace_column_table to keep init_rights in sync properly, the issue is resolved. Reviewed by <serg@mariadb.com>
* MDEV-28455: CREATE TEMPORARY TABLES privilege is insufficient for SHOW COLUMNSAnel Husakovic2022-10-181-0/+52
| | | | | | | | | | | | | | | =========== Problem ============= - `show columns` is not working for temporary tables, even though there is enough privilege `create temporary tables`. =========== Solution ============= - Append `TMP_TABLE_ACLS` privilege when running `show columns` for temp tables. - Additionally `check_access()` for database only once, not for each field =========== Additionally ============= - Update comments for function `check_table_access` arguments Reviewed by: <vicentiu@mariadb.org>
* MDEV-28548: ER_TABLEACCESS_DENIED_ERROR is missing information about DBAnel Husakovic2022-09-301-0/+72
| | | | | | | - Added missing information about database of corresponding table for various types of commands - Update some typos - Reviewed by: <vicentiu@mariadb.org>
* MDEV-26080: SHOW GRANTS does not quote role names properly for DEFAULT ROLEAnel Husakovic2021-07-081-0/+14
| | | | | | - Proceed with commit fafb35ee517f309d9e507f6e3908caca5d8cd257 Reviewed by: serg@mariadb.com
* Merge 10.2 into 10.3Marko Mäkelä2020-10-281-0/+18
|
* Merge branch '10.2' into 10.3Oleksandr Byelkin2020-08-031-0/+21
|
* MDEV-20076: SHOW GRANTS does not quote role names properlybb-10.3-MDEV-20076Oleksandr Byelkin2020-02-051-0/+50
| | | | Quotes added to output.
* Merge branch '10.2' into 10.3Sergei Golubchik2019-01-031-0/+10
|
* Create 'main' test directory and move 't' and 'r' thereMichael Widenius2018-03-291-0/+25