Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.4.1, 10.5.22
Description
It appears that the change in mysql.user table from table to view has broken the ability to restore older dumps produced (for example) with MariaDB 10.3 or older.
The 10.3 dump will try to drop table user, but in 10.5 and later you cannot drop a view with "drop table" anymore (not sure when this changed).
Hence in 10.5 you get:
MariaDB [mysql]> DROP TABLE IF EXISTS `user`;
|
Query OK, 0 rows affected, 1 warning (0.000 sec)
|
MariaDB [mysql]> show warnings;
|
+-------+------+------------------------+
|
| Level | Code | Message |
|
+-------+------+------------------------+
|
| Note | 1965 | 'mysql.user' is a view |
|
+-------+------+------------------------+
|
1 row in set (0.000 sec)
|
But in the 10.3 dump you have:
--
|
-- Table structure for table `user`
|
--
|
 |
DROP TABLE IF EXISTS `user`;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET character_set_client = utf8 */;
|
CREATE TABLE `user` (
|
`Host` char(60) NOT NULL DEFAULT '',
|
`User` char(80) NOT NULL DEFAULT '',
|
`Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
|
`Select_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
|
`Insert_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
|
`Update_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
|
[ ... ]
|
I would recommend we revert the change that disabled "drop table" for view, in the sake of compatibility.
Thanks,
Rick
Attachments
Issue Links
- is caused by
-
MDEV-17658 change the structure of mysql.user table
- Closed