Commit graph

10 commits

Author SHA1 Message Date
Sergei Golubchik
98a39b0c91 Merge branch '10.4' into 10.5 2023-12-02 01:02:50 +01:00
Thirunarayanan Balathandayuthapani
e996f77cd8 MDEV-32897 main suite test case prints extra row for metadata_lock_info query
- Added the parameter stats_persistent=0 for InnoDB engine.
- Before printing metadata_lock_info query, make sure that
InnoDB does complete purging.

Reviewed by: Marko Mäkelä
2023-11-29 17:43:40 +05:30
Anel Husakovic
ff0bade2f8 MDEV-28367: BACKUP LOCKS on table to be accessible to those with database LOCK TABLES privileges
- Allow database level access via `LOCK TABLES` to execute statement
`BACKUP [un]LOCK <object>`
- `BACKUP UNLOCK` works only with `RELOAD` privilege.
  In case there is `LOCK TABLES` privilege without `RELOAD` privilege,
  we check if backup lock is taken before.
  If it is not we raise an error of missing `RELOAD` privilege.
- We had to remove any error/warnings from calling functions because
`thd->get_stmt_da()->m_status` will be set to error and will break
`my_ok()`.
- Added missing test coverage of `RELOAD` privilege to `main.grant.test`
Reviewer: <daniel@mariadb.org>
2023-11-23 11:52:12 +11:00
Lena Startseva
d444536e1d Merge branch 'bb-10.4-all-builders' into bb-10.5-all-builders 2022-09-26 10:24:59 +07:00
Lena Startseva
184e65954b MDEV-27691: make working view-protocol
Update tests for version 10.4
2022-09-23 19:47:30 +07:00
Monty
72437cbc12 Fixed sporadic error in main.backup_locks
The follwoing could happen if InnoDB did some background work while
test was running:

@@ -5,6 +5,8 @@
 SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
 LOCK_MODE      LOCK_TYPE       TABLE_SCHEMA    TABLE_NAME
 MDL_SHARED_HIGH_PRIO   Table metadata lock     test    t1
+MDL_SHARED     Table metadata lock     mysql   innodb_table_stats
+MDL_SHARED     Table metadata lock     mysql   innodb_index_stat
2022-02-28 20:08:11 +02:00
Monty
a1c2380753 MENT-328 Retry BACKUP STAGE BLOCK DDL in case of deadlocks
MENT-328 wrongly assumed that the backup failed because of warnings from
mariabackup about not found files. This is normal (and the error message
should be deleted).

randgen failed because mariabackup didn't retry BACKUP STAGE BLOCK DDL
if it failed with a deadlock.

To simplify things, I implemented the retry loop in the server as
this particular deadlock should be quickly resolved.
2022-02-08 14:32:28 +02:00
Monty
eb38e7ef60 MDEV-22879 SIGSEGV (or hang) in free/my_free
This bug was already fixed in a previous commit.
Added test case from the MDEV to prove it's fixed.
2020-10-29 19:20:10 +02:00
Rinat Ibragimov
709ba7dcae MDEV-20945: BACKUP UNLOCK + FTWRL assertion failure
MDEV-20945: BACKUP UNLOCK + FTWRL assertion failure | SIGSEGV in I_P_List
from MDL_context::release_lock on INSERT w/ BACKUP LOCK (on optimized
builds) | Assertion `ticket->m_duration == MDL_EXPLICIT' failed

BACKUP LOCK behavior is modified so it won't be used wrong:
- BACKUP LOCK should commit any active transactions.
- BACKUP LOCK should not be allowed in stored procedures.
- When BACKUP LOCK is active, don't allow any DDL's for that connection.
- FTWRL is forbidden on the same connection while BACKUP LOCK is active.

Reviewed-by: monty@mariadb.com
2020-10-22 00:18:33 +03:00
Michael Widenius
aad0165cea Added support for BACKUP LOCK / BACKUP UNLOCK 2019-01-14 16:18:50 +02:00