Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.1.34, 10.3.8, 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL)
Description
Test user has all privileges but SUPER, and read-only is set.
This gets detected correctly when trying to create a new database, or when trying to change the character set of an existing table:
MariaDB [test]> create database test2;
|
ERROR 1290 (HY000): The MariaDB server is running with the --read-only option so it cannot execute this statement
|
|
MariaDB [test]> alter table t1 character set latin1;
|
ERROR 1290 (HY000): The MariaDB server is running with the --read-only option so it cannot execute this statement
|
Changing the default character set of an existing database is possible though, it does not raise any error, and the changes effect even though the MariaDB instance is in read-only mode:
MariaDB [test]> alter database test character set latin1;
|
Query OK, 1 row affected (0.001 sec)
|
|
MariaDB [test]> show create database test;
|
+----------+-----------------------------------------------------------------+
|
| Database | Create Database |
|
+----------+-----------------------------------------------------------------+
|
| test | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */ |
|
+----------+-----------------------------------------------------------------+
|
1 row in set (0.000 sec)
|
|
MariaDB [test]> alter database test character set utf8;
|
Query OK, 1 row affected (0.001 sec)
|
|
MariaDB [test]> show create database test;
|
+----------+---------------------------------------------------------------+
|
| Database | Create Database |
|
+----------+---------------------------------------------------------------+
|
| test | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET utf8 */ |
|
+----------+---------------------------------------------------------------+
|
1 row in set (0.000 sec)
|