maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #11410
Re: 63ad6a9: MDEV-15890 Strange error message if you try to FLUSH TABLES <view> after LOCK TABLES <view>.
Hi, Alexey!
On Sep 02, Alexey Botchkov wrote:
> revision-id: 63ad6a9e1a33ddd5547767b2894e09ae66196f69 (mariadb-10.1.35-23-g63ad6a9)
> parent(s): 288212f489c8cd88c4cc98f8aecc3366c85a90be
> committer: Alexey Botchkov
> timestamp: 2018-09-02 09:24:33 +0400
> message:
>
> MDEV-15890 Strange error message if you try to FLUSH TABLES <view> after LOCK TABLES <view>.
>
> Check if the argument of the FLUSH TABLE is a VIEW and handle it
> accordingly.
>
> diff --git a/mysql-test/r/flush.result b/mysql-test/r/flush.result
> index b643510..2d7b81b 100644
> --- a/mysql-test/r/flush.result
> +++ b/mysql-test/r/flush.result
> @@ -496,3 +496,27 @@ flush relay logs,relay logs;
> ERROR HY000: Incorrect usage of FLUSH and RELAY LOGS
> flush slave,slave;
> ERROR HY000: Incorrect usage of FLUSH and SLAVE
> +#
> +# MDEV-15890 Strange error message if you try to
> +# FLUSH TABLES <view> after LOCK TABLES <view>.
> +#
> +CREATE TABLE t1 (qty INT, price INT);
> +CREATE VIEW v1 AS SELECT qty, price, qty*price AS value FROM t1;
> +LOCK TABLES v1 READ;
> +FLUSH TABLES v1;
> +ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
> +UNLOCK TABLES;
> +LOCK TABLES v1 WRITE;
> +FLUSH TABLES v1;
> +ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
Why is that?
Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx