[MDEV-32937] Unexpected error message for CREATE USER when tables are locked Created: 2023-10-03  Updated: 2024-01-08

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2

Type: Bug Priority: Minor
Reporter: Jacob Moorman (Inactive) Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Tested on 10.11.2 on Ubuntu 23.04

MariaDB [(none)]> create database tdb;
Query OK, 1 row affected (0.001 sec)
 
MariaDB [(none)]> use tdb;
Database changed
MariaDB [tdb]> create table sample (id integer, description text);
Query OK, 0 rows affected (0.014 sec)
 
MariaDB [tdb]> create user tdbuser1;
Query OK, 0 rows affected (0.009 sec)
 
MariaDB [tdb]> lock table sample read;
Query OK, 0 rows affected (0.000 sec)
 
MariaDB [tdb]> create user tdbuser2;
ERROR 1100 (HY000): Table 'db' was not locked with LOCK TABLES

It would seem in this case that Error 1192 (ER_LOCK_OR_ACTIVE_TRANSACTION) "Can't execute the given command because you have active locked tables or an active transaction" would make more sense.


Generated at Thu Feb 08 10:35:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.